User:Σ/Testing facility/Barbaz.js

// Thank CC BY-SA - Modified from User:Ais523/votesymbols.js // Code for adding icons to !votes in AfDs, RfAs, etc.. Doesn't affect the page, just // shows the icons when this code is installed. // Please do not see File:Votesymbols.js-enhanced_SfD.png for copyright info on the images that are added.

function lowerNoPunct(s) { return s.toLowerCase.split('.').join().split(',').join().split(':').join().split(';').join().split('+').join(''); }

addOnloadHook(function { if(wgNamespaceNumber==0) return; //avoid article space, generally speaking  var vs=  "http://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/Pictogram_voting_support.svg/16px-Pictogram_voting_support.svg.png#"+  "http://upload.wikimedia.org/wikipedia/commons/thumb/0/0e/Pictogram_voting_keep.svg/16px-Pictogram_voting_keep.svg.png#"+  "http://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Pictogram_voting_oppose.svg/16px-Pictogram_voting_oppose.svg.png#"+  "http://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Pictogram_voting_delete.svg/16px-Pictogram_voting_delete.svg.png#"+  "http://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Pictogram_voting_neutral.svg/16px-Pictogram_voting_neutral.svg.png#"+  "http://upload.wikimedia.org/wikipedia/commons/thumb/9/90/Pictogram_voting_merge.png/16px-Pictogram_voting_merge.png#"+  "http://upload.wikimedia.org/wikipedia/commons/thumb/b/bb/Pictogram_reply.svg/16px-Pictogram_reply.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/Pictogram_voting_redirect.png/16px-Pictogram_voting_redirect.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/a/a6/Pictogram_voting_comment.svg/16px-Pictogram_voting_comment.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/c/cc/Pictogram_partialy_voting_support.svg/16px-Pictogram_partialy_voting_support.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/5/5b/Pictogram_voting_question.svg/16px-Pictogram_voting_question.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Pictogram_voting_divide.svg/16px-Pictogram_voting_divide.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/Pictogram_voting_wait.svg/16px-Pictogram_voting_wait.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/Pictogram_pi.svg/16px-Pictogram_pi.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Pictogram_voting_keep-light-green.svg/16px-Pictogram_voting_keep-light-green.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Pictogram_voting_abstain.svg/16px-Pictogram_voting_abstain.svg.png"; var vt=vs.split("#"); var la=new Array; la['support']=0; la['endorse']=0; la['agree']=0; la['keep']=1; la['oppose']=2; la['overturn']=2; la['object']=2; la['delete']=3; la['neutral']=4; la['merge']=5; la['join']=5; la['move']=6; la['rename']=6; la['userfy']=6; la['transwiki']=6; la['redirect']=7; la['comment']=8; la['update']=8; la['note']=8; la['see_also']=8; la['delist']=9; la['moral support']=9; la['question']=10; la['split']=11; la['divide']=11; la['wait']=12; la['bjaodn']=13; la['undelete']=14; la['restore']=14; la['close']=15; la['abstain']=15; la['withdrawn']=15; la['withdraw']=15; var btc=document.body.getElementsByTagName("B"); i=btc.length; while(i--) {   var j,k; j=btc[i].innerHTML.split("<").join(" ").split(">").join(" ").split("/").join(" ").split(" "); k=0; var x=""; while(k ' }     k++; }   if(x!="") btc[i].innerHTML=x+btc[i].innerHTML; } }); //