Jump to content

User:Discospinster/modern.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
<!-- 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 ==";