User:AZPR/monobook.js: Difference between revisions
Appearance
Content deleted Content added
m doh |
-> veblenbot? |
||
Line 22: | Line 22: | ||
function addMsg(num,num2){ |
function addMsg(num,num2){ |
||
// if(wgNamespaceNumber == 4 && wgTitle == "Peer review"){ |
|||
var list = document.getElementById('wpTextbox1').value.match(/\ |
var list = document.getElementById('wpTextbox1').value.match(/review\|(.*)\|/g); |
||
var f = new Array(); |
var f = new Array(); |
||
for(i=1+num;i<num2+2;i++){ |
for(i=1+num;i<num2+2;i++){ |
||
list[i] = list[i].replace(/(\{\{|\}\})/g,""); |
list[i] = list[i] |
||
// .replace(/(\{\{|\}\})/g,""); |
|||
.replace(/(review|\|)/g,""); |
|||
f[i]=document.createElement("IFRAME"); |
f[i]=document.createElement("IFRAME"); |
||
f[i].src=wgServer+wgScriptPath+"/index.php?title="+list[i]+"&action=edit"; |
f[i].src=wgServer+wgScriptPath+"/index.php?title=Wikipedia:Peer review/"+list[i]+"&action=edit"; |
||
document.body.appendChild(f[i]); |
document.body.appendChild(f[i]); |
||
} |
} |
||
// } |
|||
} |
} |
||
Revision as of 23:51, 21 January 2008
//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", "", "");
});