Jump to content

User:AZPR/monobook.js

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by AndyZ (talk | contribs) at 23:51, 21 January 2008 (-> veblenbot?). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//following variables for peer reviewing script
select_PR = true;
allSpaces_PR = true;
spellcheck_PR = false; // true
showHeading_PR = true;
noXHR_PR = true; // false
// Script from [[User:AndyZ/peerreviewer.js]]
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:AndyZ/peerreviewer.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

// Script from [[User:AZPR/personalredirect.js]]
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:AZPR/personalredirect.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

importScript('User:Omegatron/monobook.js/addlink.js'); //[[User:Omegatron/monobook.js/addlink.js]]

if((wgNamespaceNumber == 0) && (document.location.href.indexOf("action")==-1)){
document.location.href = "http://en.wikipedia.org/w/index.php?title="+document.title.split(" - ")[0].replace(/\s/, "_")+"&action=edit"
}

function addMsg(num,num2){
// if(wgNamespaceNumber == 4 && wgTitle == "Peer review"){
  var list = document.getElementById('wpTextbox1').value.match(/review\|(.*)\|/g);
  var f = new Array();
  for(i=1+num;i<num2+2;i++){
   list[i] = list[i]
//   .replace(/(\{\{|\}\})/g,"");
     .replace(/(review|\|)/g,"");
   f[i]=document.createElement("IFRAME");
   f[i].src=wgServer+wgScriptPath+"/index.php?title=Wikipedia:Peer review/"+list[i]+"&action=edit";
   document.body.appendChild(f[i]);
  }
// }
}

function askAddMsg(){
	x = prompt("Indicate range of PRs to add message, using comma, like 1,20", "1,10");
        x = x.split(",");
	addMsg(parseInt(x[0]),parseInt(x[1]));
}
addOnloadHook(function () {
        if(wgPageName == "Wikipedia:Peer_review" && document.location.href.indexOf("action=edit") != -1)
     addPortletLink("p-cactions", "javascript:askAddMsg()", "Add notices", "ca-addMsg", "Goes through articles, add little notices regarding auto-PRs", "", "");
});