User:HouseBlaster/common.js

// Enable caching for resource loads, see User:SD0001/Making user scripts load faster, @revision 6 if(!/\bnocache=\b/.test(location.href)){let e=(e,t,n)=>(e=e.replace(/special:mypage/i,"User:"+mw.config.get("wgUserName")),$.get("https://"+t+"/w/api.php?titles="+e+"&origin=*&format=json&formatversion=2&uselang=content&maxage=86400&smaxage=86400&action=query&prop=revisions|info&rvprop=content&rvlimit=1").then((r=>{let o=r.query.pages[0];if(o.missing)return;let a=o.revisions[0].content;if(n&&"text/javascript"!==n||"javascript"!==o.contentmodel){if("text/css"!==n||"css"!==o.contentmodel)return $.Deferred.reject('Refused to load "'+e+'"@'+t+": content type mismatch");mw.loader.addStyleTag(a)}else{let e=document.createElement("script");e.innerHTML=a,document.head.appendChild(e)}}))),t=e=>{let t=/^(?:(?:https:)?\/\/(.*))?\/w\/index.php/.exec(e),n=/\btitle=([^=?&]*)/.exec(e);return t&&n&&/\baction=raw\b/.test(e)&&/\bctype=/.test(e)?[n[1],t[1]||mw.config.get("wgServerName")]:null};window.importScript=t=>{e(encodeURIComponent(t),mw.config.get("wgServerName"),"text/javascript")},window.importStyleSheet=t=>{e(encodeURIComponent(t),mw.config.get("wgServerName"),"text/css")};let n=mw.loader.load;mw.loader.load=function(r,o){let a=t(r);a?e(a[0],a[1],o):n.apply(mw.loader,[...arguments])};let r=mw.loader.getScript;mw.loader.getScript=function(n){let o=t(n);return o?e(o[0],o[1],"text/javascript"):r.apply(mw.loader,[...arguments])}}

importScript('User:SuperHamster/CiteUnseen.js'); // Backlink: User:SuperHamster/CiteUnseen.js importScript('User:HouseBlaster/MoveToDraft.js'); // Backlink: User:HouseBlaster/MoveToDraft.js importScript('User:Evad37/rater.js'); // Backlink: User:Evad37/rater.js importScript('User:Anomie/talklink.js'); // Backlink: User:Anomie/talklink.js importScript('User:Danski454/hotcat-summary.js'); //Backlink: User:Danski454/hotcat-summary.js importScript('User:Novem Linguae/Scripts/UserRightsDiff.js'); // Backlink: User:Novem Linguae/Scripts/UserRightsDiff.js importScript('User:Ahecht/Scripts/pageswap.js'); // Backlink: User:Ahecht/Scripts/pageswap.js importScript('User:HouseBlaster/AutoEd.js'); //Backlink: User:HouseBlaster/AutoEd.js importScript('User:Anomie/unsignedhelper.js'); // Backlink: User:Anomie/unsignedhelper.js importScript('User:Trappist the monk/HarvErrors.js'); //Backlink: User:Trappist the monk/HarvErrors.js importScript('User:Ohconfucius/script/MOSNUM dates.js'); //Backlink: User:Ohconfucius/script/MOSNUM dates.js importScript('User:Qwerfjkl/scripts/massXFD.js'); // Backlink: User:Qwerfjkl/scripts/massXFD.js importScript('User:PleaseStand/userinfo.js'); // Backlink: User:PleaseStand/userinfo.js importScript('User:Ahecht/Scripts/refresh.js'); // Backlink: User:Ahecht/Scripts/refresh.js importScript('User:SD0001/shortdescs-in-category.js'); // Backlink: User:SD0001/shortdescs-in-category.js importScript('User:SD0001/RFUD-helper.js'); // User:SD0001/RFUD-helper.js importStylesheet('User:HouseBlaster/talklink.css'); // Backlink: User:HouseBlaster/talklink.css mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Nardog/RefRenamer.js&action=raw&ctype=text/javascript'); // Backlink: User:Nardog/RefRenamer.js mw.loader.load('/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript' ); // Backlink: User:Joeytje50/JWB.js/load.js // Backlink: User:Joeytje50/JWB.js mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Ahecht/Scripts/massmove.js&action=raw&ctype=text/javascript' ); // Backlink: User:Ahecht/Scripts/massmove.js

if (mw.config.get('wgCanonicalSpecialPageName') === 'Blankpage') { //load lintHint, but only in special namespace

// lintHint // create a user defined object var myLintHints = { };

myLintHints.rooms = "-";

// communicate user defined object mw.hook( "lintHint.config" ).fire( myLintHints );

// finally, load gadget importScript('User:PerfektesChaos/js/lintHint/r.js'); // Backlink: User:PerfektesChaos/js/lintHint/r.js }

if (mw.config.get('wgNamespaceNumber') === 14) { // load Cat-a-lot in Category namespace importScript('User:קיפודנחש/cat-a-lot.js'); // Backlink: User:קיפודנחש/cat-a-lot.js }

if ((mw.config.get('wgPageName').substring(0, 35) === "Wikipedia:Categories_for_discussion") || (mw.config.get('wgPageName').substring(0, 35) === "Wikipedia:Templates_for_discussion")) { var LoadXFDDelay = setInterval(function { // load User:Nardog/CopySectLink.js never (it doesn't work with XFDC) clearInterval(LoadXFDDelay); importScript('User:Qwerfjkl/scripts/CFDlister.js'); // Backlink: User:Qwerfjkl/scripts/CFDlister.js importScript('User:HouseBlaster/HighlightCFD.js'); // User:HouseBlaster/HighlightCFD.js, with massive credit to User:Anomie's User:Anomie/linkclassifier.js },3000) } else { mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Nardog/CopySectLink.js&action=raw&ctype=text/javascript'); }