MediaWiki:Common.js: Difference between revisions

From Irony Wiki
Jump to navigation Jump to search
(Notify people who have arrived via the wiki.ironyhub.com domain that it will be expiring soon)
 
No edit summary
Line 3: Line 3:


// Notify people who have arrived via the wiki.ironyhub.com domain that it will be expiring soon
// Notify people who have arrived via the wiki.ironyhub.com domain that it will be expiring soon
var urlParams = new URLSearchParams(document.URL);
if ((new URL(document.location)).searchParams.has("fromolddomain")) {
if (urlParams.has("fromolddomain")) {
     mw.notify($("<span>⚠️ The <i>wiki.ironyhub.com</i> domain will no longer be available after July 29. Please make sure to use the <i>irony.wiki</i> domain for all future visits.</span>"), {autoHide: false});
     mw.notify($("<span>⚠️ The <i>wiki.ironyhub.com</i> domain will no longer be available after July 29. Please make sure to use the <i>irony.wiki</i> domain for all future visits.</span>"), {autoHide: false});
}
}

Revision as of 08:53, 24 July 2022

/* Any JavaScript here will be loaded for all users on every page load. */


// Notify people who have arrived via the wiki.ironyhub.com domain that it will be expiring soon
if ((new URL(document.location)).searchParams.has("fromolddomain")) {
    mw.notify($("<span>⚠️ The <i>wiki.ironyhub.com</i> domain will no longer be available after July 29. Please make sure to use the <i>irony.wiki</i> domain for all future visits.</span>"), {autoHide: false});
}