User:SilverLocust+/vector.js

// Note: //// = moved to scriptManager, /// = moved to a different .js page

// 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])}}

//  == Page moves ==   //

importScript( 'User:Ahecht/Scripts/pageswap.js' ); // Backlink: User:Ahecht/Scripts/pageswap

//importScript('User:TheTVExpert/rmCloser.js'); // Backlink: User:TheTVExpert/rmCloser.js

//importScript('User:Eejit43/scripts/rmtr-helper.js'); // Backlink: User:Eejit43/scripts/rmtr-helper.js

////importScript('User:MPGuy2824/MoveToDraft.js'); // Backlink: User:MPGuy2824/MoveToDraft.js

//importScript('User:Nardog/MoveHistory.js'); // Backlink: User:Nardog/MoveHistory.js

//  == Javascript Wiki Browser ==   //

//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

//  == Page utilities ==   //

//importScript('User:Enterprisey/diff-permalink.js'); // Backlink: User:Enterprisey/diff-permalink.js

//importScript('User:Bellezzasolo/Scripts/subpages.js'); // Backlink: User:Bellezzasolo/Scripts/subpages.js

//mw.loader.load('/w/index.php?title=User:BrandonXLF/EasySummary.js&action=raw&ctype=text/javascript'); // User:BrandonXLF/EasySummary.js

// importScript('meta:User:ESanders_(WMF)/commentlinks.js'); // Backlink: meta:User:ESanders_(WMF)/commentlinks.js

//importScript("User:The Transhumanist/SearchSuite.js"); // User:The Transhumanist/SearchSuite.js

////importScript('user:Qwertyytrewqqwerty/DisamAssist.js'); // Backlink: user:Qwertyytrewqqwerty/DisamAssist.js

////mw.loader.load( '/w/index.php?title=User:Evad37/rater.js&action=raw&ctype=text/javascript' ); // Backlink: User:Evad37/rater.js

//  == User utilities ==   //

//mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User:SMcCandlish/userinfo.js&action=raw&ctype=text/javascript');

//importScript('User:SilverLocust/UserUnderline.js'); // Backlink: User:SilverLocust/UserUnderline.js

//importScript('User:SilverLocust/UserUnderline2.js'); // Backlink: User:SilverLocust/UserUnderline.js

//importScript('User:Novem Linguae/Scripts/UserHighlighterSimple.js'); // Backlink: User:Novem Linguae/Scripts/UserHighlighterSimple.js

//mw.loader.load( '/w/index.php?title=User:Pythoncoder/Scripts/userHighlighter.js&action=raw&ctype=text/javascript' ); // Backlink: User:Pythoncoder/Scripts/userHighlighter.js

//  == Anti-vandalism ==   //

//importScript('User:RedWarn/.js'); // Backlink: User:RedWarn/.js

//importScript('User:10nm/beta.js'); // Backlink: User:10nm/beta.js

//importScript('User:MusikAnimal/confirmationRollback.js'); // Backlink: User:MusikAnimal/confirmationRollback.js

////importScript('User:Ingenuity/AntiVandal.js'); // Backlink: User:Ingenuity/AntiVandal.js

//  == Personalized ==   //

//mw.util.addPortletLink ('p-tb', '/wiki/User:SilverLocust/Instructions', 'Instructions');

////importScript('User:SilverLocust/editnotices.js'); // Backlink: User:SilverLocust/editnotices.js

//mw.util.addPortletLink ('p-tb', '/w/index.php?title=Special:Log&page=' + encodeURIComponent(mw.config.get('wgPageName')), 'Logs');

//  == Categories ==   //

////importScript('User:Wugapodes/Capricorn.js'); // Backlink: User:Wugapodes/Capricorn.js

//importScript('User:Nux/CategorySortKeys.js'); // Backlink: User:Nux/CategorySortKeys.js

//  == Miscellaneous ==   //

//importScript('User:Awesome Aasim/noeditredlinks.js'); // Backlink: User:Awesome Aasim/noeditredlinks.js

//importScript('User:SilverLocust/sandbox.js'); // Backlink: User:SilverLocust/sandbox.js

////importScript('User:MusikAnimal/customWatchlists.js'); // Backlink: User:MusikAnimal/customWatchlists.js

//scriptsToManage = { //"pageswap": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Ahecht/Scripts/pageswap.js", //"rmCloser": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:TheTVExpert/rmCloser.js", //"rmtr-helper": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Eejit43/scripts/rmtr-helper.js", //"MoveToDraft": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:MPGuy2824/MoveToDraft.js", //"MoveHistory": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Nardog/MoveHistory.js", //"JWB": "//en.wikipedia.org/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript", //"diff-permalinK": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Enterprisey/diff-permalink.js", //"subpages": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Bellezzasolo/Scripts/subpages.js", //"EasySummary": "//en.wikipedia.org/w/index.php?title=User:BrandonXLF/EasySummary.js&action=raw&ctype=text/javascript", //"DisamAssist": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=user:Qwertyytrewqqwerty/DisamAssist.js", //"rater": "//en.wikipedia.org/w/index.php?title=User:Evad37/rater.js&action=raw&ctype=text/javascript", //"userinfo": "//meta.wikimedia.org/w/index.php?title=User:SMcCandlish/userinfo.js&action=raw&ctype=text/javascript", //"UserUnderline": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:SilverLocust/UserUnderline.js", //"confirmationRollback": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:MusikAnimal/confirmationRollback.js", //"AntiVandal": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Ingenuity/AntiVandal.js", //"editnotices": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:SilverLocust/editnotices.js", //"Capricorn": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Wugapodes/Capricorn.js", //"Custom watchlists": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:MusikAnimal/customWatchlists.js", }

//importScript('User:Hilst/Scripts/scriptManager.js'); // Backlink: User:Hilst/Scripts/scriptManager.js