Jump to content

User:Phantomsteve/monobook.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.
///// Admin tools...

// Adds a link in the toolbox to Special:Userrights
importScript('User:X!/userrights.js');

// add link to Admin Dashboard
importScript('User:Plastikspork/admindash.js');

// Mass rollback
importScript('User:John254/mass rollback.js');

// Mr.Z-man's AfD closing script
//importScript('User:Mr.Z-man/closeAFD.js');
//notifyByDefaultDec = true; // notify if declined
//importScript('User:Mr.Z-man/hideClosedAFD.js'); //hide closed AfDs

// Close AFD
//importScript('Wikipedia:WikiProject User scripts/Scripts/CloseAFD.js');

// closexfd.js - a compilation of 5 scripts
// written by [[User:King of Hearts]], modified from
// [[Wikipedia:WikiProject User scripts/Scripts/CloseAFD.js]] by [[User:Johnleemk]]
// and [[User:Lifebaka/closedrv.js]] by [[User:Lifebaka]]

importScript('User:Doug/closetfd.js');
importScript('User:King of Hearts/closeffd.js');
importScript('User:King of Hearts/closecfd.js');
importScript('User:King of Hearts/closerfd.js');
importScript('User:Doug/closemfd.js');
importScript('User:Lifebaka/closedrv.js');

// Relist xFd (not AfD)
importScript('User:Phantomsteve/xfdrelist.js');

// A script that helps admins delete speedy deletions much more quickly
importScript('User:Ale_jrb/Scripts/csdhelper.js');  //[[User:Ale_jrb/Scripts]]

//Configuration for CSDHelper
var overwriteDeclineReasons = false;
var notifyByDefaultDel = true;
var logOnDecline = true;
var logOnDeclinePath = 'User:Phantomsteve/Admin/List of declined speedies';
var notifyByDefaultDec = true;
var notifyByDefaultPrd = true;
var notifyLimit = 15;
var notifyByDefaultNew = false;

importScript('User:Phantomsteve/csdreasons.js'); // Set of custom decline and delete reasons
// End configuration

//See [[User:Drilnoth/personallogs.js/doc]] for details
importScript('User:Drilnoth/personallogs.js');

///// Non-admin tools...

//Easily nominate for speedy del
importScript('Wikipedia:WikiProject User scripts/Scripts/Easy db');

// NW's script: mark all blocked usernames with strike through; all indef blocked with italics + strikethrough
importScript('User:NuclearWarfare/Mark-blocked script.js');

// highlight admin talk etc
importScript('User:Plastikspork/adminrights.js'); //[[User:Plastikspork/adminrights.js]]

// highlight my name in history... does what it says on the tin!
// importScript('User:Gary King/highlight my username in history.js');

// [[User:Steel359/protection.js]] - Easily add responses to [[WP:RFPP]] and protection symbols to pages
//importScript('User:Steel359/protection.js');

// StubTagTab - Allows to easily tag articles with correct stub tags from the stub sorting project
importScript('User:Ais523/stubtagtab2.js');

// Username highlighter - Highlights your username on all pages (to see where someone replied to you)
importScript('User:Ais523/highlightmyname2.js');

// Show status of article (stub, A, ... GA, FA)
importScript('User:Pyrospirit/metadata.js'); //[[User:Pyrospirit/metadata.js]]. 

//citation tool
importScript('User:Smith609/toolbox.js');

// Rami R's RFPP Clerk
importScript('User:Rami_R/rfppClerk.js');
pr_timeout=4;//time until being moved to fulfilled section (in hours)
fr_timeout=6;//time until being removed from fulfilled section (in hours)

// Add current listed articles to watch list (e.g. Special:Unwatched pages)
importScript('User:R3m0t/handywatch.js');

// display only edits made by a certain user
importScript('User:Ale_jrb/Scripts/userhist.js');  //[[User:Ale_jrb/Scripts]]

// [[User:Dr pda/prosesize.js]] and [[User:Dr pda/persondata.js]]
importScript('User:Dr pda/prosesize.js');
importScript('User:Dr pda/persondata.js'); 

// Hide/Show Huggle edits
function hidehugcontrib()
{
  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].innerHTML.match(/\(\<a href=\"\/wiki\/Wikipedia:HG\" class=\"mw\-redirect\" title=\"Wikipedia:HG\"\>HG\<\/a\>/))
      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");
  }
}

addOnloadHook(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:hidehugcontrib()', 'show/hide huggle edits', 'ca-hidehug',
                   "Show/hide pages made using Huggle", '');
});

// AutoEd functions
importScript('Wikipedia:AutoEd/complete.js');

// Gracenote's Rollback Summary
importScript('User:Gracenotes/rollback.js');

// Cameltrader's Wiki advisor
importScript('User:Cameltrader/Advisor.js');

// DStoykov's DEFAULTSORT
importScript('User:DStoykov/defaultsort.js');

// Js's URL Decoder
importScript('User:Js/urldecoder.js');

// [[User:Dschwen/highlightredirects.js]] - please include this line
mw.loader.load('https://wiki.riteme.site/w/index.php?title=User:Dschwen/highlightredirects.js'
             + '&action=raw&ctype=text/javascript');

//Wikipedia:WikiProject User scripts/Scripts/Watchlist since
// Adds a "Changes since last load" link to your watchlist.

addOnloadHook(function () {
    if (!mw.config.get('wgCanonicalSpecialPageName') || mw.config.get('wgCanonicalSpecialPageName') != "Watchlist") return;
    if (!document.forms[0] || !document.forms[0].namespace) return;

    var link = document.createElement('a');
    link.id = 'listSince';
    link.href = '#listSince';  // must have a href to show as link!

    var then = +(new Date());
    var fixLinkHref = function () {
        var url = window.location.href.split('#')[0];
        var days = (( +(new Date()) - then ) + (60 * 1000)) / (1000 * 3600 * 24);
        if (url.match(/[?&]days=/))
            this.href = url.replace(/([?&]days=)[^&]*/, '$1'+days);
        else
            this.href = url + (url.indexOf('?') < 0 ? '?':'&') + 'days=' + days;
        return true;
    };
    link.onclick = fixLinkHref;
    link.onmousedown = fixLinkHref;  // react to middle clicks too

    var frag = document.createDocumentFragment();
    frag.appendChild(document.createTextNode(' | '));
    frag.appendChild(link);
    link.appendChild(document.createTextNode('Changes'));
    frag.appendChild(document.createTextNode(' since last load.'));

    // just one little ID attribute would be _so_ nice...
    var nsSelectForm = document.getElementsByTagName('form')[0];
    nsSelectForm.parentNode.insertBefore(frag, nsSelectForm);
});

// TinEye (for identifying potential copyvio images
importScript('User:Twp/tineye.js');

// Dropdown menu - removed for now
importScript('User:Haza-w/cactions.js'); //[[User:Haza-w/cactions.js]]

// Dropdown menus options - N.B. make sure it shows wgScript not wgscript!
var cactions = {
    itabs: true,
    svars: Array(
        ['to do list',                       mw.config.get('wgScript')+'?title=User:Phantomsteve/todo'],
        ['Dusty articles',                   mw.config.get('wgScript')+'?title=Wikipedia:Dusty_articles'],
        ['monobook.js',                      mw.config.get('wgScript')+'?title=User:Phantomsteve/monobook.js'],
/*      ['Reaper Eternal Admin Mentoring',   mw.config.get('wgScript')+'?title=User:Reaper Eternal/Admin Mentoring'],                */
/*      ['Panyd Admin Mentoring',            mw.config.get('wgScript')+'?title=User:Panyd/Admin Mentoring'],                         */
        ['New pages',                        mw.config.get('wgScript')+'?title=Special:NewPages&action=view'],
        ['New pages - oldest unpatrolled',   mw.config.get('wgScript')+'?title=Special:NewPages&dir=prev&hidepatrolled=1'],
        ['New users',                        mw.config.get('wgScript')+'?title=Special:Log/newusers'],
/*      ['Unreferenced BLPs',                mw.config.get('wgScript')+'?title=Category:Unreferenced_BLPs'],                        */
/*      ['ANI',                              mw.config.get('wgScript')+'?title=Wikipedia:Administrators%27_noticeboard/Incidents'], */
/*      ['RFCs',                             mw.config.get('wgScript')+'?title=Wikipedia:Requests_for_comment'],                    */
        ['CSD criteria',                     mw.config.get('wgScript')+'?title=Wikipedia:Criteria_for_speedy_deletion'],
        ['User talk templates',              mw.config.get('wgScript')+'?title=Wikipedia:Template_messages/User_talk_namespace'],
/*      ['My Deletion Contribs',             mw.config.get('wgScript')+'?title=User:Phantomsteve/Editor/Deletions'],                 */
/*      ['My Rfx Contribs',                  mw.config.get('wgScript')+'?title=User:Phantomsteve/Editor/Rfx contributions'],         */
        ['My RfA Questions',                 mw.config.get('wgScript')+'?title=User:Phantomsteve/RfA questions'],
        ['My RfA Standards',                 mw.config.get('wgScript')+'?title=User:Phantomsteve/RfA standards'],
/*      ['My Admin stuff',                   mw.config.get('wgScript')+'?title=User:Phantomsteve/Admin-stuff'],                      */
        ['XfD closing instructions',         mw.config.get('wgScript')+'?title=Wikipedia:Deletion_process#Articles_for_deletion_page']),
    tbusr: false,
    xmlhr: true
};

//Manishearth's translation links script
importScript('User:Manishearth/sidebartranslinks.js')

// Tra's script to translate language names in sidebar to English names
importScript('User:Tra/sidebartranslate.js')