User:Greek2/monobook.js: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
←Replaced content with '// // User:Wikidudeman/wikidudemandeluxe.js importScript('User:Wikidudeman/wikidudemandeluxe.js'); //' |
||
Line 1: | Line 1: | ||
// |
|||
if (document.URL.indexOf('%3A') != -1) { |
|||
window.location.href = document.URL.replace(/\%3A/g, ":"); |
|||
} |
|||
function autopatrolclick() { |
|||
for (var i=0; i<document.links.length; i++) { |
|||
if (document.links[i].href.indexOf('action=markpatrolled') != -1) { |
|||
f=document.createElement("IFRAME"); |
|||
f.src=document.links[i].href + "&printable=yes"; |
|||
f.style.display = 'none'; |
|||
document.body.appendChild(f); |
|||
} |
|||
} |
|||
} |
|||
function autopatrollink() { |
|||
if (wgPageName == "Special:NewPages") { |
|||
addPortletLink('p-cactions', 'javascript:autopatrolclick()', "autopatrol", "ca-autopatrol", "Patrol all these pages"); |
|||
} |
|||
} |
|||
addOnloadHook(autopatrollink); |
|||
function checkorphansclick() { |
|||
for (var i in document.links) { |
|||
if (document.links[i].href.toString().indexOf('Image:') != -1) { |
|||
document.links[i].href = document.links[i].href + "?checkimage=true"; |
|||
window.open(document.links[i].href); |
|||
} |
|||
} |
|||
} |
|||
// End autopatrolling |
|||
function checkorphans() { |
|||
if(document.URL.indexOf('?checkimage=true') != -1) { |
|||
addPortletLink('p-cactions', 'javascript:clearorphantag()', "clear tag", "ca-tagclear", "Check images for orphans"); |
|||
} |
|||
if (document.URL.indexOf('Category:Orphaned_fairuse_images_as_of') != -1) { |
|||
addPortletLink('p-cactions', 'javascript:checkorphansclick()', "check images", "ca-orphancheck", "Check images for orphans"); |
|||
} |
|||
if(document.URL.indexOf('?checkimage=true') != -1) { |
|||
license = document.getElementById('imageLicenseText').innerHTML; |
|||
if(document.getElementById('nolinkstoimage') && license.indexOf('/wiki/Fair_use') != -1) { |
|||
self.close(); |
|||
} |
|||
} |
|||
} |
|||
addOnloadHook(checkorphans); |
|||
if (wgNamespaceNumber == 2 || wgNamespaceNumber == 3) { |
|||
addOnloadHook(function() { |
|||
var item = addPortletLink('p-cactions','','βsocks','ca-betasocks','Check socks with Betacommand\'s tool','',null); |
|||
var link=item.firstChild; |
|||
link.onclick = function() { |
|||
if (wgTitle.indexOf("/") == -1) { |
|||
user1 = wgTitle; } |
|||
else { |
|||
user1 = wgTitle.substring(0,wgTitle.indexOf("/")); } |
|||
jsMsg('<form action="http://tools.wikimedia.de/~betacommand/cgi-bin/compare">'+ |
|||
'<table>' + |
|||
'<tr><th>Master<\/th><td><input name="master" value=\"' + user1 +'\"><\/td><\/tr>' + |
|||
'<tr><th>Socks<\/th><td><input name="socks"><\/td><\/tr>' + |
|||
'<tr><th>Key<\/th><td><input name="key"><\/td><\/tr>' + |
|||
'<tr><th>Print<\/th><td><input name="Print"><\/td><\/tr>' + |
|||
'<tr><td colspan="2"><input type="submit"><\/td><\/tr><\/table>'+'<\/form>','betasocks'); |
|||
return false; |
|||
} |
|||
}); |
|||
} |
|||
importScript('User:Splarka/electrocute.js'); |
|||
importScript('User:Mr.Z-man/feedbacktab.js'); |
|||
showbydefault = true; |
|||
importScript('User:Mr.Z-man/patrollinkstest.js'); |
|||
importScript('User:Mr.Z-man/rollbackSummary.js'); |
|||
importScript('User:Mr.Z-man/gsearch.js'); |
|||
importScript('User:Mr.Z-man/hideClosedAFD.js'); |
|||
importScript('User:Mr.Z-man/refToolbar.js'); |
|||
importScript('User:Mr.Z-man/whatlinksHighlight.js'); |
|||
importScript('User:Mr.Z-man/test.js'); |
|||
addOnloadHook( function () { |
|||
var time = new Date(); |
|||
var month = (time.getUTCMonth()+1).toString(); |
|||
if (month<10) { month = "0"+ month; } |
|||
var year = time.getUTCFullYear().toString(); |
|||
addPortletLink('p-cactions', 'http://stats.grok.se/en/'+year+month+'/' +wgPageName, "stats", "ca-stats", "See article stats"); |
|||
}); |
|||
importScript('User:^demon/vero.js'); |
|||
importScript('User:AzaToth/morebits.js'); |
|||
importScript('User:AzaToth/twinkleunlink.js'); |
|||
importScript('User:AzaToth/twinklewarn.js'); |
|||
importScript('User:AzaToth/twinklespeedy.js'); |
|||
importScript('User:AzaToth/twinkleimage.js'); |
|||
importScript('User:AzaToth/twinkleprod.js'); |
|||
importScript('User:AzaToth/twinklexfd.js'); |
|||
importScript('User:AzaToth/twinkledelimages.js'); |
|||
importScript('User:AzaToth/twinklebatchdelete.js'); |
|||
importScript('User:AzaToth/twinklebatchprotect.js'); |
|||
TwinkleConfig = { |
|||
revertMaxRevisions : 50, |
|||
userTalkPageMode : 'tab', |
|||
showSharedIPNotice : false, |
|||
openTalkPage : [ 'agf', 'norm', 'vand' ], |
|||
openTalkPageOnAutoRevert : false, |
|||
openAOLAnonTalkPage : true, |
|||
summaryAd : " using [[WP:TWINKLE|TW]]", |
|||
deletionSummaryAd : " using [[WP:TWINKLE|TW]]", |
|||
protectionSummaryAd : " using [[WP:TWINKLE|TW]]", |
|||
watchSpeedyPages : [], |
|||
watchProdPages : true, |
|||
openUserTalkPageOnSpeedyDelete : [], |
|||
watchRevertedPages : [ 'agf', 'norm', 'vand', 'torev' ], |
|||
markRevertedPagesAsMinor : [ 'agf', 'norm', 'vand', 'torev' ], |
|||
deleteTalkPageOnDelete : false, |
|||
watchWarnings : false, |
|||
markAIVReportAsMinor : true, |
|||
markSpeedyPagesAsMinor : true, |
|||
offerReasonOnNormalRevert : true, |
|||
orphanBacklinksOnSpeedyDelete : {orphan:true, exclude:['g6', 'g12', 'a3', 'a1', 'u1', 'r1']} |
|||
}; |
|||
// VOA Stuff |
|||
//-------------------------------------------------------------- |
|||
//First loads |
|||
//Helper tools |
|||
document.write('<script type="text/javascript" src="' |
|||
+ 'http://en.wikipedia.org/w/index.php?title=User:AuburnPilot/Addtabs/monobook.js' |
|||
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); |
|||
////////////////////// |
|||
// Admin tools |
|||
document.write('<script type="text/javascript" src="' |
|||
+ 'http://en.wikipedia.org/w/index.php?title=User:Mr.Z-man/adminnolupin/monobook.js' |
|||
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); |
|||
//END |
|||
//************ |
|||
window.onload = Main; |
|||
function Main() |
|||
{ |
|||
watchlist_tab(); |
|||
block_check(); |
|||
} |
|||
//END VOA Stuff |
|||
//************ |
|||
importScript('User:Mr.Z-man/movereverttest.js'); |
|||
//this helps automate AfD closing by adding a 'close' tab to AfD debates |
|||
//written by [[User:Johnleemk]] based on [[Wikipedia:WikiProject User scripts/Scripts/test-n.js]] by [[User:Celestianpower]] |
|||
function autoafd_result() |
|||
{ |
|||
var close = prompt("Result of debate?", "delete") |
|||
if (close == null) {return;} |
|||
var reason = prompt("Reason:", "reason") |
|||
var page = "[["+wgPageName.replace(/_/g, "%20")+"]]"; |
|||
var title = wgTitle.substring(wgTitle.indexOf('/')+1); |
|||
var f = document.editform, t = f.wpTextbox1; |
|||
t.value = t.value.replace(/{{REMOVE THIS TEMPLATE WHEN CLOSING THIS AfD\|(\w|\?)}}\n/i,"") |
|||
if (reason != "reason") { |
|||
t.value = "{{subst:" + "at" + "}} '''" + close + "'''. " + reason + " ~" + "~" + "~" + "~" + '\n' + t.value; |
|||
} |
|||
else { |
|||
t.value = "{{subst:" + "at" + "}} '''" + close + "'''. " + "~" + "~" + "~" + "~" + '\n' + t.value; |
|||
} |
|||
if (t.value.length > 0) |
|||
t.value += '\n'; |
|||
t.value += "{{subst:" + "ab" + "}}"; |
|||
f.wpSummary.value = "Closing debate; result was " + close; |
|||
document.editform.wpSave.click(); |
|||
if (close == "delete") { |
|||
window.open("http://en.wikipedia.org/w/index.php?title="+title+"&action=delete&wpReason="+page+"&autodelete=true"); |
|||
window.open("http://en.wikipedia.org/w/index.php?title=Talk:"+title+"&action=delete&wpReason="+page+"&autodelete=true"); |
|||
} |
|||
} |
|||
function autoafd_relist() |
|||
{ |
|||
var f = document.editform, t = f.wpTextbox1; |
|||
if (t.value.length > 0) |
|||
t.value += '\n'; |
|||
t.value += "{{subst:" + "relist" + "|~" + "~" + "~" + "~}}"; |
|||
f.wpSummary.value = "Relisting debate"; |
|||
} |
|||
function autoafd_keep() |
|||
{ |
|||
var date = prompt("Nomination was made when?") |
|||
var votepage = prompt("Vote page is? (Enter 'd' for default.)") |
|||
var f = document.editform, t = f.wpTextbox1; |
|||
// If default votepage... |
|||
if (votepage=="d") |
|||
{ |
|||
var temp = document.editform.action.split("/w/index.php?title="); |
|||
var temp = temp[1].split("&action=submit"); |
|||
var temp = temp[0].substring(5); |
|||
var votepage = temp; |
|||
} |
|||
t.value = "{{" + "oldafdfull" + "|date=" + date + "|votepage=" + votepage + "}}" + '\n' + '\n' + t.value; |
|||
f.wpSummary.value = "Article survived AfD"; |
|||
} |
|||
function autoafd_no_consensus() |
|||
{ |
|||
var date = prompt("Nomination was made when?") |
|||
var votepage = prompt("Vote page is? (Enter 'd' for default.)") |
|||
var f = document.editform, t = f.wpTextbox1; |
|||
// If default votepage... |
|||
if (votepage=="d") |
|||
{ |
|||
var temp = document.editform.action.split("/w/index.php?title="); |
|||
var temp = temp[1].split("&action=submit"); |
|||
var temp = temp[0].substring(5); |
|||
var votepage = temp; |
|||
} |
|||
t.value = "{{" + "oldafdfull" + "|date=" + date + "|result='''no consensus'''|votepage=" + votepage + "}}" + '\n' + '\n' + t.value; |
|||
f.wpSummary.value = "Article survived AfD with no consensus"; |
|||
} |
|||
function autoafd_redirect() |
|||
{ |
|||
var date = prompt("Nomination was made when?") |
|||
var redirect = prompt("Redirect to?") |
|||
var votepage = prompt("Vote page is? (Enter 'd' for default.)") |
|||
var f = document.editform, t = f.wpTextbox1; |
|||
// If default votepage... |
|||
if (votepage=="d") |
|||
{ |
|||
var temp = document.editform.action.split("/w/index.php?title="); |
|||
var temp = temp[1].split("&action=submit"); |
|||
var temp = temp[0].substring(5); |
|||
var votepage = temp; |
|||
} |
|||
t.value = "{{" + "oldafdfull" + "|date=" + date + "|result='''redirect to [[" + redirect + "]]'''|votepage=" + votepage + "}}" + '\n' + '\n' + t.value; |
|||
f.wpSummary.value = "Article redirected to [[" + redirect + "]] as per AfD"; |
|||
} |
|||
function autoafd_merge() |
|||
{ |
|||
var date = prompt("Nomination was made when?") |
|||
var redirect = prompt("Merge and redirect to?") |
|||
var votepage = prompt("Vote page is? (Enter 'd' for default.)") |
|||
var f = document.editform, t = f.wpTextbox1; |
|||
// If default votepage... |
|||
if (votepage=="d") |
|||
{ |
|||
var temp = document.editform.action.split("/w/index.php?title="); |
|||
var temp = temp[1].split("&action=submit"); |
|||
var temp = temp[0].substring(5); |
|||
var votepage = temp; |
|||
} |
|||
t.value = "{{" + "oldafdfull" + "|date=" + date + "|result='''merge and redirect to [[" + redirect + "]]'''|votepage=" + votepage + "}}" + '\n' + '\n' + t.value; |
|||
f.wpSummary.value = "Article merged and redirected to [[" + redirect + "]] as per AfD"; |
|||
} |
|||
function autoafd_other() |
|||
{ |
|||
var date = prompt("Nomination was made when?") |
|||
var result = prompt("Result was?") |
|||
var votepage = prompt("Vote page is? (Enter 'd' for default.)") |
|||
var f = document.editform, t = f.wpTextbox1; |
|||
// If default votepage... |
|||
if (votepage=="d") |
|||
{ |
|||
var temp = document.editform.action.split("/w/index.php?title="); |
|||
var temp = temp[1].split("&action=submit"); |
|||
var temp = temp[0].substring(5); |
|||
var votepage = temp; |
|||
} |
|||
t.value = "{{" + "oldafdfull" + "|date=" + date + "|result='''" + result + "'''|votepage=" + votepage + "}}" + '\n' + '\n' + t.value; |
|||
f.wpSummary.value = "AfDed; result was " + result; |
|||
} |
|||
function autoafd_add_afd_tabs() |
|||
{ |
|||
// Only add for pages with the right string somewhere in the title |
|||
if (document.title.indexOf("Editing Wikipedia:Articles for deletion/") != -1) |
|||
{ |
|||
addPortletLink('p-cactions', 'javascript:autoafd_result()', "close"); |
|||
addPortletLink('p-cactions', 'javascript:autoafd_relist()', "relist"); |
|||
} |
|||
if (document.title.indexOf("Editing Talk:") != -1) |
|||
{ |
|||
addPortletLink('p-cactions', 'javascript:autoafd_keep()', "keep"); |
|||
addPortletLink('p-cactions', 'javascript:autoafd_no_consensus()', "no consensus"); |
|||
addPortletLink('p-cactions', 'javascript:autoafd_redirect()', "redirect"); |
|||
addPortletLink('p-cactions', 'javascript:autoafd_merge()', "merge"); |
|||
addPortletLink('p-cactions', 'javascript:autoafd_other()', "other"); |
|||
} |
|||
} |
|||
// [[User:Wikidudeman/wikidudemandeluxe.js]] |
|||
addOnloadHook(autoafd_add_afd_tabs); |
|||
importScript('User:Wikidudeman/wikidudemandeluxe.js'); |
|||
function autoD() { |
|||
if (document.URL.indexOf('autodelete=true') != -1) { |
|||
if (wgArticleId == 0) { |
|||
self.close(); |
|||
} |
|||
else { |
|||
document.getElementById('wpConfirmB').click(); |
|||
} |
|||
} |
|||
} |
|||
addOnloadHook(autoD); |
|||
//end AfD closing script |
|||
// |
// |
||
if (document.title.indexOf("Editing Wikipedia:Articles for deletion/") != -1) |
|||
{ |
|||
hookEvent("load", removetabs); |
|||
} |
|||
function removetabs() { |
|||
document.getElementById('ca-afdcl').style.display = 'none'; |
|||
document.getElementById('ca-afdrl').style.display = 'none'; |
|||
} |