Article snapshot taken from[REDACTED] with creative commons attribution-sharealike license.
Give it a read and then ask your questions in the chat.
We can research this topic together.
document.editform.wpSummary.value='Repaired external link proxy rewrites using ]';
document.editform.wpDiff.click(); //to check
}
//Conditional inclusion of popups (these are a prereq for the easytag script)
//Conditional inclusion of popups (these are a prereq for the easytag script)
Revision as of 15:48, 4 August 2006
/* Link to ] for tracking purposes
<!-- No longer using this // Link to ] for tracking purposes -->
<pre><nowiki>
*/
function addlilink(tabs, url, name, id, title, key){
var na = document.createElement('a');
na.href = url;
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
if(id) li.id = id;
li.appendChild(na);
tabs.appendChild(li);
if(id)
{
if(key && title)
{
ta = ;
}
else if(key)
{
ta = ;
}
else if(title)
{
ta = ;
}
}
// re-render the title and accesskeys from existing code in wikibits.js
akeytt();
return li;
};
function addTab(url, name, id, title, key){
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul');
return addlilink(tabs, url, name, id, title, key)
};
function showlimenu(id)
{
document.getElementById("ais523_"+id).style.display="block";
}
function addlimenu(tabs, name, id)
{
var na = document.createElement('a');
na.href = 'javascript:showlimenu("'+id+'")';
var mn = document.createElement('ul');
if(id) mn.id = 'ais523_'+id;
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
if(id) li.id = id;
li.className = 'tabmenu';
li.appendChild(na);
li.appendChild(mn);
tabs.appendChild(li);
return li;
}
// test
//addOnloadHook(function() {
//addTab("javascript:alert('This is a test');","test","ca-testing","Testing tab","");
//});
/* Based on ], but performing quite a different function (that of conditionally including the popup script) */
addOnloadHook(function (){
var user = document.getElementById( 'pt-userpage' ).firstChild.firstChild.data;
var subpage = '/monobook.js/popupson.js';
var linkprefix = "http://en.wikipedia.org/search/?title=User:";
var contribs = document.getElementById( 'pt-mycontris' );
var commontext =
"if(ais523_popupson)"+
" document.write('<s"+"cript type="+'"'+"text/javascript"+'"'+" src="+'"'+"' "+
" + 'http://en.wikipedia.org/search/?title=User:Lupin/popups.js' "+
" + '&action=raw&ctype=text/javascript&dontcountme=s"+'"'+"></s"+"cript>');"+
"else"+
" document.write('<s"+"cript type="+'"'+"text/javascript"+'"'+" src="+'"'+"' "+
" + 'http://en.wikipedia.org/search/?title=User:Lupin/autoedit.js' "+
" + '&action=raw&ctype=text/javascript&dontcountme=s"+'"'+"></s"+"cript>');";
//Add the links
addlilink(contribs, linkprefix+user+subpage+"&action=edit&ais523autoedit=true", "popups on/off", "pt-popup-toggle", "Switch popups on or off.", "");
if (location.href.indexOf("&action=edit&ais523autoedit=true") == -1) return; //Are we here to auto-edit the status?
//Get new status
//Modify the form
if(document.getElementById('wpTextbox1').value.indexOf("_popupson=1") != -1)
document.getElementById('wpTextbox1').value = "var ais523_popupson=0;"+commontext;
else
document.getElementById('wpTextbox1').value = "var ais523_popupson=1;"+commontext;
document.getElementById('wpSummary').value = "Toggling use of popups";
document.getElementById('wpMinoredit').checked = 'checked';
//Submit it!
document.getElementById('editform').submit();
});
/************************************************************************************
* This section has been totally overhauled, and is preserved here in case anyone in
* ] wants to take a look at it.
*
*
*function addautoedit(b,a,p,n,c,h)
*{
* var catag=document.getElementById('ca-autoedit').getElementsByTagName('ul');
* addlilink(catag,"javascript:easytag('"+b+"','"+a+"',"+p+","+c+",'"+h+"')", n, "ca-ais523"+n, n, "");
*}
*
* //Please leave the following line
* //]
* //Start db script
* //Note: Very heavily modified by ] to be a general auto-editing device; *requires popups or at least an autoedit script (I'll have to find the right part in the *popups script); it's at ].
* addOnloadHook(function() {
* if (location.href.indexOf("action=edit") == -1 && location.href.indexOf("action=history") == -1 && location.href.indexOf("oldid=") == -1 &&location.href.indexOf("Special:") == -1)
* {
* var tabs = document.getElementById('p-cactions').getElementsByTagName('ul');
* addlimenu(tabs, 'autoedit', 'ca-autoedit');
* var catag=document.getElementById('ca-autoedit').getElementsByTagName('ul');
* var sig='~~'+'~'; // four tildes for most people
* if(location.href.indexOf("User_talk:") != -1)
* { // Default list for User Talk namespace: Testing for now
* addautoedit('subst:nn-warn|',sig,true,'nn-warn',true,'');
* addautoedit('subst:test1',sig,false,'test1',true,'Please use the sandbox');
* addautoedit('subst:test2',sig,false,'test2',true,'Warning');
* addautoedit('subst:test3',sig,false,'test3',true,'Warning');
* addautoedit('subst:test4',sig,false,'test4',true,'Final warning');
* addautoedit('subst:bv',sig,false,'bv',true,'Vandalism warning');
* addautoedit('subst:sign',sig,false,'sign',true,'Please sign your comments');
* addautoedit('subst:welcome',sig,false,'welcome',true,'Welcome');
* }
* else if(location.href.indexOf("Talk:") != -1)
* {
* addautoedit('db-talk','',false,'db-talk',false,'');
* addautoedit('db-attack','',false,'db-attack',false,'');
* }
* else if(location.href.indexOf("User:") == -1)
* { // Default list for Article namespace
* addautoedit('db-bio','',false,'db-bio',false,'');
* addautoedit('db-attack','',false,'db-attack',false,'');
* addautoedit('db-empty','',false,'db-empty',false,'');
* addautoedit('db-context','',false,'db-context',false,'');
* addautoedit('db-blankcsd','',false,'db-blankcsd',false,'');
* addautoedit('db-','',true,'db-',false,'');
* addautoedit('db|','',true,'db|',false,'');
* addautoedit('subst:prod|','',true,'prod',false,'');
* addautoedit('wikify','',false,'wikify',false,'');
* addautoedit('context','',false,'context',false,'');
* addautoedit('notability','',false,'notability',false,'');
* addautoedit('advert','',false,'advert',false,'');
* }
* else
* { // Default list for User namespace
* addautoedit('db-user','',false,'db-user',false,'');
* }
* }
* });
*
* //s = tag, e = sig (after the tag), q = prompt for a param, c = add as a comment, h = *heading title when adding as a comment (overriden by q)
* function easytag(s,e,q,c,h) {
* var type;
* var secnew = "";
* var edsum;
* if(c) secnew = "section=new&";
* if(q)
* {
* type = prompt("What is X in {{" + s + "X" + "}}"+e+"?");
* if(type == null) return;
* } else type="";
* var sepchar="?";
* if(location.href.indexOf("?") != -1) sepchar='&';
* edsum="Adding {{"+s+type+"}}"+e+" using ]";
* if(c&&q) edsum=type;
* if(c&&!q) edsum=h;
* document.location = document.URL + sepchar + secnew + "action=edit&autoedit=s/^/\n{{" + s + type + "}}"+e+"\n/&autosummary="+edsum+"&autoclick=wpSave";
* }
* //End db script
****************************************************************************************/
//From WP:US/S/Get Tidy Title, a prereq for my AutoTag script
function get_tidy_title()
{
var editlk = document.getElementById('ca-edit').getElementsByTagName('a').href;
// cut everything up to "title=" from the start and everything past "&action=edit" from the end
editlk = editlk.substring(editlk.indexOf('title=') + 6, editlk.lastIndexOf('&action=edit'));
return editlk;
}
function showatmenu()
{
if(document.getElementById("atmenu").style.display=="none")
document.getElementById("atmenu").style.display="block";
else
document.getElementById("atmenu").style.display="none";
}
// AutoTag's tagging function.
function atspeedy(dbplate)
{
var atmenuhtm="<TABLE CLASS='atmenu' STYLE='background:#FFDDDD; width:100%'><TR><TD>";
//This 'form' is a bit unusual. The names of some of the hidden inputs are carefully
//selected so that an edit-page window will come up when the form is submitted;
//for instance, <INPUT TYPE='hidden' NAME='action' VALUE='edit'> becomes ?action=edit
//in the bar when the form is submitted! So although the page appears to be submitting
//to itself, that's actually just so we hit /search/ or the /User talk: page
//(either works with action=edit). Other inputs are used by AutoTag to finish off the
//edit and to prompt the user for information (such as sig format). I have no idea how
//portable all this is, but it seems to work in IE.
atmenuhtm+="<FORM ACTION='"+location.href+"' METHOD='GET'>";
atmenuhtm+="<INPUT TYPE='hidden' NAME='action' VALUE='edit'/>";
atmenuhtm+="<INPUT TYPE='hidden' NAME='withautotag' VALUE='tag'/>";
var pgTitle=get_tidy_title();
atmenuhtm+="<INPUT TYPE='hidden' NAME='title' VALUE='"+pgTitle+"'/>";
var paramneeded;
if(dbplate.indexOf("!")==0)
{
dbplate=dbplate.substr(1);
paramneeded=true;
}
atmenuhtm+="<INPUT TYPE='hidden' NAME='autotagflag' VALUE='"+(paramneeded?1:0)+"'/>";
atmenuhtm+="<NOBR><B>You have chosen to tag this page with {"+"{"+dbplate+"}}.</B></NOBR><BR/>";
var edsum="Tagged with {"+"{"+dbplate+"}} using ]";
atmenuhtm+="<NOBR>Edit summary: <INPUT TYPE='text' NAME='autotagsum' "+
"VALUE=\""+edsum+"\"/></NOBR><BR/>";
if(paramneeded&&dbplate.indexOf("db-")==0)
atmenuhtm+="<NOBR>Original location: ";
else if(paramneeded)
atmenuhtm+="<NOBR>Reason: ";
if(paramneeded) //This could be changed to guess which page you want
atmenuhtm+="<INPUT TYPE='text' NAME='autotag-n' VALUE=''/></NOBR><BR/>";
atmenuhtm+="<NOBR><INPUT TYPE='radio' NAME='autotagpre' VALUE='0' CHECKED>Do the "+
"edit</INPUT>";
atmenuhtm+="<INPUT TYPE='radio' NAME='autotagpre' VALUE='1'>Preview only</INPUT></NOBR><BR/>";
atmenuhtm+="<INPUT TYPE='hidden' NAME='autotagdp' VALUE='"+dbplate+"'/>";
atmenuhtm+="<INPUT TYPE='submit' VALUE='Tag with AutoTag'/>";
atmenuhtm+="</FORM></TD><TD><B><I>Reminder:</I></B><BR/>";
if(dbplate.indexOf("db-")==0)
atmenuhtm+="Please only use the reasons given for speedy deletions. In other cases, use PROD or XfD.";
else if(dbplate.indexOf("prod")==0)
atmenuhtm+="Please remember to check whether the page has been prodded or XfDd before; each page can only be prodded once.";
atmenuhtm+="<BR/>If you have not used this tag before, please preview it to check that it's appropriate.</TR></TABLE>";
document.getElementById("atform").innerHTML=atmenuhtm;
document.getElementById("atform").scrollIntoView(true);
}
// AutoTag's warning function. warnplate is the template to use (possibly check for
// -n somehow?), blockreq, if true, signifies that instead of a warning a request to
// block should be posted on AIV, AN/I, AN3, or PAIN, or a protection request at RPP.
function atwarn(warnplate,blockreq,edsum,warnlevel)
{
if(blockreq)
{ //Just link to the appropriate page for the time being; this can be enhanced
//(especially wrt AIV) later
location.href="http://en.wikipedia.org/WP:"+warnplate;
return;
}
var atmenuhtm="<TABLE CLASS='atmenu' STYLE='background:#FFDDDD; width:100%'><TR><TD>";
//This 'form' is a bit unusual. The names of some of the hidden inputs are carefully
//selected so that an edit-page window will come up when the form is submitted;
//for instance, <INPUT TYPE='hidden' NAME='action' VALUE='edit'> becomes ?action=edit
//in the bar when the form is submitted! So although the page appears to be submitting
//to itself, that's actually just so we hit /search/ or the /User talk: page
//(either works with action=edit). Other inputs are used by AutoTag to finish off the
//edit and to prompt the user for information (such as sig format). I have no idea how
//portable all this is, but it seems to work in IE.
atmenuhtm+="<FORM ACTION='"+location.href+"' METHOD='GET'>";
atmenuhtm+="<INPUT TYPE='hidden' NAME='action' VALUE='edit'/>";
atmenuhtm+="<INPUT TYPE='hidden' NAME='section' VALUE='new'/>";
atmenuhtm+="<INPUT TYPE='hidden' NAME='withautotag' VALUE='warn'/>";
var pgTitle=get_tidy_title();
atmenuhtm+="<INPUT TYPE='hidden' NAME='title' VALUE='"+pgTitle+"'/>";
var siginplate;
var npossible;
var nneeded;
if(warnplate.indexOf("~")==0)
{
warnplate=warnplate.substr(1);
siginplate=true;
}
if(warnplate.indexOf("!")==0)
{
warnplate=warnplate.substr(1);
nneeded=true;
}
if(warnplate.indexOf("|")==0)
{
warnplate=warnplate.substr(1);
npossible=true;
}
atmenuhtm+="<INPUT TYPE='hidden' NAME='autotagflag' VALUE='"+((siginplate?1:0)+
(nneeded?2:0)+(npossible?4:0))+"'/>";
atmenuhtm+="<NOBR><B>You have chosen to tag this page with {"+"{"+warnplate+"}}.</B></NOBR><BR/>";
atmenuhtm+="<NOBR>Name of section: <INPUT TYPE='text' NAME='autotagsum' "+
"VALUE=\""+edsum+"\"/></NOBR><BR/>";
if(nneeded||npossible)
atmenuhtm+="<NOBR>Pertaining to edits to ";
if(nneeded)
atmenuhtm+="(compulsory): ";
if(npossible)
atmenuhtm+="(optional): ";
if(nneeded||npossible) //This could be changed to guess which page you want
atmenuhtm+="<INPUT TYPE='text' NAME='autotag-n' VALUE=''/></NOBR><BR/>";
atmenuhtm+="<NOBR>Your signature: <INPUT TYPE='text' NAME='autotagsig' VALUE='~~"+
"~~'/></NOBR><BR/>";
atmenuhtm+="<NOBR><INPUT TYPE='radio' NAME='autotagpre' VALUE='0' CHECKED>Do the "+
"edit</INPUT>";
atmenuhtm+="<INPUT TYPE='radio' NAME='autotagpre' VALUE='1'>Preview only</INPUT></NOBR><BR/>";
atmenuhtm+="<INPUT TYPE='hidden' NAME='autotagwp' VALUE='"+warnplate+"'/>";
atmenuhtm+="<INPUT TYPE='submit' VALUE='Warn this user with AutoTag'/>";
atmenuhtm+="</FORM></TD><TD><B><I>Level "+warnlevel+" warning:</I></B><BR/>";
if(warnlevel==0) atmenuhtm+="Rules reminder. For good-faith mistakes or experienced users.";
if(warnlevel==1) atmenuhtm+="No previous warnings, or teaching new users the rules. Mildly worded.";
if(warnlevel==2) atmenuhtm+="Simple statement of the situation. Use if a level 1 warning didn't work.";
if(warnlevel==3) atmenuhtm+="Warning, and threat of a block. For repeat offenses.";
if(warnlevel==4) atmenuhtm+="Final warning. For serious or repeat offenses.";
atmenuhtm+="<BR/>If you have not issued this warning before, please preview it to check that it's appropriate.</TR></TABLE>";
document.getElementById("atform").innerHTML=atmenuhtm;
document.getElementById("atform").scrollIntoView(true);
}
//From ]. Renamed because I know many users use popups,
//and I don't want to cause a naming conflict. Edited to decode + to space as well,
//and to use a decoding function that handles more characters.
function atGetParamValue(paramName) {
var cmdRe=RegExp(''+paramName+'=(*)');
var h=document.location;
var m;
if (m=cmdRe.exec(h)) {
try {
while(m.indexOf('+')!=-1)
{
m=m.substr(0,m.indexOf('+'))+" "+m.substr(m.indexOf('+')+1);
}
return decodeURIComponent(m);
} catch (someError) {}
}
return null;
};
//AutoTag's automatic editing function: for user warnings and tags
addOnloadHook(function() {
if(location.href.indexOf("withautotag=warn")!=-1)
{
document.editform.wpSummary.value=atGetParamValue('autotagsum')+
'<!--using ]-->';
document.editform.wpTextbox1.value='{'+'{subst:'+atGetParamValue('autotagwp');
var atf=atGetParamValue('autotagflag');
//Only 0, 1, 2, 4 supported for the time being
if(atf=='4'&&atGetParamValue('autotag-n')=='') atf='0';
if(atf=='2'&&atGetParamValue('autotag-n')=='')
{
alert("You didn't enter a page, although this is required.");
return; //Leave the user in edit mode
}
if(atf=='0') document.editform.wpTextbox1.value+='}} '+atGetParamValue('autotagsig');
if(atf=='1') document.editform.wpTextbox1.value+='|sig='+
atGetParamValue('autotagsig')+'}}';
if(atf=='2') document.editform.wpTextbox1.value+='|'+atGetParamValue('autotag-n')+
'}} '+atGetParamValue('autotagsig');
if(atf=='4') document.editform.wpTextbox1.value+='-n|'+atGetParamValue('autotag-n')+
'}} '+atGetParamValue('autotagsig');
if(atGetParamValue('autotagpre')=='1')
document.editform.click();
else
document.editform.click(); //commented during testing to avoid accidents
}
if(location.href.indexOf("withautotag=tag")!=-1)
{
var oldcontents=document.editform.wpTextbox1.value;
document.editform.wpSummary.value=atGetParamValue('autotagsum');
document.editform.wpTextbox1.value='{'+'{'+atGetParamValue('autotagdp');
var atf=atGetParamValue('autotagflag');
//Don't newline after the tag, to prevent potential newline problems
if(atf=='0') document.editform.wpTextbox1.value+='}}'+oldcontents;
if(atf=='1') document.editform.wpTextbox1.value+='|'+atGetParamValue('autotag-n')+'}}'+oldcontents;
if(atGetParamValue('autotagpre')=='1')
document.editform.click();
else
document.editform.click(); //commented during testing to avoid accidents
}
})
//The new AutoTag: Place an AutoTag tab on the tab bar
addOnloadHook(function() {
//Don't show on history, special, diff, or old revisions pages
if (location.href.indexOf("action=history") == -1 && location.href.indexOf("action=raw") == -1 && location.href.indexOf("oldid=") == -1 && location.href.indexOf("action=submit") == -1 && location.href.indexOf("Special:") == -1 && location.href.indexOf("Special%3A") == -1)
{
var atmenu;
atmenu=document.createElement("DIV");
addTab("javascript:showatmenu()","AutoTag","ca-autotag","AutoTag","");
atmenu.id="atmenu";
//This may need to change if siteSub's location is changed; it locates the correct
//position for the AutoTag menu to appear (just after the page title, where a tag
//would appear).
document.getElementById("siteSub").insertBefore(atmenu);
atmenu.style.display="none";
if(location.href.indexOf("showatmenu=true") != -1) atmenu.style.display="block";
var atmenuhtm="<B>No AutoTag available for this sort of page.</B>";
if(location.href.indexOf("User_talk:") != -1 || location.href.indexOf("User_talk%3A") != -1)
{
//User Talk namespace
var rownum=1;
var userwarnmatrix=
//Format
// Title0|Title1|Title2-3|Title4
// Description: template0 template1 |template2 ~template3 template4 blockingpage\n
// Precede a template with | if a -n version is available and ~ if it automatically
// includes a sig. If the template is itself -n, precede with !. If no template is
// available, use X.
"Please discuss your changes|Please use the sandbox|Warning|Final warning|"+
"Testing / Generic vandalism (additions): |test0 |test1 |test2 |test3 |test4 AIV\n"+
"Please discuss your changes|Please use the sandbox|Warning|Final warning|"+
"Testing / Generic vandalism (removals): X |test1a |test2a |test3a test4a AIV\n"+
"Please discuss your changes|Please use the sandbox|Warning|Final warning|"+
"Testing / Generic vandalism (page creation): X |test1article |test2article |test3article |test4article AIV\n"+
"X|Please use the sandbox|X|X|"+
"Self-reverted testing: X |test-self X X X X\n"+
"X|Please use the sandbox|Vandalism|Only warning|"+
"Obvious vandalism: X |vw X |bv |test4im AIV\n"+
"X|Please use the sandbox|Warning|Final warning|"+
"Blanking entire pages: X |blank1 |blank2 |blank3 |blank4 AIV\n"+
"Please discuss your page-moves|X|Page-move warning|Final warning|"+
"Renaming pages: |mp0 X |mp2 |mp3 |mp4 AIV\n"+
"X|Please don\\'t add commercial links|Spam warning|Final spam warning|"+
"Spamming: X |spam1 |spam2 |spam3 |spam4 AN/I\n"+
"Be careful with other user's userpages|Be careful with other user's userpages|Userpage vandalism warning|Final userpage vandalism warning|"+
"Userpage vandalism: |tpv0 |tpv1 |tpv2 |tpv3 |tpv4 AIV\n"+
"Please don\\'t remove warnings|Please don\\'t remove warnings|Warning removal|Final warning removal warning|"+
"Removing warnings: wr0 wr1 X wr3 wr4 RPP\n"+
"Neutral point of view|X|Adding personal analysis|Final NPOV warning|"+
"Non-neutral point of view: |NPOV0 X |comment2 |comment3 |comment4 AN/I\n"+
"X|Notability problems; this article may be deleted|X|X|"+
"Notability problems: X !nn-warn X X X X\n"+
"X|Please be careful with copyright|Copyright violations|X|"+
"Copyvio: X !nothanks X !usrcvtext X AN/I\n"+
"X|X|3RR warning|3RR warning|"+
"3RR violations: X X X |3RR 3RR4 AN3\n"+
"About censorship|X|Censorship warning|X|"+
"Censoring: Not_censored X X Not_censored_2 X AN/I\n"+
"X|X|Factual error warning|Final factual error warning|"+
"Adding factual errors: X X |verror2 verror3 verror4 AN/I\n"+
"X|X|Please stay on-topic|X|"+
"Adding off-topic content: X X mess2 X X X\n"+
"X|Humour|Humour warning|Final humour warning|"+
"Inappropriate humour: X |behave X ~funnybut seriously AN/I\n"+
"The Manual of Style|X|Manual of Style warning|X|"+
"Contravening the MOS: mos0 X mos2 mos3 X AN/I\n"+
"X|X|Please don\\'t reformat dates|X|"+
"Reformatting dates: X X dates2 dates3 X AN/I\n"+
"About US/UK English|X|US/UK English warning|Final US/UK English warning|"+
"US/UK English changes: lang0 X lang2 lang3 lang4 AN/I\n"+
"X|X|Articles about royalty|Final warning about royalty|"+
"Royalty stylistic problems: X X rn2 rn3 rn4 AN/I\n"+
"Please use your userpage|Article moved to your userspace|X|X|"+
"Userpage in article space: vanity userfy_warning X X X X\n"+
"X|Please use edit summaries|X|X|"+
"Missing edit summaries: X summary X X X X\n"+
"X|Sign your posts on talk pages|Sign your posts on talk pages|X|"+
"No talk-page signature: X talk_sign sign X X X\n"+
"X|Adding images to articles|Image use warning|Final image use warning|"+
"Adding inappropriate images to pages: X image1 image2 image3 image4 AIV\n"+
"X|X|Overwriting images|X|"+
"Overwriting images inappropriately: X X X imageow3 X AIV\n"+
"Image copyright|X|X|Final image copyright warning|"+
"Image copyright problems: image_copyright X X X insertimage4 AN/I\n"+
"X|X|Personal attack warning|Final personal attack warning|"+
"Personal attacks: X X |npa2 |npa3 |npa4 PAIN\n"+
"X|X|X|Defamation: only warning|"+
"Defamation: X X X X defwarn PAIN\n"+
"X|Please assume good faith|Assuming good faith warning|X|"+
"Assuming bad faith: X agf1 X agf3 X AN/I\n"+
"X|Please try to stay civil|Incivility warning|X|"+
"Incivility: X |civil1 |civil2 X X X\n"+
"X|X|X|X|"+
"Inappropriate username: X X X X X AIV\n"+
"X|X|X|Posting other user\\'s personal info: only warning|"+
"Posting other users' personal info: X X X X pinfo4 PAIN\n"+
"X|X|Don\\'t make legal threats|Legal threats:final warning|"+
"Legal threats: X X threat2 X threat4 AN/I\n"+
"X|Don\\'t remove AfD templates|AfD template removal warning|Final AfD template removal warning|"+
"Removing AfD templates: X drmafd drmafd2 drmafd3 drmafd4 AIV\n"+
"X|Don\\'t remove speedy-delete templates|Speedy-delete template removal warning|Final speedy-delete template removal warning|"+
"Removing speedy templates: X drmspeedy drmspeedy2 drmspeedy3 drmspeedy4 AIV\n"+
"X|Don\\'t remove maintenance notices|X|X|"+
"Removing maintenance notices: X drmmt X X X X\n"+
"X|Don\\'t recreate deleted articles|X|X|"+
"Recreating deleted articles: X recreated X X X X\n"+
"";
atmenuhtm="<DIV ID='atform'></DIV><TABLE CLASS='atmenu' STYLE='background:#EEFFFF;font-size:x-small'>";
while(userwarnmatrix!="")
{
var sum0, sum1, sum23, sum4;
if(rownum%2) atmenuhtm+="<TR>";
sum0=userwarnmatrix.substr(0,userwarnmatrix.indexOf("|"));
userwarnmatrix=userwarnmatrix.substr(userwarnmatrix.indexOf("|")+1);
sum1=userwarnmatrix.substr(0,userwarnmatrix.indexOf("|"));
userwarnmatrix=userwarnmatrix.substr(userwarnmatrix.indexOf("|")+1);
sum23=userwarnmatrix.substr(0,userwarnmatrix.indexOf("|"));
userwarnmatrix=userwarnmatrix.substr(userwarnmatrix.indexOf("|")+1);
sum4=userwarnmatrix.substr(0,userwarnmatrix.indexOf("|"));
userwarnmatrix=userwarnmatrix.substr(userwarnmatrix.indexOf("|")+1);
atmenuhtm+="<TD STYLE='text-align:right'><B>"+userwarnmatrix.substr(0,userwarnmatrix.indexOf(":"));
atmenuhtm+="</B></TD>";
userwarnmatrix=userwarnmatrix.substr(userwarnmatrix.indexOf(":")+2);
var testnum=0;
while(testnum<6)
{
var ttlt;
if(testnum==5)
ttlt=userwarnmatrix.substr(0,userwarnmatrix.indexOf("\n"));
else
ttlt=userwarnmatrix.substr(0,userwarnmatrix.indexOf(" "));
var tnas=""+testnum;
if(tnas=="5")
tnas=ttlt;
else
userwarnmatrix=userwarnmatrix.substr(userwarnmatrix.indexOf(" ")+1);
if(tnas=="X") tnas="---";
if(ttlt=="X")
atmenuhtm+="<TD STYLE='color:#AADDDD'>"+tnas+"</TD>";
else
atmenuhtm+="<TD><A HREF=\"javascript:atwarn('"+ttlt+"',"+(testnum==5?true:false)+",'"+(testnum==0?sum0:testnum==1?sum1:testnum==4?sum4:sum23)+"',"+testnum+");\" STYLE='color:#0000FF'>"+tnas+"</A></TD>";
testnum++;
}
userwarnmatrix=userwarnmatrix.substr(userwarnmatrix.indexOf("\n")+1);
rownum++;
if(rownum%2) atmenuhtm+="</TR>";
}
if(!(rownum%2)) atmenuhtm+="</TR>";
atmenuhtm+="</TABLE>"
}
else
{ //not the User Talk namespace
atmenuhtm="<DIV ID='atform'></DIV><TABLE CLASS='atmenu' STYLE='background:#EEFFFF;font-size:x-small'>";
var speedyg=
//G-type speedy deletions, except G8 (which is talkpage only), and G9 (WP:OFFICE actions
//surely can't be done by non-admins!)
//Format: Code%Tag%Name%Description\n
//Note that a code might be listed more than once if there's more than one
//reason for giving it (e.g. G6). Reasons preceded with ! require a parameter
//referring to the original (wikipage for G6 or website/other source for A8).
"G1%db-nonsense%Patent nonsense%No sense can be made of the page's content.\n"+
"G2%db-test%Test pages%Pages created purely for testing purposes.\n"+
"G3%db-vand%Pure vandalism%Pages created for the purposes of vandalism.\n"+
"G4%db-repost%Recreation%Recreations of previously AfDd, etc. pages.\n"+
"G5%db-ban%Banned user contrib%Page created by a user whilst banned.\n"+
"G6%!db-histmerge%History merge%<U>Destination</U> of a cut-and-paste page move.\n"+
"G6%!db-move%Blocks a move%Page is in the way of a noncontroversial move.\n"+
"G6%db-disambig%1-link dab%Disambiguation page with one link.\n"+
"G6%db-afd%AfD decision%Not deleted after an AfD closed as <I>delete</I>\n"+
"G7%db-author%Mistaken creation%Only one contributor, who created the page by mistake.\n";
//G8 is a talk page, G9 is WP:OFFICE and therefore likely to be admin-only
var speedyo=
//Same format. Set up as A-space by default, then modified for other spaces if needed.
"A1%db-context%No context%Very short, doesn't provide enough context to expand.\n"+
"A2%db-foreign%Not English%Not in English, and exists on the relevant non-English Misplaced Pages.\n"+
"A3%db-a3%No content%Consists only of links and rephrasings of the title.\n"+
"A3%db-contact%Attempt to contact%Purely an attempt to contact the subject of the article.\n"+
"A3%db-blankcsd%Blanked CSD%Page is blank, and all revisions were speediable.\n"+
//A4 no longer exists.
"A5%db-transwiki%Transwikied%Pages transwikied after an AfD debate.\n"+
"A6%db-attack%Attack page%Page created purely to disparage its subject.\n"+
"A7%db-bio%Non-notable person%Article about 1+ people with no notability assertion.\n"+
"A8%!db-copyvio%Speedy copyvio%Copyvio from commercial material within past 48 hours.\n"+
//Mix some default prods in with the speedy reasons.
"PROD%subst:prod|non-notable%Non-notable%(prod, not a speedy)\n"+
"PROD%subst:prod|neologism%Neologism%(prod, not a speedy)\n"+
"PROD%subst:prod|]%Original research%(prod, not a speedy)\n"+
"PROD%subst:prod|spam%Spam%(prod, not a speedy)\n"+
"PROD%subst:prod|]%Things made up in school one day%(prod, not a speedy)\n";
//Don't check Image-space yet; that's somewhat complicated.
if(location.href.indexOf("Category:")!=-1)
speedyo=
"C1%db-catempty%Empty category%Empty category for 4 days, with no content.\n"+
//C2 has no speedy tag, as it requires extra action.
"C3%db-catfd%Template category%Category populated only through deleted-template transclusions.\n";
if(location.href.indexOf("User:")!=-1)
speedyo=
"U1%db-userreq%User request%User subpage deletion request by its 'owner'.\n"+
"U2%db-nouser%No such user%Userpage of a non-existent user.\n";
if(location.href.indexOf("Template:")!=-1)
speedyo=
"T1%db-disparage%Divisive template%Divisive and inflammatory template.\n";
if(location.href.indexOf("Portal:")!=-1)
speedyo=
//P1 subreasons are A1 speedy reasons.
"P1:A1%db-context%No context%Very short, doesn't provide enough context to expand.\n"+
"P1:A2%db-foreign%Not English%Not in English, and exists on the relevant non-English Misplaced Pages.\n"+
"P1:A3%db-a3%No content%Consists only of links and rephrasings of the title.\n"+
"P1:A3%db-contact%Attempt to contact%Purely an attempt to contact the subject of the portal.\n"+
"P1:A3%db-blankcsd%Blanked CSD%Portal is blank, and all revisions were speediable.\n"+
//A4 no longer exists.
"P1:A5%db-transwiki%Transwikied%Portal transwikied after an AfD debate.\n"+
"P1:A6%db-attack%Attack page%Portal created purely to disparage its subject.\n"+
"P1:A7%db-bio%Non-notable person%Portal about 1+ people with no notability assertion.\n"+
"P1:A8%!db-copyvio%Speedy copyvio%Copyvio from commercial material within past 48 hours.\n"+
"P2%db-emptyportal%Empty portal%Portal with no header article or less than 3 subarticles.\n";
if(location.href.indexOf("talk:")!=-1||location.href.indexOf("Talk:")!=-1)
speedyo=
//Talk pages
"G8%db-talk%Broken talk page%Non-user, non-subpage Talk page of non-existent page.\n";
speedyo+=
//Allow prodding for any reason.
"PROD%!subst:prod%Propose deletion%Any other reason, for a not-previously-prodded page.\n";
var dbplate;
while(speedyg!="")
{
atmenuhtm+="<TR>";
if(speedyg!="")
{
atmenuhtm+="<TD>"+speedyg.substr(0,speedyg.indexOf("%"))+"</TD>";
speedyg=speedyg.substr(speedyg.indexOf("%")+1);
dbplate=speedyg.substr(0,speedyg.indexOf("%"));
speedyg=speedyg.substr(speedyg.indexOf("%")+1);
atmenuhtm+="<TD><B><A HREF='javascript:atspeedy(\""+dbplate+"\");'>";
atmenuhtm+="<FONT COLOR='#0000FF'>";
atmenuhtm+=speedyg.substr(0,speedyg.indexOf("%"))+"</FONT>";
speedyg=speedyg.substr(speedyg.indexOf("%")+1);
atmenuhtm+="</A></B></TD><TD>"+speedyg.substr(0,speedyg.indexOf("\n"))+"</TD>";
speedyg=speedyg.substr(speedyg.indexOf("\n")+1);
}
atmenuhtm+="</TR>";
}
while(speedyo!="")
{
atmenuhtm+="<TR>";
if(speedyo!="")
{
atmenuhtm+="<TD>"+speedyo.substr(0,speedyo.indexOf("%"))+"</TD>";
speedyo=speedyo.substr(speedyo.indexOf("%")+1);
dbplate=speedyo.substr(0,speedyo.indexOf("%"));
speedyo=speedyo.substr(speedyo.indexOf("%")+1);
atmenuhtm+="<TD><B><A HREF='javascript:atspeedy(\""+dbplate+"\");'>";
atmenuhtm+="<FONT COLOR='#0000FF'>";
atmenuhtm+=speedyo.substr(0,speedyo.indexOf("%"))+"</FONT>";
speedyo=speedyo.substr(speedyo.indexOf("%")+1);
atmenuhtm+="</A></B></TD><TD>"+speedyo.substr(0,speedyo.indexOf("\n"))+"</TD>";
speedyo=speedyo.substr(speedyo.indexOf("\n")+1);
}
atmenuhtm+="</TR>";
}
atmenuhtm+="</TABLE>";
}
atmenu.innerHTML=atmenuhtm;
}
});
//Autopurge. I wrote this one.
addOnloadHook(function() {
if(location.href=="http://en.wikipedia.org/User:Ais523" || location.href=="http://en.wikipedia.org/User:ais523") location.href="http://en.wikipedia.org/search/?title=User:Ais523&action=purge";
});
//This could also be applied to other pages.
//My edit counter, development version
document.write('<sc'+'ript type="text/javascript" src="'
+ 'http://en.wikipedia.org/search/?'
+ 'title=User:ais523/editcountdev.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></scr'+'ipt>');
//Per ] revision 67651803, making a script to remove the ezproxy link from pages
addOnloadHook(function() {
if(location.href.indexOf('action=edit;)!=-1)
addTab("javascript:removeEZ();","rem ez","ca-rmez","Remove ezproxy references","");
});
function removeEZ()
{
document.editform.wpTextbox1=document.editform.wpTextbox1.split('ezproxy.auckland.ac.nz').join('');
document.editform.wpSummary.value='Repaired external link proxy rewrites using ]';
document.editform.wpDiff.click(); //to check
}
//Conditional inclusion of popups (these are a prereq for the easytag script)
document.write('<sc'+'ript type="text/javascript" src="'
+ 'http://en.wikipedia.org/search/?title=User:ais523/monobook.js/popupson.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></scr'+'ipt>');
/*
</nowiki></pre>
*/
User:Ais523/monobook.js: Difference between revisions
Add topic