Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function() {
- var
- $old=window.$old=$()
- ,$old2=$();
- (function anon() {
- var
- length=0
- ,$bad=$(
- '[width],[height],[style][style!=""]:not([style$=";"])'
- +',img:not([alt]),img[alt="Move"],img[alt="Edit"],img[alt="Delete"]'
- )
- .add($('col').parent(':not(colgroup)'))
- .add($('tr').parent(':not(thead,tbody,tfoot)'))
- .add($('th,td').parent(':not(tr)'))
- .not($old);
- //$old2=$old2.add($('img').not($old2).css({backgroundColor:'rgba(0,255,0,0.3)',outline:'0.2em solid purple'}));
- length=$bad
- .css({
- zIndex:1000
- ,minWidth:16
- ,minHeight:16
- ,outline:'1px solid black'
- ,backgroundColor:'rgba(255,0,0,0.5)'
- ,color:'#0ff'
- })
- .length;
- if (length) {
- console.log($bad,$bad.map(function() {return [[this.tagName||this.nodeName,this.id,this.name]];}).get());
- alert(length+' Bad elements found!\n');
- }
- $old=$bad.add($old);
- $old.css({visibility:function(k,v) {return (v==='visible' ? 'hidden' : 'visible');}});
- setTimeout(anon,500);
- }());
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement