User:PlasmaTime/wikia.js

//Written by w:c:community:User:Splarka - tweaked a bit by User:PlasmaTime //   //nuke: anyone, anyone insertContentSubContribLink('http://ben10.wikia.com/wiki/Special:Nuke?mode=normal&view=full&target=' + targ.replace(/_/g,'+'),'Nuke')

function insertContentSubContribLink(link,text) { var cs = document.getElementById('contentSub'); var icssep = document.createTextNode(' | '); var ics = document.createElement('a'); ics.href = link; ics.setAttribute('title', ics.href); ics.appendChild(document.createTextNode(text)); try { cs.insertBefore(icssep,cs.childNodes[cs.childNodes.length-1]); cs.insertBefore(ics,cs.childNodes[cs.childNodes.length-1]); } catch(e) { cs.appendChild(document.createTextNode('(Error: contentSub still empty! Inserting... '));   cs.appendChild(ics);  } } function queryString(p) {  var re = RegExp('[&?]' + p + '=([^&]*)');  var matches;  if (matches = re.exec(document.location)) {    try {       return decodeURI(matches[1]);    } catch (e) {    }  }  return null; } //