User:Discospinster/modern.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
The accompanying .css page for this skin can be added at User:Discospinster/modern.css. |
<!-- RECENT CHANGES -->
// Script from [[User:Lupin/recent2.js]]
mw.loader.load(
'https://en.wikipedia.org/w/index.php?title=User:Lupin/recent2.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s');
<!-- POPUPS -->
// [[User:Lupin/popups.js]]
importScript('User:Lupin/popups.js');
popupFixDabs=true;
//
<!-- USER WARNING SCRIPT -->
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 page = prompt("Vandalism to which article?")
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += "{{subst:" + "uw-vandalism" + number + "|" + page + "}} ~" + "~" + "~" + "~";
f.wpSummary.value = "Your edits to [[" + page + "]]";
f.wpMinoredit.checked = false;
f.wpWatchthis.checked = false;
}
function add_testn_tabs()
{
var c1 = document.getElementById('column-one');
var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];
// Only add for pages with "Editing User talk:" somewhere in the title
if (document.title.indexOf("Editing User talk:") != -1)
{
tabs.appendChild(tnaddlilink('javascript:testn(1)',"t1"));
tabs.appendChild(tnaddlilink('javascript:testn(2)',"t2"));
tabs.appendChild(tnaddlilink('javascript:testn(3)',"t3"));
tabs.appendChild(tnaddlilink('javascript:testn(4)',"t4"));
}
}
$(add_testn_tabs);
<!--TWINKLE-->
importScript('User:AzaToth/morebits.js');
importScript('User:AzaToth/twinklespeedy.js');
importScript('User:AzaToth/twinklexfd.js');
importScript('User:AzaToth/twinklewarn.js');
importScript('User:AzaToth/twinkleprod.js');
TwinkleConfig = {
showSharedIPNotice : true,
summaryAd : " using [[WP:TWINKLE|TW]]",
deletionSummaryAd : " using [[WP:TWINKLE|TW]]",
protectionSummaryAd : " using [[WP:TWINKLE|TW]]",
watchWarnings : false,
markAIVReportAsMinor : false,
};
if( typeof( TwinkleConfig ) == 'undefined' ) TwinkleConfig = {}; // DO NOT REMOVE THIS LINE - ALL TWINKLE SETTINGS AFTER THIS
TwinkleConfig.notifyUserOnSpeedyDeletionNomination = [ 'g1', 'g2', 'g3', 'g4', 'g10', 'g11', 'g12', 'a1', 'a2', 'a3', 'a5', 'a7', 'a9', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f9', 'f10', 'f11', 'u3', 't2', 't3', 'p2' ];
TwinkleConfig.offerReasonOnNormalRevert = true;
TwinkleConfig.openTalkPage = [];
TwinkleConfig.openTalkPageOnAutoRevert = false;
TwinkleConfig.openUserTalkPageOnSpeedyDelete = [];
TwinkleConfig.watchSpeedyPages = [ 'g1', 'g2', 'g3', 'g4', 'g10', 'g11', 'g12', 'a1', 'a2', 'a3', 'a5', 'a7', 'a9', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f9', 'f10', 'f11', 'u3', 't2', 't3', 'p2' ];
<!-- HIDE MY CONTRIBS -->
// [[User:Ais523/hidetopcontrib.js]]
// By a suggestion by [[User:Discospinster]]
// This script color-codes lines according to who has the top contribution for a page.
//<pre><nowiki>
function hidetopcontrib()
{
var i,li,a;
li=document.getElementById("bodyContent");
li=li.getElementsByTagName("li");
i=-1;
a=new Array();
while(++i<li.length)
{
var s,t;
t=li[i].innerHTML.match(/"\/wiki\/([^"]*)"/)[1];
if(li[i].getElementsByTagName("strong").length>0)
s="none";
else
s="";
if(a[t]!=undefined) s=a[t]; else a[t]=s;
if(s!="") li[i].style.display=(li[i].style.display=="none"?"list-item":"none");
}
}
$(function () {
if((location.href.indexOf("Special:Contributions")!=-1||
location.href.indexOf("Special%3AContributions")!=-1)
&&location.href.indexOf("&ais523")==-1&&location.href.indexOf("?ais523")==-1)
mw.util.addPortletLink('p-cactions', 'javascript:hidetopcontrib()', 'show/hide top', 'ca-hidetop',
"Show/hide pages for which you're the top contributor", '');
});
//</nowiki></pre>
//[[Category:Wikipedia scripts]]
<!-- WIKED -->
// install [[User:Cacycle/wikEd]] in-browser text editor
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
+ '&action=raw&ctype=text/javascript"></' + 'script>');
<!-- USER WATCH -->
importScript('User:Tra/userwatchlist.js'); //[[User:Tra/userwatchlist.js]]
<!-- FRIENDLY CONFIGURATION -->
if( typeof( FriendlyConfig ) == 'undefined' ) FriendlyConfig = {}; // DO NOT REMOVE THIS LINE - ALL FRIENDLY SETTINGS AFTER THIS
FriendlyConfig.watchTaggedPages = false;
FriendlyConfig.watchWelcomes = false;
FriendlyConfig.welcomeHeading = "== Welcome ==";