blob: b9cbca3421aa8c9d01cce5a4fc8769cdceb2b555 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<a href="{{ result.url }}" title="{{ result.title | striptags }}">
<canvas id="canvas-{{ pageno }}-{{ index }}" class="icon" width="16" height="16"></canvas>
</a>
<script type="text/javascript">
var img{{ pageno }}_{{ index }} = new Image();
img{{ pageno }}_{{ index }}.src = 'http://{{ result.url | extract_domain }}/favicon.ico';
img{{ pageno }}_{{ index }}.onload = function () {
var can{{ pageno }}_{{ index }} = document.getElementById('canvas-{{ pageno }}-{{ index }}');
var ctx = can{{ pageno }}_{{ index }}.getContext("2d");
ctx.drawImage(img{{ pageno }}_{{ index }}, 0, 0, 16, 16);
};
</script>
|