User:Henrik/sandbox/test

// afch_declines = Array; afch_accepts = Array; afch_accepts["accept"] = 'accepted'; afch_accepts["redirect"] = 'accepted'; afch_declines["exists"] = 'already%20exists'; afch_declines["v"] = 'not%20verifiable'; afch_declines["nn"] = 'not%20a%20notable%20person'; afch_declines["web"] = 'not%20a%20notable%20website'; afch_declines["corp"] = 'not%20a%20notable%20corporation'; afch_declines["band"] = 'not%20a%20notable%20band%20or%20musician'; afch_declines["dict"] = 'dictionary%20definition'; afch_declines["context"] = 'lacks%20context'; afch_declines["cv"] = 'copyright%20violation'; afch_declines["blank"] = 'blank%20entry'; afch_declines["adv"] = 'advertising'; afch_declines["neo"] = 'neologism'; afch_declines["lang"] = 'not%20in%20English'; afch_declines["joke"] = 'appears%20to%20be%20a%20joke'; afch_declines["npov"] = 'not%20neutrally%20written';

function appendAfter(var node, var newNode) { if (node.parentNode) {    if (node.nextSibling) node.parentNode.insertBefore(newNode, node.nextSibling); else node.parentNode.appendChild(newNode); } }

function afc_helper { //if (auto_mod) //  return; var anchors = new Array; {   var oldanchors = document.getElementById('bodyContent').getElementsByTagName('a'); for (var i=0; i < oldanchors.length; i++) anchors[i] = oldanchors[i]; }   var url_re = /\?title=Wikipedia:Articles_for_creation\/([^&]+)&action=edit&/; //var url_re = /\?title=User:Henrik\/sandbox\/([^&]+)&action=edit&/; var url, matches; for (var i=0; i < anchors.length; i++) { if (!(matches = anchors[i].href.match(url_re))        || (anchors[i].parentNode.parentNode.tagName != 'H2')) continue; bla = ""; for (var key in afch_accepts) { if( !afch_accepts.hasOwnProperty(key) ) { // Twinke workaround? continue; }               link = "javascript:afc_vote('"+escape(anchors[i].href)+"','"+key+"','"+afch_accepts[key]+"','accept')"; bla += "["+key+"]"; }       bla += " ";; for (var key in afch_declines) { if( !afch_declines.hasOwnProperty(key) ) { // Twinke workaround? continue; }               link = "javascript:afc_vote('"+escape(anchors[i].href)+"','"+key+"','decline - "+afch_declines[key]+"','')"; bla += "["+key+"]"; }       bla += " "; bla += " "; element = document.createElement("div"); appendAfter(anchors[i].parentNode.parentNode.appendChild,element); element.innerHTML = bla; } } afc_helper;

William S. Morris
dfg

= coo =