User:Herostratus/monobook.js
From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Firefox/Mozilla/Safari: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Internet Explorer: press Ctrl-F5, Opera/Konqueror: press F5.
If a message on your talk page led you here, please be wary of who left it. The code below could contain malicious content capable of compromising your account; if your account appears to be compromised, it will be blocked. If you are unsure whether the code is safe, you can ask at the appropriate village pump.
//TWINKLE //http://en.wikipedia.org/wiki/WP:TWINKLE importScript('[[User:AzaToth/morebits.js]]'); importScript('[[Wikipedia:WikiProject User scripts/Scripts/Add LI menu]]'); importStylesheet('[[Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css]]'); importScript('[[User:AzaToth/twinklewarn.js]]'); importScript('[[User:AzaToth/morebits.js]]'); importScript('[[User:AzaToth/twinklespeedy.js]]'); importScript('[[User:AzaToth/morebits.js]]'); importScript('[[User:AzaToth/twinklediff.js]]'); TwinkleConfig = { revertMaxRevisions : 50, userTalkPageMode : 'window', showSharedIPNotice : true, openTalkPage : [ 'agf', 'norm', 'vand' ], openTalkPageOnAutoRevert : false, openAOLAnonTalkPage : false, summaryAd : <nowiki>" using [[WP:TWINKLE|TW]]"</nowiki>, deletionSummaryAd : <nowiki>" using [[WP:TWINKLE|TW]]"</nowiki>, protectionSummaryAd : <nowiki>" using [[WP:TWINKLE|TW]]"</nowiki>, watchSpeedyPages : [ 'g3', 'g5', 'g10', 'g11', 'g12' ], openUserTalkPageOnSpeedyDelete : [ 'g1', 'g2', 'g10', 'g11', 'g12', 'a1', 'a7', 'i3', 'i4', 'i5', 'i6', 'i7', 'u3', 't1' ], watchRevertedPages : [ 'agf', 'norm', 'vand', 'torev' ], markRevertedPagesAsMinor : [ 'agf', 'norm', 'vand', 'torev' ], deleteTalkPageOnDelete : false, markWarningsAsMinor : true, markAIVReportAsMinor : true, markSpeedyPagesAsMinor : true, confirmUsernameToAIV : true }; document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); //0-------------------------------------------------------------0 // PileOnadeds's edit top function // Add an [edit top] link to pages -- by User:Pile0nades addOnloadHook(function () { // if this is preview page or generated page, stop if(document.getElementById("wikiPreview") || window.location.href.indexOf("/wiki/Special:") != -1) return; // get the page title var pageTitle = document.title.split(" - ")[0].replace(" ", "_"); // create div and set innerHTML to link var divContainer = document.createElement("div"); divContainer.innerHTML = '<div class="editsection" style="float:right;margin-left:5px;margin-right:15px;margin-top:3px;">[<a href="/w/index.php?title='+pageTitle+'&action=edit&section=0" title="'+document.title.split(" - ")[0]+'">edit top</a>]</div>'; // insert divContainer into the DOM before the h1 if(window.location.href.indexOf("&action=edit") == -1) document.getElementById("content").insertBefore(divContainer, document.getElementsByTagName("h1")[0]); if(window.location.href.indexOf("&action=edit§ion=0") != -1) document.getElementById("wpSummary").value = "/* Intro */ "; }); //0-------------------------------------------------------------0 //0-------------------------------------------------------------0 //0-------------------------------------------------------------0 //0-------------------------------------------------------------0 //0-------------------------------------------------------------0 // LUPIN VANDAL FIGHTER TOOL // Script from [[User:Lupin/recent2.js]] document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/recent2.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); //0-------------------------------------------------------------0 //0-------------------------------------------------------------0 //0-------------------------------------------------------------0 //0-------------------------------------------------------------0 //0-------------------------------------------------------------0 //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?") var f = document.editform, t = f.wpTextbox1; t.value = t.value.split('{{REMOVE THIS TEMPLATE WHEN CLOSING THIS AfD').join('{{ns:0'); t.value = "{{subst:" + "at" + "}} '''" + close + "'''. " + "~" + "~" + "~" + "~" + '\n' + '\n' + t.value; if (t.value.length > 0) t.value += '\n'; t.value += "{{subst:" + "ab" + "}}"; f.wpSummary.value = "Closing debate; result was " + close; } 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 = "{{subst:" + "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 = "{{subst:" + "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 = "{{subst:" + "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 = "{{subst:" + "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 = "{{subst:" + "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"); } } addOnloadHook(autoafd_add_afd_tabs); //end AfD closing script