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.
/* See also: [[meta:User:ClaudineChionh/global.js]] */

var ConfirmRollback = {
    watchlist: "confirm",
    recentchanges: "confirm",
    history: "confirm",
    diff: "confirm",
};
window.CSMarkerMode = "both";
var customGeneralSummaries = [
    "[[MOS:BOLD]] not needed in headings",
    "[[MOS:DATERANGE]]",
    "[[MOS:DUPLINK]]",
    "[[WP:DUPREF]]",
    "[[MOS:GENDERID]]",
    "[[MOS:RECENT]]",
    "[[MOS:SECTIONCAPS]]",
    "[[MOS:SPELL09]]",
    "dedupe and rename references with reFill and [[User:Nardog/RefRenamer|RefRenamer]]",
];
var openUnread_maxnum = "5";
var openUnread_oldest = false;
var readingBG = "#EFF1F5"; // Catppuccin Latte Base
var StubSorter_watchlist = "preferences";

/* Load scripts in Main or Draft namespaces. */
function loadInContent() {
    mw.util.addPortletLink(
        "p-cactions",
        "https://link-dispenser.toolforge.org/analyze/" +
            mw.config.get("wgPageName"),
        "Page links health check",
        "ca-dispenser-healthcheck"
    );
    mw.util.addPortletLink(
        "p-cactions",
        "https://link-dispenser.toolforge.org/llmanalyze/" +
            mw.config.get("wgPageName"),
        "Page links LLM check",
        "ca-dispenser-llmcheck"
    );
    mw.loader.load(
        "/w/index.php?title=User:Scaledish/Scripts/404.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Scaledish/Scripts/404.js]]
    mw.loader.load(
        "/w/index.php?title=User:Sophisticatedevening/AI Cleaner.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Sophisticatedevening/AI Cleaner]]
    mw.loader.load(
        "/w/index.php?title=User:BrandonXLF/CitationStyleMarker.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:BrandonXLF/CitationStyleMarker]]
    mw.loader.load(
        "/w/index.php?title=User:Novem_Linguae/Scripts/CiteHighlighter.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Novem Linguae/Scripts/CiteHighlighter]]
    mw.loader.load(
        "/w/index.php?title=User:SuperHamster/CiteUnseen.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:SuperHamster/CiteUnseen]]
    mw.loader.load(
        "/w/index.php?title=User:The Earwig/copyvios.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:The Earwig/copyvios.js]]
    mw.loader.load(
        "/w/index.php?title=User:Enterprisey/cv-revdel.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Enterprisey/cv-revdel]]
    mw.loader.load(
        "/w/index.php?title=User:Novem Linguae/Scripts/DetectPromo.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Novem Linguae/Scripts/DetectPromo.js]]
    mw.loader.load(
        "/w/index.php?title=User:Polygnotus/DuplicateReferences.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Polygnotus/DuplicateReferences]]
    mw.loader.load(
        "/w/index.php?title=User:Evad37/duplinks-alt.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Evad37/duplinks-alt]]
    mw.loader.load(
        "/w/index.php?title=User:Trappist the monk/HarvErrors.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Trappist the monk/HarvErrors]]
    mw.loader.load(
        "/w/index.php?title=User:ClaudineChionh/Scripts/highlightPiped.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:ClaudineChionh/Scripts/highlightPiped]]
    mw.loader.load(
        "/w/index.php?title=User:Phlsph7/HighlightUnreferencedPassages.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Phlsph7/HighlightUnreferencedPassages]]
    mw.loader.load(
        "/w/index.php?title=User:Sophisticatedevening/LLMslop.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Sophisticatedevening/LLMslop.js]]
    mw.loader.load(
        "/w/index.php?title=User:Sohom Datta/PageTriageUserspaceLogger.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Sohom Datta/PageTriageUserspaceLogger]]
    mw.loader.load(
        "/w/index.php?title=User:Nardog/RefRenamer.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Nardog/RefRenamer]]
    mw.loader.load(
        "/w/index.php?title=User:Sophisticatedevening/Timestamp.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Sophisticatedevening/Timestamp.js]]
    mw.loader.load(
        "/w/index.php?title=User:Headbomb/unreliable.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Headbomb/unreliable]]
}

/* Load scripts in Draft namespace. */
function loadInDraft() {
    mw.loader.load(
        "/w/index.php?title=User:DannyS712/Draft no cat.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:DannyS712/Draft no cat]]
}

/* Load scripts when editing. */
function loadInEdit() {
    mw.loader.load(
        "/w/index.php?title=User:Nardog/CodeEditorAssist.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Nardog/CodeEditorAssist]]
    mw.loader.load(
        "/w/index.php?title=User:ClaudineChionh/Scripts/copyPageToClipboard.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:ClaudineChionh/Scripts/copyPageToClipboard]]
    mw.loader.load(
        "/w/index.php?title=User:Enterprisey/CustomSummaryPresets.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Enterprisey/CustomSummaryPresets]]
}

/* Load scripts in Main namespace. */
function loadInMain() {
    mw.loader.load(
        "/w/index.php?title=User:Wugapodes/Capricorn.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Wugapodes/Capricorn]]
    mw.loader.load(
        "/w/index.php?title=User:Qwertyytrewqqwerty/DisamAssist.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Qwertyytrewqqwerty/DisamAssist]]
    mw.loader.load(
        "/w/index.php?title=User:DannyS712/Draft re cat.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:DannyS712/Draft re cat]]
    mw.loader.load(
        "/w/index.php?title=User:SD0001/easy-merge.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:SD0001/easy-merge]]
    mw.loader.load(
        "/w/index.php?title=User:Evad37/EditWarChecker.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Evad37/EditWarChecker]]
    mw.loader.load(
        "/w/index.php?title=User:MPGuy2824/MoveToDraft.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:MPGuy2824/MoveToDraft]]
    mw.loader.load(
        "/w/index.php?title=User:Enterprisey/parent-cats.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Enterprisey/parent-cats]]
    mw.loader.load(
        "/w/index.php?title=User:Evad37/rater.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Evad37/rater]]
    mw.loader.load(
        "/w/index.php?title=User:Novem Linguae/Scripts/ReFillLink.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[Wikipedia:ReFill]]
    mw.loader.load(
        "/w/index.php?title=User:Epicgenius/sortcategories.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Epicgenius/sortcategories]]
    mw.loader.load(
        "/w/index.php?title=User:SD0001/StubSorter.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:SD0001/StubSorter]]
}

/* Load scripts in Wikipedia namespace. */
function loadInProject() {
    mw.loader.load(
        "/w/index.php?title=User:Enterprisey/delsort.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Enterprisey/delsort]]
    var NominationsViewer = {
        enabledPages: {
            "Wikipedia:Featured article candidates": "nominations",
            "Wikipedia:Featured article review": "reviews",
            "Wikipedia:Featured list candidates": "nominations",
            "Wikipedia:Featured list removal candidates": "reviews",
            "Wikipedia:Featured picture candidates": "nominations",
            "Wikipedia:Peer review": "peer reviews",
        },
    };
    mw.loader.load(
        "/w/index.php?title=User:A455bcd9/nominations_viewer.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:A455bcd9/nominations viewer.js]]
    mw.loader.load(
        "/w/index.php?title=User:Novem Linguae/Scripts/UserHighlighterSimple.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Novem Linguae/Scripts/UserHighlighterSimple]]
}

/* Load scripts in Talk namespaces. */
function loadInTalk() {
    mw.loader.load(
        "/w/index.php?title=User:Andrybak/Scripts/Archiver.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:andrybak/Scripts/Archiver]]
    mw.loader.load(
        "/w/index.php?title=User:Novem Linguae/Scripts/GANReviewTool.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Novem Linguae/Scripts/GANReviewTool]]
    mw.loader.load(
        "/w/index.php?title=User:Rummskartoffel/talk_page_usage.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Rummskartoffel/talk page usage.js]]
    mw.loader.load(
        "/w/index.php?title=User:Andrybak/Scripts/Unsigned generator.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Andrybak/Scripts/Unsigned generator]]
    mw.loader.load(
        "/w/index.php?title=User:Andrybak/Scripts/Unsigned helper.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Andrybak/Scripts/Unsigned helper]]
    mw.loader.load(
        "/w/index.php?title=User:Novem Linguae/Scripts/UserHighlighterSimple.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Novem Linguae/Scripts/UserHighlighterSimple]]
}

/* Load scripts in Template namespaces. */
function loadInTemplate() {
    mw.loader.load(
        "/w/index.php?title=User:BrandonXLF/WatchDoc.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:BrandonXLF/WatchDoc]]
}

/* Load scripts in User namespaces. */
function loadInUser() {
    mw.loader.load(
        "/w/index.php?title=User:DannyS712/Draft no cat.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:DannyS712/Draft no cat]]
    mw.loader.load(
        "/w/index.php?title=User:Bellezzasolo/Scripts/subpages.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Bellezzasolo/Scripts/subpages]]
}

/* Load scripts in watchlist. */
function loadInWatchlist() {
    mw.loader.load(
        "/w/index.php?title=User:Ahecht/Scripts/watchlistcleaner.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Ahecht/Scripts/watchlistcleaner]]
    mw.loader.load(
        "/w/index.php?title=User:Evad37/Watchlist-openUnread.js&action=raw&ctype=text/javascript"
    ); // Backlink: [[User:Evad37/Watchlist-openUnread]]
}

/* Load scripts according to namespace/page. */
if (mw.config.get("wgCanonicalSpecialPageName") == "Watchlist") {
    loadInWatchlist();
} else {
    switch (mw.config.get("wgNamespaceNumber")) {
        case 0: // main
            loadInContent();
            loadInMain();
            break;
        case 2: // user
            loadInUser();
            break;
        case 4: // wikipedia
            loadInProject();
            break;
        case 10: // template
            loadInTemplate();
            break;
        case 118: // draft
            loadInContent();
            loadInDraft();
            break;
        // no default
    }
    if (mw.config.get("wgNamespaceNumber") % 2 == 1) {
        loadInTalk();
    }
    if (mw.config.get("wgAction") == "edit") {
        loadInEdit();
    }
}

/* Always loaded. */
mw.loader.load(
    "//en.wiktionary.org/w/index.php?title=MediaWiki:Gadget-AutoContrastFixer.js&action=raw&ctype=text/javascript"
); // Backlink: [[wikt:en:MediaWiki:Gadget-AutoContrastFixer.js]]
mw.loader.load(
    "/w/index.php?title=User:Harej/citation-watchlist.js&action=raw&ctype=text/javascript"
); // Backlink: [[Wikipedia:Citation Watchlist]]
mw.loader.load(
    "/w/index.php?title=User:Mr. Stradivarius/gadgets/ConfirmRollback.js&action=raw&ctype=text/javascript"
); // Backlink: [[User:Mr. Stradivarius/gadgets/ConfirmRollback]]
mw.loader.load(
    "/w/index.php?title=User:RealFakeKim/Scripts/commonLinks.js&action=raw&ctype=text/javascript"
); // Backlink: [[User:RealFakeKim/Scripts/commonLinks]]
mw.loader.load(
    "/w/index.php?title=User:Enterprisey/diff-permalink.js&action=raw&ctype=text/javascript"
); // Backlink: [[User:Enterprisey/diff-permalink]]
mw.loader.load(
    "/w/index.php?title=User:Writ_Keeper/Scripts/commonHistory.js&action=raw&ctype=text/javascript"
); // Backlink: [[User:Writ Keeper/Scripts/inlineDiffDocs]]
mw.loader.load(
    "/w/index.php?title=User:Writ Keeper/Scripts/massRollback.js&action=raw&ctype=text/javascript"
); // Backlink: [[User:Writ Keeper/Scripts/massRollback]]
mw.loader.load(
    "/w/index.php?title=User:BrandonXLF/MoreDiffInfo.js&action=raw&ctype=text/javascript"
); // Backlink: [[User:BrandonXLF/MoreDiffInfo]]
mw.loader.load(
    "/w/index.php?title=User:Ahecht/Scripts/ReadingMode.js&action=raw&ctype=text/javascript"
); // Backlink: [[User:Ahecht/Scripts/ReadingMode]]
mw.loader.load(
    "/w/index.php?title=User:Enterprisey/section-redir-note.js&action=raw&ctype=text/javascript"
); // Backlink: [[User:Enterprisey/section-redir-note]]
mw.loader.load(
    "/w/index.php?title=User:Nardog/SmartDiff.js&action=raw&ctype=text/javascript"
); // Backlink: [[User:Nardog/SmartDiff]]
mw.loader.load(
    "/w/index.php?title=User:Tollens/subnetContribs.js&action=raw&ctype=text/javascript"
); // Backlink: [[User:Tollens/subnetContribs]]
mw.loader.load(
    "/w/index.php?title=User:Bradv/Scripts/Superlinks.js&action=raw&ctype=text/javascript"
); // Backlink: [[User:Bradv/Scripts/Superlinks]]
mw.loader.load(
    "/w/index.php?title=User:Evad37/TimestampDiffs.js&action=raw&ctype=text/javascript"
); // Backlink: [[User:Evad37/TimestampDiffs]]
mw.loader.load(
    "/w/index.php?title=User:Daniel Quinlan/Scripts/Unfiltered.js&action=raw&ctype=text/javascript"
); // Backlink: [[User:Daniel Quinlan/Scripts/Unfiltered]]
inspectText = "?diff";
showText = "+diff";
hideText = "-diff";
markAsViewed = true;
mw.loader.load(
    "/w/index.php?title=User:Aaron Liu/Watchlyst Greybar Unsin.js&action=raw&ctype=text/javascript"
); // Backlink: [[User:Aaron Liu/Watchlyst Greybar Unsin]]
mw.loader.load(
    "/w/index.php?title=User:SD0001/W-Ping.js&action=raw&ctype=text/javascript"
); // Backlink: [[User:SD0001/W-Ping]]

/* Scripts managed by scriptManager are not loaded by default. */
window.scriptsToManage = {
    AlertAssistant:
        "//en.wikipedia.org/w/index.php?title=User:CanonNi/Scripts/AlertAssistant.js&action=raw&ctype=text/javascript",
    "anrfc-lister":
        "//en.wikipedia.org/w/index.php?title=User:Novem Linguae/Scripts/anrfc-lister.js&action=raw&ctype=text/javascript",
    EditRequestTool:
        "//en.wikipedia.org/w/index.php?title=User:Terasail/Edit Request Tool.js&action=raw&ctype=text/javascript",
    Factotum:
        "//en.wikipedia.org/w/index.php?title=User:Alexis Jazz/Factotum.js&action=raw&ctype=text/javascript",
    voteSymbols:
        "//en.wikipedia.org/w/index.php?title=User:Pythoncoder/Scripts/voteSymbols.js&action=raw&ctype=text/javascript",
    AfDstarted:
        "//en.wikipedia.org/w/index.php?title=User:Lourdes/AfDstarted.js&action=raw&ctype=text/javascript",
    CfDstarted:
        "//en.wikipedia.org/w/index.php?title=User:1234qwer1234qwer4/CfDstarted.js&action=raw&ctype=text/javascript",
    FfDstarted:
        "//en.wikipedia.org/w/index.php?title=User:1234qwer1234qwer4/FfDstarted.js&action=raw&ctype=text/javascript",
    RfDstarted:
        "//en.wikipedia.org/w/index.php?title=User:1234qwer1234qwer4/RfDstarted.js&action=raw&ctype=text/javascript",
    TfDstarted:
        "//en.wikipedia.org/w/index.php?title=User:1234qwer1234qwer4/TfDstarted.js&action=raw&ctype=text/javascript",
    DRVstarted:
        "//en.wikipedia.org/w/index.php?title=User:1234qwer1234qwer4/DRVstarted.js&action=raw&ctype=text/javascript",
};
mw.loader.load(
    "/w/index.php?title=User:Hilst/Scripts/scriptManager.js&action=raw&ctype=text/javascript"
); // Backlink: [[User:Hilst/Scripts/scriptManager]]

/* Courtesy backlinks for scripts in scriptManager. */
// mw.loader.load( '/w/index.php?title=User:CanonNi/Scripts/AlertAssistant.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:CanonNi/Scripts/AlertAssistant]]
// mw.loader.load( '/w/index.php?title=User:Novem Linguae/Scripts/anrfc-lister.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:Novem Linguae/Scripts/anrfc-lister]]
// mw.loader.load( '/w/index.php?title=User:Terasail/Edit Request Tool.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:Terasail/Edit Request Tool]]
// mw.loader.load( '/w/index.php?title=User:Alexis Jazz/Factotum.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:Alexis Jazz/Factotum]]
// mw.loader.load( '/w/index.php?title=User:Pythoncoder/Scripts/voteSymbols.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:Pythoncoder/Scripts/voteSymbols]]
// mw.loader.load( '/w/index.php?title=User:Lourdes/AfDstarted.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:Lourdes/AfDstarted]]
// importScript('User:1234qwer1234qwer4/CfDstarted.js'); // Backlink: [[User:1234qwer1234qwer4/XfDstarted]]
// importScript('User:1234qwer1234qwer4/FfDstarted.js'); // Backlink: [[User:1234qwer1234qwer4/XfDstarted]]
// importScript('User:1234qwer1234qwer4/RfDstarted.js'); // Backlink: [[User:1234qwer1234qwer4/XfDstarted]]
// importScript('User:1234qwer1234qwer4/TfDstarted.js'); // Backlink: [[User:1234qwer1234qwer4/XfDstarted]]
// importScript('User:1234qwer1234qwer4/DRVstarted.js'); // Backlink: [[User:1234qwer1234qwer4/XfDstarted]]