// ==UserScript== // @name Let me see where images // @author Lexi // @version 1.0.3 // @description Replaces empty or undefined image attributes // ==/UserScript== /* * public domain */ window.addEventListener('load',function(e){ var d = document.getElementsByTagName ('img'); if(d.length < 500){for (var i=0, di; di=d[i]; ++i) if (di.src) { if (!di.complete && !di.getAttribute ('alt') || di.getAttribute ('alt')==' '){ if(!di.getAttribute ('height') || di.getAttribute ('height') > 16 && di.getAttribute ('width') || di.getAttribute ('width') > 16){ di.setAttribute ('alt', ' '); di.style.background = 'url("data:image/gif;base64,R0lGODlhDgAQALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD//////yH5BAUAAAsALAAAAAAOABAAAARKEMhJ0brg6b2RXdkhjiLyWKEoCKN5poIiACIFr/T4SM8okYddisQoZniHBNHBOIYaSlGR4Ow1oLWJ0HqN6pA20hYI3HLOGpuaEgEAOw==") no-repeat';} } } } },true); |