// PS: Whoever uses single quotes for strings is a monster.
// Override importScript to use mw.loader ▼
mw.loader.using(["mediawiki.Title"], function () {
window.importScript = function (page, oldid) { ▼
▲ // Override importScript to use mw.loader
const url = new URL("/w/index.php", window.___location.href); ▼
▲ window.importScript = function (page, oldid) {
url.searchParams.set("title", new mw.Title(page ).getPrefixedDb()); ▼
▲ const url = new URL("/w/index.php", window.___location.href);
if ( window.rwoldid =!= null) ▼
▲ url.searchParams.set("title", new mw.Title(page).getPrefixedDb());
if url.searchParams.set("oldid", != nulloldid);
url.searchParams.set("oldidaction", oldid"raw");
url.searchParams.set("actionctype", "rawtext/javascript");
mw.loader.load(url.toString()); ▼
url.searchParams.set("ctype", "text/javascript");
▲ mw.loader.load(url.toString());
// === SCRIPTS BY OTHER USERS === ▼
// use <nowiki>{{lusc|script}}</nowiki> ▼
▲ // === SCRIPTS BY OTHER USERS ===
▲ // use <nowiki>{{lusc|script}}</nowiki>
// Enable caching for resource loads, see [[User:SD0001/Making user scripts load faster]], @revision 5 ▼
if(!/\bnocache=\b/.test(___location.href)){var e=function(e,t,r){return 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((function(n){var o=n.query.pages[0];if(!o.missing){var a=o.revisions[0].content;if(r&&"text/javascript"!==r||"javascript"!==o.contentmodel){if("text/css"!==r||"css"!==o.contentmodel)return $.Deferred().reject('Refused to load "'+e+'"@'+t+": content type mismatch");mw.loader.addStyleTag(a)}else{if(2!==o.ns&&8!==o.ns)return $.Deferred().reject('Refused to load "'+e+'"@'+t+": outside User and MediaWiki space");var i=document.createElement("script");i.innerHTML=a,document.head.appendChild(i)}}}))},t=function(e){var t=/^(?:(?:https:)?\/\/(.*))?\/w\/index.php/.exec(e),r=/\btitle=([^=?&]*)/.exec(e);return t&&r&&/\baction=raw\b/.test(e)&&/\bctype=/.test(e)?[r[1],t[1]||mw.config.get("wgServerName")]:null};window.importScript=function(t){e(encodeURIComponent(t),mw.config.get("wgServerName"),"text/javascript")},window.importStyleSheet=function(t){e(encodeURIComponent(t),mw.config.get("wgServerName"),"text/css")};var r=mw.loader.load;mw.loader.load=function(n,o){var a=t(n);a?e(a[0],a[1],o):r.apply(mw.loader,Array.prototype.slice.call(arguments))};var n=mw.loader.getScript;mw.loader.getScript=function(r){var o=t(r);return o?e(o[0],o[1],"text/javascript"):n.apply(mw.loader,Array.prototype.slice.call(arguments))}} ▼
▲ // Enable caching for resource loads, see [[User:SD0001/Making user scripts load faster]], @revision 5
▲ if(!/\bnocache=\b/.test(___location.href)){var e=function(e,t,r){return 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((function(n){var o=n.query.pages[0];if(!o.missing){var a=o.revisions[0].content;if(r&&"text/javascript"!==r||"javascript"!==o.contentmodel){if("text/css"!==r||"css"!==o.contentmodel)return $.Deferred().reject('Refused to load "'+e+'"@'+t+": content type mismatch");mw.loader.addStyleTag(a)}else{if(2!==o.ns&&8!==o.ns)return $.Deferred().reject('Refused to load "'+e+'"@'+t+": outside User and MediaWiki space");var i=document.createElement("script");i.innerHTML=a,document.head.appendChild(i)}}}))},t=function(e){var t=/^(?:(?:https:)?\/\/(.*))?\/w\/index.php/.exec(e),r=/\btitle=([^=?&]*)/.exec(e);return t&&r&&/\baction=raw\b/.test(e)&&/\bctype=/.test(e)?[r[1],t[1]||mw.config.get("wgServerName")]:null};window.importScript=function(t){e(encodeURIComponent(t),mw.config.get("wgServerName"),"text/javascript")},window.importStyleSheet=function(t){e(encodeURIComponent(t),mw.config.get("wgServerName"),"text/css")};var r=mw.loader.load;mw.loader.load=function(n,o){var a=t(n);a?e(a[0],a[1],o):r.apply(mw.loader,Array.prototype.slice.call(arguments))};var n=mw.loader.getScript;mw.loader.getScript=function(r){var o=t(r);return o?e(o[0],o[1],"text/javascript"):n.apply(mw.loader,Array.prototype.slice.call(arguments))}}
if (window.rw == null)
importScript("User:RedWarn/.js"); // [[User:RedWarn/.js]] ▼
▲ importScript("User:RedWarn/.js"); // [[User:RedWarn/.js]]
importScript("User: DannyS712Þjarkur/ DiscussionCloserNeverUseMobileVersion.js"); // [[User: DannyS712Þjarkur/ DiscussionCloserNeverUseMobileVersion.js]] ▼
// importScript("User:ÞjarkurEvad37/NeverUseMobileVersionEditWarChecker.js"); // [[User:ÞjarkurEvad37/NeverUseMobileVersionEditWarChecker.js]]
// importScript("User:Evad37BrandonXLF/EditWarCheckerQuickEdit.js"); // [[User:Evad37BrandonXLF/EditWarCheckerQuickEdit.js]]
// importScript("User:BrandonXLFMxn/QuickEditCommentsInLocalTime.js"); // [[User:BrandonXLFMxn/QuickEditCommentsInLocalTime.js]]
// importScript("User:MxnMvolz/CommentsInLocalTimedisplayContributions.js"); // [[User:MxnMvolz/CommentsInLocalTimedisplayContributions.js]]
importScript("User:MvolzAnne drew Andrew and Drew/displayContributionsPageDetails.js"); // [[User:MvolzAnne drew Andrew and Drew/displayContributionsPageDetails.js]]
importScript("User:Anne drew Andrew and DrewEnterprisey/PageDetailsfancy-diffs.js"); // [[User:Anne drew Andrew and DrewEnterprisey/PageDetailsfancy-diffs.js]]
importScript("User:EnterpriseyAmorymeltzer/fancy-diffsuserinfo.js"); // [[User:EnterpriseyAmorymeltzer/fancy-diffsuserinfo.js]]
importScript("User:AmorymeltzerEvad37/userinforename editors.js"); // [[User:AmorymeltzerEvad37/userinforename editors.js]]
importScript("User:Evad37Enterprisey/rename editorscv-revdel.js"); // [[User:Evad37Enterprisey/rename editorscv-revdel.js]]
importScript("User:EnterpriseyZhaofeng Li/cv-revdelReflinks.js"); // [[User:EnterpriseyZhaofeng Li/cv-revdelReflinks.js]]
importScript("User:Zhaofeng LiEvad37/ReflinksOneClickArchiver.js"); // [[User:Zhaofeng LiEvad37/ReflinksOneClickArchiver.js]]
importScript("User:Evad37Bradv/OneClickArchiverendlesscontribs.js"); // [[User:Evad37Bradv/OneClickArchiverendlesscontribs.js]]
// importScript("User:Bradv/endlesscontribsScripts/Superlinks.js"); // [[User:Bradv/endlesscontribsScripts/Superlinks.js]]
// importScript("User:BradvWugapodes/Scripts/SuperlinksCapricorn.js"); // [[User:Bradv/ScriptsWugapodes/SuperlinksCapricorn.js]]
importScript("User:WugapodesAwesome Aasim/Capricornnoeditredlinks.js"); // [[User:WugapodesAwesome Aasim/Capricornnoeditredlinks.js]]
// importScript("User:Awesome AasimP999/noeditredlinksToggle VF.js"); // [[User:Awesome AasimP999/noeditredlinksToggle VF.js]]
// importScript("User:P999Anomie/Toggle VFunsignedhelper.js"); // [[User:P999Anomie/Toggle VFunsignedhelper.js]]
importScript("User:AnomieEvad37/unsignedhelperMoveToDraft.js"); // [[User:AnomieEvad37/unsignedhelperMoveToDraft.js]]
importScript("User:Evad37Jackmcbarn/MoveToDrafteditProtectedHelper.js"); // [[User:Evad37Jackmcbarn/MoveToDrafteditProtectedHelper.js]]
importScript("User:JackmcbarnEvad37/editProtectedHelperrater.js"); // [[User:JackmcbarnEvad37/editProtectedHelperrater.js]]
// importScript("User:Evad37Writ Keeper/Scripts/ratermassRollback.js"); // [[User:Evad37Writ Keeper/Scripts/ratermassRollback.js]]
// importScript("User:Writ Keeper/ScriptsSuperHamster/massRollbackCiteUnseen.js"); // [[User:Writ Keeper/ScriptsSuperHamster/massRollbackCiteUnseen.js]]
importScript("User:SuperHamsterBrandonXLF/CiteUnseenCSSImageCrop.js"); // [[User:SuperHamsterBrandonXLF/CiteUnseenCSSImageCrop.js]]
importScript("User:BrandonXLFAwesome Aasim/CSSImageCroprcpatrol.js"); // [[User:BrandonXLFAwesome Aasim/CSSImageCroprcpatrol.js]]
importScript("User:Awesome AasimDannyS712/rcpatrolDiscussionCloser.js"); // [[User:Awesome AasimDannyS712/rcpatrolDiscussionCloser.js]]
▲ importScript("User:DannyS712/DiscussionCloser.js"); // [[User:DannyS712/DiscussionCloser.js]]
// Disabling this on typhoon articles due to the massive page load lag. ▼
if (!/(typhoon|hurricane|cyclone) season$/gi.test(mw.config.get("wgPageName"))) ▼
▲ // Disabling this on typhoon articles due to the massive page load lag.
importScript("User:Novem Linguae/Scripts/CiteHighlighter.js"); // [[User:Novem Linguae/Scripts/CiteHighlighter.js]] ▼
▲ if (!/(typhoon|hurricane|cyclone) season$/gi.test(mw.config.get("wgPageName")))
▲ importScript("User:Novem Linguae/Scripts/CiteHighlighter.js"); // [[User:Novem Linguae/Scripts/CiteHighlighter.js]]
// This conflicts with RecentChanges styling.
//if This(mw.config.get("wgPageName") conflicts with!== "Special:RecentChanges styling.")
importScript("User:Bradv/Scripts/ExpandDiffs.js"); // [[User:Bradv/Scripts/ExpandDiffs.js]] ▼
if (mw.config.get("wgPageName") !== "Special:RecentChanges") ▼
▲ importScript("User:Bradv/Scripts/ExpandDiffs.js"); // [[User:Bradv/Scripts/ExpandDiffs.js]]
// === STYLESHEETS BY OTHER USERS === ▼
▲ // === STYLESHEETS BY OTHER USERS ===
▲ if (mw.config.get(" wgPageNameskin") !== " Special:RecentChangesvector-2022")
importStylesheet("User:BrandonXLF/FloatHead.css"); // [[User:BrandonXLF/FloatHead]] ▼
if (mw.config.get("skin") !== "vector-2022")
▲ importStylesheet("User:BrandonXLF/FloatHead.css"); // [[User:BrandonXLF/FloatHead]]
// === EVERYTHING BELOW THIS POINT WAS WRITTEN BY "Chlod" === ▼
// I take responsibility for whatever is written below this section, including sublinks. ▼
▲ // === EVERYTHING BELOW THIS POINT WAS WRITTEN BY "Chlod" ===
▲ // I take responsibility for whatever is written below this section, including sublinks.
// importScript("User:Chlod/Scripts/ StormCountTallyRCP-CV Quicklink.js"); // [[User:Chlod/Scripts/ StormCountTallyRCP-CV Quicklink.js]] ▼
// importScript("User:Chlod/Scripts/RCP-CV QuicklinkUserHighlighter.js"); // [[User:Chlod/Scripts/RCP-CV QuicklinkUserHighlighter.js]]
importScript("User:Chlod/Scripts/UserHighlighterDirectPDFDownload.js"); // [[User:Chlod/Scripts/UserHighlighterDirectPDFDownload.js]]
importScript("User:Chlod/Scripts/DirectPDFDownloadGlobalUserToolbox.js"); // [[User:Chlod/Scripts/DirectPDFDownloadGlobalUserToolbox.js]]
importScript("User:Chlod/Scripts/GlobalUserToolboxReferenceDeselector.js"); // [[User:Chlod/Scripts/GlobalUserToolboxReferenceDeselector.js]]
importScript("User:Chlod/Scripts/ReferenceDeselectorNewTabMMVDetails.js"); // [[User:Chlod/Scripts/ReferenceDeselectorNewTabMMVDetails.js]]
importScript("User:Chlod/Scripts/NewTabMMVDetailsStormCountTally.js"); // [[User:Chlod/Scripts/NewTabMMVDetailsStormCountTally.js]]
▲ importScript("User:Chlod/Scripts/StormCountTally.js"); // [[User:Chlod/Scripts/StormCountTally.js]]
// importScript("User:Chlod/Scripts/ CoordinatorGoToTitle.js"); // [[User:Chlod/Scripts/ CoordinatorGoToTitle.js]] ▼
// importScript("User:Chlod/Scripts/GoToTitleFoldArchives.js"); // [[User:Chlod/Scripts/GoToTitleFoldArchives.js]]
importScript("User:Chlod/Scripts/FoldArchivesAjaxRollbackSummary.js"); // [[User:Chlod/Scripts/FoldArchivesAjaxRollbackSummary.js]]
importScript("User:Chlod/Scripts/AjaxRollbackSummarySectionLink.js"); // [[User:Chlod/Scripts/AjaxRollbackSummarySectionLink.js]]
importScript("User:Chlod/Scripts/SectionLinkCopiedTemplateEditor-loader.js"); // [[User:Chlod/Scripts/SectionLinkCopiedTemplateEditor-loader.js]]
importScript("User:Chlod/Scripts/CopiedTemplateEditor-loaderInfringementAssistant.js"); // [[User:Chlod/Scripts/CopiedTemplateEditor-loaderInfringementAssistant.js]]
importScript("User:Chlod/Scripts/InfringementAssistantCoordinator.js"); // [[User:Chlod/Scripts/InfringementAssistantCoordinator.js]]
▲ importScript("User:Chlod/Scripts/Coordinator.js"); // [[User:Chlod/Scripts/Coordinator.js]]
// common.js link at hotbar. ▼
▲ // common.js link at hotbar.
▲ mw.util.addPortletLink(
"/wiki/Special:MyPage/common.js",
"/wiki/Special:MyPage/common.js",
"common.jspt-cjs",
"Open your common.js "pt-cjsfile.",
"Open your common.js file.",
null,"#pt-logout"
"#pt-logout"
// importScript("User:Chlod/sandbox.js"); ▼
▲ // importScript("User:Chlod/sandbox.js");
|