Created
January 19, 2015 08:23
-
-
Save Qofar/70b8a3df5529582a55ec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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