Revision as of 07:48, 26 April 2010 editRockyman512 (talk | contribs)238 editsNo edit summary← Previous edit | Revision as of 07:50, 26 April 2010 edit undoRockyman512 (talk | contribs)238 editsNo edit summaryNext edit → | ||
Line 3: | Line 3: | ||
] | ] | ||
//<pre><nowiki> | |||
===Monobook.js script (Addtabs)=== | |||
//IMPORTS | |||
'''Add Tabs''' | |||
importScript('User:Voice_of_All/Addtabs/monobook.js'); | |||
From the ''user scripts'' project. This adds the common "Addtab" function. You NEED for the below scripts to work. | |||
importScript('User:Voice_of_All/UTCclock.js'); | |||
importScript('User:Voice_of_All/Revert.js'); | |||
(please copy from edit mode to assure correct JS) | |||
importScript('User:Voice_of_All/History/monobook.js'); | |||
---- | |||
<nowiki> Helper tools | |||
importScript('User:Lightdarkness/aiv.js'); | |||
//</nowiki></pre> | |||
//<pre><nowiki> | |||
// ] - please include this line | |||
document.write('<script type="text/javascript" src="' | document.write('<script type="text/javascript" src="' | ||
+ 'http://en.wikipedia.org/search/?title=User: |
+ 'http://en.wikipedia.org/search/?title=User:Lupin/popupsdev.js' | ||
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); | + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); | ||
popupStructure='shortmenus'; | |||
</nowiki> | |||
popupSubpopups=false; | |||
// ] - please include this line | |||
document.write('<script type="text/javascript" src="' | |||
+ 'http://en.wikipedia.org/search/?title=User:Lupin/recent2.js' | |||
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); | |||
//</nowiki></pre> | |||
//<pre><nowiki> | |||
// ============= test-n.js ============== | |||
function tnaddlilink(url, name) | |||
{ | |||
var na = document.createElement('a'); | |||
na.setAttribute('href', url); | |||
var txt = document.createTextNode(name); | |||
na.appendChild(txt); | |||
var li = document.createElement('li'); | |||
li.appendChild(na); | |||
return li; | |||
} | |||
function testn(number) | |||
{ | |||
var IPnote = ''; | |||
if (document.title.split(' - ').split('.').length == 4) | |||
{IPnote = "''If this is an ], and it is shared by multiple users, ignore this warning if you did not make any ] edits.'' ";} | |||
var varticle = ''; | |||
if (location.href.indexOf('&vanarticle=') != -1) | |||
{varticle = ' to .split('&').replace(/(Image|Category):/i,':$1:')) + ']]';} | |||
var f = document.editform, t = f.wpTextbox1; | |||
if (t.value.length > 0) | |||
t.value += '\n'; | |||
t.value +="====" + "Regarding edits made during ] ] (])" + varticle + "====" + "\n" + "{{subst:" + "test" + number + "}} " + IPnote + "~" + "~" + "~" + "~"; | |||
f.wpSummary.value = "User notice:" + " test" + number; | |||
} | |||
function warningn() | |||
{ | |||
var IPnote = ''; | |||
if (document.title.split(' - ').split('.').length == 4) | |||
{IPnote = "''If this is an ], and it is shared by multiple users, ignore this warning if you did not make any ] edits.'' ";} | |||
var varticle = ''; | |||
if (location.href.indexOf('&vanarticle=') != -1) | |||
{varticle = ' to .split('&').replace(/(Image|Category):/i,':$1:')) + ']]';} | |||
var f = document.editform, t = f.wpTextbox1; | |||
if (t.value.length > 0) | |||
t.value += '\n'; | |||
t.value +="====" + "Regarding edits made during ] ] (])" + varticle + "====" + "\n" + "{{subst:" + "bv" + "}} " + IPnote + "~" + "~" + "~" + "~"; | |||
f.wpSummary.value = "User notice:" + " bv"; | |||
} | |||
function testbl(number) | |||
{ | |||
var IPnote = ''; | |||
if (document.title.split(' - ').split('.').length == 4) | |||
{IPnote = "''If this is an ], and it is shared by multiple users, ignore this warning if you did not make any ] edits.'' ";} | |||
var varticle = ''; | |||
if (location.href.indexOf('&vanarticle=') != -1) | |||
{varticle = ' to .split('&').replace(/(Image|Category):/i,':$1:')) + ']]';} | |||
var f = document.editform, t = f.wpTextbox1; | |||
if (t.value.length > 0) | |||
t.value += '\n'; | |||
t.value +="====" + "Regarding edits made during ] ] (])" + varticle + "====" + "\n" + "{{subst:" + "Blank" + number + "}} " + IPnote + "~" + "~" + "~" + "~"; | |||
f.wpSummary.value = "User notice:" + " Blank" + number; | |||
} | |||
function spam() | |||
{ | |||
var IPnote = ''; | |||
if (document.title.split(' - ').split('.').length == 4) | |||
{IPnote = "''If this is an ], and it is shared by multiple users, ignore this warning if you did not make any ] edits.'' ";} | |||
var varticle = ''; | |||
if (location.href.indexOf('&vanarticle=') != -1) | |||
{varticle = ' to .split('&').replace(/(Image|Category):/i,':$1:')) + ']]';} | |||
var f = document.editform, t = f.wpTextbox1; | |||
if (t.value.length > 0) | |||
t.value += '\n'; | |||
t.value +="====" + "Regarding edits made during ] ] (])" + varticle + "====" + "\n" + "{{subst:" + "spam}} " + IPnote + "~" + "~" + "~" + "~"; | |||
f.wpSummary.value = "User notice:" + " spam"; | |||
} | |||
function spamn(number) | |||
{ | |||
var IPnote = ''; | |||
if (document.title.split(' - ').split('.').length == 4) | |||
{IPnote = "''If this is an ], and it is shared by multiple users, ignore this warning if you did not make any ] edits.'' ";} | |||
var varticle = ''; | |||
if (location.href.indexOf('&vanarticle=') != -1) | |||
{varticle = ' to .split('&').replace(/(Image|Category):/i,':$1:')) + ']]';} | |||
var f = document.editform, t = f.wpTextbox1; | |||
if (t.value.length > 0) | |||
t.value += '\n'; | |||
t.value +="====" + "Regarding edits made during ] ] (])" + varticle + "====" + "\n" + "{{subst:" + "spam" + number + "}} " + IPnote + "~" + "~" + "~" + "~"; | |||
f.wpSummary.value = "User notice:" + " spam" + number; | |||
} | |||
//Quick warning tabs | |||
addOnloadHook(add_testn_tabs); | |||
function add_testn_tabs() | |||
{ | |||
var c1 = document.getElementById('column-one'); | |||
var tabs = c1.getElementsByTagName('div').getElementsByTagName('ul'); | |||
if (document.title.indexOf("Editing User talk:") != -1) | |||
{ | |||
tabs.appendChild(tnaddlilink('javascript:testn(1)',"t")); | |||
tabs.appendChild(tnaddlilink('javascript:testn(2)',"t2")); | |||
tabs.appendChild(tnaddlilink('javascript:testn(3)',"v")); | |||
tabs.appendChild(tnaddlilink('javascript:warningn()',"w")); | |||
tabs.appendChild(tnaddlilink('javascript:testbl(2)',"b")); | |||
tabs.appendChild(tnaddlilink('javascript:testbl(3)',"b2")); | |||
tabs.appendChild(tnaddlilink('javascript:spam()',"s")); | |||
tabs.appendChild(tnaddlilink('javascript:spamn(2)',"s2")); | |||
if(document.getElementById('ca-delete')) | |||
{ | |||
document.getElementById('ca-delete').firstChild.innerHTML = ''; | |||
} | |||
if(document.getElementById('ca-move')) | |||
{ | |||
document.getElementById('ca-move').firstChild.innerHTML = ''; | |||
} | |||
if(document.getElementById('ca-watch')) | |||
{ | |||
document.getElementById('ca-watch').firstChild.innerHTML = ''; | |||
} | |||
if(document.getElementById('ca-unwatch')) | |||
{ | |||
document.getElementById('ca-unwatch').firstChild.innerHTML = ''; | |||
} | |||
if(document.getElementById('ca-edit')) | |||
{ | |||
document.getElementById('ca-edit').firstChild.innerHTML = 'Edit'; | |||
} | |||
if(document.getElementById('ca-talk')) | |||
{ | |||
document.getElementById('ca-talk').firstChild.innerHTML = 'Talk'; | |||
} | |||
if(document.getElementById('ca-protect')) | |||
{ | |||
document.getElementById('ca-protect').firstChild.innerHTML = 'P (off)'; | |||
} | |||
if(document.getElementById('ca-unprotect')) | |||
{ | |||
document.getElementById('ca-unprotect').firstChild.innerHTML = 'P (on)'; | |||
} | |||
} | |||
} | |||
//</nowiki></pre> | |||
//<pre><nowiki> | |||
//Please leave the following line | |||
//] | |||
//Start db script | |||
//modded by VoA | |||
addOnloadHook(function() | |||
{ | |||
//check if called from deletion request | |||
if (document.title.indexOf("Editing ") != -1 && wgNamespaceNumber !=-1) | |||
{ | |||
if (document.URL.lastIndexOf("&fakeaction=huff") == -1) | |||
return; | |||
if (document.URL.lastIndexOf("&reason=off") != -1) | |||
{ | |||
var type = prompt("Enter criteria for speedy deletion, e.g. A1, G3"); | |||
var f = document.editform, t = f.wpTextbox1; | |||
t.value = "{{db-" + type.toLowerCase() + "}}\n" + t.value; | |||
f.wpSummary.value = "JS: Requesting speedy deletion (])"; | |||
f.wpSave.click(); | |||
return; | |||
} | |||
else if (document.URL.lastIndexOf("&reason=on") != -1) | |||
{ | |||
var type = prompt("Enter reason for speedy deletion"); | |||
var f = document.editform, t = f.wpTextbox1; | |||
t.value = "{{db|" + type + "}}\n" + t.value; | |||
f.wpSummary.value = "JS: Requesting speedy deletion"; | |||
f.wpSave.click(); | |||
return; | |||
} | |||
} | |||
if (window.location.href.search(/Special:|&action=/) != -1) | |||
return; | |||
addTab("javascript:easyDb(0)", "db (csd)", "ca-db0", "Request speedy deletion according to WP:CSD", ""); | |||
addTab("javascript:easyDb(1)", "db (reason)", "ca-db0", "Request speedy deletion with reason", ""); | |||
}); | |||
function easyDb(n) | |||
{ | |||
if (n == 0) | |||
{ | |||
//edit page | |||
var title = document.title.substr(0, document.title.lastIndexOf(' - Misplaced Pages, the free')); | |||
location.assign("/search/?title=" + title + "&action=edit&fakeaction=huff&reason=off"); | |||
} | |||
if (n == 1) | |||
{ | |||
//edit page | |||
var title = document.title.substr(0, document.title.lastIndexOf(' - Misplaced Pages, the free')); | |||
location.assign("/search/?title=" + title + "&action=edit&fakeaction=huff&reason=on"); | |||
} | |||
} | |||
//</nowiki></pre> |
Revision as of 07:50, 26 April 2010
This user is a member of the Counter-Vandalism Unit. |
//
//IMPORTS importScript('User:Voice_of_All/Addtabs/monobook.js'); importScript('User:Voice_of_All/UTCclock.js'); importScript('User:Voice_of_All/Revert.js'); importScript('User:Voice_of_All/History/monobook.js'); importScript('User:Lightdarkness/aiv.js'); //
//
// ] - please include this line document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/search/?title=User:Lupin/popupsdev.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); popupStructure='shortmenus'; popupSubpopups=false; // ] - please include this line document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/search/?title=User:Lupin/recent2.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); //
//
// ============= test-n.js ============== function tnaddlilink(url, name) { var na = document.createElement('a'); na.setAttribute('href', url); var txt = document.createTextNode(name); na.appendChild(txt); var li = document.createElement('li'); li.appendChild(na); return li; } function testn(number) { var IPnote = ''; if (document.title.split(' - ').split('.').length == 4) {IPnote = "''If this is an ], and it is shared by multiple users, ignore this warning if you did not make any ] edits.'' ";} var varticle = ''; if (location.href.indexOf('&vanarticle=') != -1) {varticle = ' to .split('&').replace(/(Image|Category):/i,':$1:')) + ']]';} var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value +="====" + "Regarding edits made during ] ] (])" + varticle + "====" + "\n" + "{{subst:" + "test" + number + "}} " + IPnote + "~" + "~" + "~" + "~"; f.wpSummary.value = "User notice:" + " test" + number; } function warningn() { var IPnote = ''; if (document.title.split(' - ').split('.').length == 4) {IPnote = "''If this is an ], and it is shared by multiple users, ignore this warning if you did not make any ] edits.'' ";} var varticle = ''; if (location.href.indexOf('&vanarticle=') != -1) {varticle = ' to .split('&').replace(/(Image|Category):/i,':$1:')) + ']]';} var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value +="====" + "Regarding edits made during ] ] (])" + varticle + "====" + "\n" + "{{subst:" + "bv" + "}} " + IPnote + "~" + "~" + "~" + "~"; f.wpSummary.value = "User notice:" + " bv"; } function testbl(number) { var IPnote = ''; if (document.title.split(' - ').split('.').length == 4) {IPnote = "''If this is an ], and it is shared by multiple users, ignore this warning if you did not make any ] edits.'' ";} var varticle = ''; if (location.href.indexOf('&vanarticle=') != -1) {varticle = ' to .split('&').replace(/(Image|Category):/i,':$1:')) + ']]';} var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value +="====" + "Regarding edits made during ] ] (])" + varticle + "====" + "\n" + "{{subst:" + "Blank" + number + "}} " + IPnote + "~" + "~" + "~" + "~"; f.wpSummary.value = "User notice:" + " Blank" + number; } function spam() { var IPnote = ''; if (document.title.split(' - ').split('.').length == 4) {IPnote = "''If this is an ], and it is shared by multiple users, ignore this warning if you did not make any ] edits.'' ";} var varticle = ''; if (location.href.indexOf('&vanarticle=') != -1) {varticle = ' to .split('&').replace(/(Image|Category):/i,':$1:')) + ']]';} var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value +="====" + "Regarding edits made during ] ] (])" + varticle + "====" + "\n" + "{{subst:" + "spam}} " + IPnote + "~" + "~" + "~" + "~"; f.wpSummary.value = "User notice:" + " spam"; } function spamn(number) { var IPnote = ''; if (document.title.split(' - ').split('.').length == 4) {IPnote = "''If this is an ], and it is shared by multiple users, ignore this warning if you did not make any ] edits.'' ";} var varticle = ''; if (location.href.indexOf('&vanarticle=') != -1) {varticle = ' to .split('&').replace(/(Image|Category):/i,':$1:')) + ']]';} var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value +="====" + "Regarding edits made during ] ] (])" + varticle + "====" + "\n" + "{{subst:" + "spam" + number + "}} " + IPnote + "~" + "~" + "~" + "~"; f.wpSummary.value = "User notice:" + " spam" + number; } //Quick warning tabs addOnloadHook(add_testn_tabs); function add_testn_tabs() { var c1 = document.getElementById('column-one'); var tabs = c1.getElementsByTagName('div').getElementsByTagName('ul'); if (document.title.indexOf("Editing User talk:") != -1) { tabs.appendChild(tnaddlilink('javascript:testn(1)',"t")); tabs.appendChild(tnaddlilink('javascript:testn(2)',"t2")); tabs.appendChild(tnaddlilink('javascript:testn(3)',"v")); tabs.appendChild(tnaddlilink('javascript:warningn()',"w")); tabs.appendChild(tnaddlilink('javascript:testbl(2)',"b")); tabs.appendChild(tnaddlilink('javascript:testbl(3)',"b2")); tabs.appendChild(tnaddlilink('javascript:spam()',"s")); tabs.appendChild(tnaddlilink('javascript:spamn(2)',"s2")); if(document.getElementById('ca-delete')) { document.getElementById('ca-delete').firstChild.innerHTML = ''; } if(document.getElementById('ca-move')) { document.getElementById('ca-move').firstChild.innerHTML = ''; } if(document.getElementById('ca-watch')) { document.getElementById('ca-watch').firstChild.innerHTML = ''; } if(document.getElementById('ca-unwatch')) { document.getElementById('ca-unwatch').firstChild.innerHTML = ''; } if(document.getElementById('ca-edit')) { document.getElementById('ca-edit').firstChild.innerHTML = 'Edit'; } if(document.getElementById('ca-talk')) { document.getElementById('ca-talk').firstChild.innerHTML = 'Talk'; } if(document.getElementById('ca-protect')) { document.getElementById('ca-protect').firstChild.innerHTML = 'P (off)'; } if(document.getElementById('ca-unprotect')) { document.getElementById('ca-unprotect').firstChild.innerHTML = 'P (on)'; } } } //
//
//Please leave the following line //] //Start db script //modded by VoA addOnloadHook(function() { //check if called from deletion request if (document.title.indexOf("Editing ") != -1 && wgNamespaceNumber !=-1) { if (document.URL.lastIndexOf("&fakeaction=huff") == -1) return; if (document.URL.lastIndexOf("&reason=off") != -1) { var type = prompt("Enter criteria for speedy deletion, e.g. A1, G3"); var f = document.editform, t = f.wpTextbox1; t.value = "{{db-" + type.toLowerCase() + "}}\n" + t.value; f.wpSummary.value = "JS: Requesting speedy deletion (])"; f.wpSave.click(); return; } else if (document.URL.lastIndexOf("&reason=on") != -1) { var type = prompt("Enter reason for speedy deletion"); var f = document.editform, t = f.wpTextbox1; t.value = "{{db|" + type + "}}\n" + t.value; f.wpSummary.value = "JS: Requesting speedy deletion"; f.wpSave.click(); return; } } if (window.location.href.search(/Special:|&action=/) != -1) return; addTab("javascript:easyDb(0)", "db (csd)", "ca-db0", "Request speedy deletion according to WP:CSD", ""); addTab("javascript:easyDb(1)", "db (reason)", "ca-db0", "Request speedy deletion with reason", ""); }); function easyDb(n) { if (n == 0) { //edit page var title = document.title.substr(0, document.title.lastIndexOf(' - Misplaced Pages, the free')); location.assign("/search/?title=" + title + "&action=edit&fakeaction=huff&reason=off"); } if (n == 1) { //edit page var title = document.title.substr(0, document.title.lastIndexOf(' - Misplaced Pages, the free')); location.assign("/search/?title=" + title + "&action=edit&fakeaction=huff&reason=on"); } } //Category: