// ==UserScript== // @name GitHub images as icons // @description Show images in Github repositories source tree as 16x16 icons // @namespace wOxxOm.scripts // @include https://github.com/* // @match https://github.com/* // @version 1.01 // @grant GM_addStyle // @run-at document-start // @downloadURL none // ==/UserScript== function addStyle(e) { GM_addStyle('.wOxxOm-image-icon { max-width:16px; max-height:16px; margin-left:-2px }') window.removeEventListener('DOMContentLoaded', addStyle); iconify(document.body); } window.addEventListener('DOMContentLoaded', addStyle); function iconify(n) { var aa = (n.className == 'js-directory-link') ? [n] : n.getElementsByClassName('js-directory-link'); for (var a, i=0; i