diff --git a/assets/content.js b/assets/content.js new file mode 100644 index 0000000..1efe686 --- /dev/null +++ b/assets/content.js @@ -0,0 +1,12 @@ +(function () { + document.querySelectorAll('.content a[href^="http"]').forEach(function (a) { + var hostname = new URL(a.href).hostname; + var img = document.createElement('img'); + img.src = 'https://icons.duckduckgo.com/ip3/' + hostname + '.ico'; + img.width = 16; + img.height = 16; + img.style.verticalAlign = 'middle'; + img.style.marginRight = '3px'; + a.prepend(img); + }); +})(); diff --git a/assets/page.html b/assets/page.html index 7f54f9f..2f0056b 100644 --- a/assets/page.html +++ b/assets/page.html @@ -47,6 +47,7 @@ {{else}} {{if .Content}}
{{.Content}}
+ {{end}} {{if .Entries}}
Contents