Skip to content

Instantly share code, notes, and snippets.

@Qofar
Created January 19, 2015 08:23
Show Gist options
  • Save Qofar/70b8a3df5529582a55ec to your computer and use it in GitHub Desktop.
Save Qofar/70b8a3df5529582a55ec to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name LDR_FaviconByGoogle
// @include http://reader.livedoor.com/reader/*
// @version 1.0.0
// ==/UserScript==
(function(){
with(unsafeWindow) {
register_hook("AFTER_SUBS_LOAD", function() {
var treeitems = document.getElementsByClassName('treeitem');
Array.prototype.forEach.call(treeitems, function(treeitem) {
var subid = treeitem.getAttribute('subscribe_id');
var subitem = subs_item(subid);
var iconurl = 'http://www.google.com/s2/favicons?domain_url=' + subitem.link;
subitem.icon = iconurl
treeitem.style.backgroundImage = 'url(' + iconurl + ')';
});
});
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment