Jump to content

User:StefenTower/common.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.
const pagetitle = mw.config.get('wgTitle');
const thisaction = mw.config.get('wgAction');

// Navigation popups settings
window.popupStructure = 'menus';
window.popupFixRedirs = true;
window.popupFixDabs = true;
window.popupRedlinkRemoval = true;

if ((mw.config.get("wgCanonicalSpecialPageName") !== "OAuth") && (pagetitle.includes("Watchall") === false)) {
if (mw.config.get("wgCanonicalSpecialPageName") !== "Contributions") {
  window.hotcat_use_category_links = true;
  window.hotcat_dont_add_to_watchlist = true;
  
  window.autoWatchlistExpiry = { "edit": "3 days", "create": "1 month" };
  mw.loader.load("/w/index.php?title=User:Rummskartoffel/auto-watchlist-expiry.js&action=raw&ctype=text/javascript");
  
  mw.loader.load('/w/index.php?title=User:Nardog/RCMuter.js&action=raw&ctype=text/javascript');

  if (mw.config.get("wgCanonicalSpecialPageName") !== "Watchlist") {
  	mw.loader.load("/w/index.php?title=User:PleaseStand/highlight-comments.js&action=raw&ctype=text/javascript");

    if ((mw.config.get("wgCanonicalSpecialPageName") !== "Recentchangeslinked") && (mw.config.get("wgCanonicalSpecialPageName") !== "Recentchanges")) {
      if (thisaction !== "history") { 
        // don't allow on history pages 
        
        // only load when specifically needed
        // mw.loader.load("/w/index.php?title=User:Dudemanfellabra/ReorderNRHPlist.js&action=raw&ctype=text/javascript");

        window.checkLinksToCitations = false;
        mw.loader.load("/w/index.php?title=User:Ucucha/HarvErrors.js&action=raw&ctype=text/javascript");
        
        window.OCALinkSize = 1;
        mw.loader.load("/w/index.php?title=User:Elli/OneClickArchiver.js&action=raw&ctype=text/javascript");
        
        mw.loader.load("/w/index.php?title=User:Frietjes/findargdups.js&action=raw&ctype=text/javascript");
        mw.loader.load("/w/index.php?title=User:Evad37/duplinks-alt.js&action=raw&ctype=text/javascript");
        mw.loader.load("/w/index.php?title=User:The Evil IP address/hdedit.js&action=raw&ctype=text/javascript");
        mw.loader.load('/w/index.php?title=User:Headbomb/unreliable.js&action=raw&ctype=text/javascript');
        mw.loader.load('/w/index.php?title=User:BrandonXLF/HotDefaultSort.js&action=raw&ctype=text/javascript');
        mw.loader.load('/w/index.php?title=User:Nardog/CatChangesViewer.js&action=raw&ctype=text/javascript');
        
        if (thisaction === "edit") {
          mw.loader.load("/w/index.php?title=User:ערן/autocomplete.js&action=raw&ctype=text/javascript");
          mw.loader.load("/w/index.php?title=User:Ohconfucius/script/MOSNUM dates.js&action=raw&ctype=text/javascript");
          mw.loader.load('/w/index.php?title=User:Nardog/Unpipe.js&action=raw&ctype=text/javascript');
        }
      }
      // allow on either regular or history page
      mw.loader.load("/w/index.php?title=User:GregU/dashes.js&action=raw&ctype=text/javascript");
      mw.loader.load("/w/index.php?title=User:Wugapodes/Capricorn.js&action=raw&ctype=text/javascript");
      mw.loader.load("/w/index.php?title=User:PrimeHunter/Pageviews.js&action=raw&ctype=text/javascript");
      mw.loader.load("/w/index.php?title=User:Nardog/RefRenamer.js&action=raw&ctype=text/javascript");
      mw.loader.load('/w/index.php?title=User:Evad37/rater.js&action=raw&ctype=text/javascript');
      mw.loader.load('/w/index.php?title=User:PrimeHunter/Safemode edit.js&action=raw&ctype=text/javascript');
    }
  }
}

if (mw.config.get("wgCanonicalSpecialPageName") === "Contributions") {
  userHideAllSubsequent = true;
  mw.loader.load("/w/index.php?title=User:Markhurd/hidetopcontrib.js&action=raw&ctype=text/javascript");
}

// Load the following no matter what
mw.hook( 'LinkClassifier' ).add( function ( linkClassifier ) {
    linkClassifier.cats['historical'] = [ 'Category:Inactive project pages' ].sort();
} );
mw.loader.load("/w/index.php?title=User:Anomie/linkclassifier.js&action=raw&ctype=text/javascript");
mw.loader.load("/w/index.php?title=User:Anomie/linkclassifier.css&action=raw&ctype=text/css", "text/css");

mw.loader.load("/w/index.php?title=User:Numbermaniac/goToTop.js&action=raw&ctype=text/javascript");
$.when( mw.loader.using( [ 'mediawiki.util' ] ), $.ready ).then( function() {
  mw.util.addPortletLink('p-personal', 'https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser', 'AWB', 'awb', 'AutoWikiBrowser');
  mw.util.addPortletLink('p-personal', 'https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos', 'AWB/T', 'awbt', 'AutoWikiBrowser Typos');
  mw.util.addPortletLink('p-personal', 'https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Louisville', 'WPLou', 'wplou', 'WikiProject Louisville');
  mw.util.addPortletLink('p-personal', 'https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Kentucky', 'WPKY', 'wpky', 'WikiProject Kentucky');
} );
mw.loader.load("/w/index.php?title=User:Rezonansowy/FloatHead.css&action=raw&ctype=text/css", "text/css");
}