MediaWiki:Common.js: Difference between revisions
From Polcompball Wiki
Jump to navigationJump to search
Content added Content deleted
No edit summary |
No edit summary Tag: Reverted |
||
Line 21: | Line 21: | ||
if (top.children().length) return; |
if (top.children().length) return; |
||
top.html('<div id="top" style="background: #1d2021;font-weight: bold;color: white;border: 2px solid #08265c;border-radius: 4px;padding: 2%;font-size: 16px;height: 140px;display: inline-block;width: 96%;"><div><img alt="Council-Communism-Chara-Portrait-Server Profile Picture.png" src="//static.miraheze.org/polcompballwiki/thumb/d/d8/Council-Communism-Chara-Portrait-Server_Profile_Picture.png/200px-Council-Communism-Chara-Portrait-Server_Profile_Picture.png" decoding="async" srcset="//static.miraheze.org/polcompballwiki/thumb/d/d8/Council-Communism-Chara-Portrait-Server_Profile_Picture.png/300px-Council-Communism-Chara-Portrait-Server_Profile_Picture.png 1.5x, //static.miraheze.org/polcompballwiki/thumb/d/d8/Council-Communism-Chara-Portrait-Server_Profile_Picture.png/400px-Council-Communism-Chara-Portrait-Server_Profile_Picture.png 2x" data-file-height="400" data-file-width="400" width="100px" height="100%"><div style="width: 90%;margin-left: 100px;margin-top: -100px;"><div style="font-size: 20px;color: #d40000;"> |
top.html('<div id="top" style="background: #1d2021;font-weight: bold;color: white;border: 2px solid #08265c;border-radius: 4px;padding: 2%;font-size: 16px;height: 140px;display: inline-block;width: 96%;"><div><img alt="Council-Communism-Chara-Portrait-Server Profile Picture.png" src="//static.miraheze.org/polcompballwiki/thumb/d/d8/Council-Communism-Chara-Portrait-Server_Profile_Picture.png/200px-Council-Communism-Chara-Portrait-Server_Profile_Picture.png" decoding="async" srcset="//static.miraheze.org/polcompballwiki/thumb/d/d8/Council-Communism-Chara-Portrait-Server_Profile_Picture.png/300px-Council-Communism-Chara-Portrait-Server_Profile_Picture.png 1.5x, //static.miraheze.org/polcompballwiki/thumb/d/d8/Council-Communism-Chara-Portrait-Server_Profile_Picture.png/400px-Council-Communism-Chara-Portrait-Server_Profile_Picture.png 2x" data-file-height="400" data-file-width="400" width="100px" height="100%"><div style="width: 90%;margin-left: 100px;margin-top: -100px;"><div style="font-size: 20px;color: #d40000;">Today is the day the backup of the wiki is saved, in preperation for the migration to <a href="https://polcompball.wikitide.org/wiki/Main_Page">WikiTide</a>. During this, it is vital then wiki isn't changed in the slightest. Do not edit main wiki pages, user pages or create new pages. Doing so will result in an immediate ban.</div><div style="margin-top: 10px;color: #d2d2d2;"><a href="https://polcompball.miraheze.org/wiki/Blog:Announcement_(2023;Week_42)">Full mod announcement</a></div></div></div><div style="width: 2%;margin-left: 99.9%;margin-top: -70px;"><button id="close_top" style="border: 0px;padding: 0px;width: 2%;background: #1d2021;color: #d2d2d2; cursor: pointer;">X</button></div><div>'); |
||
$("#close_top").on("click", function () { |
$("#close_top").on("click", function () { |
Revision as of 07:37, 28 October 2023
/* Any JavaScript here will be loaded for all users on every page load. */
$( '#discord-widget' ).html( '<iframe src="https://discord.com/widget?id=855837257729835038&theme=dark" width="270" height="570" allowtransparency="true" frameborder="0" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe>' );
function addMsgBox() {
var dismissed = localStorage.getItem("dismissed-pcb-msgbox-1");
if (dismissed === "true") {
return;
}
/**@typedef {import("types-mediawiki")}*/
var mw = mw || window.mw;
var currentPage = new mw.Title(mw.config.get("wgPageName"));
var ns = currentPage.namespace;
if (ns === 0 || ns === 2 || ns === 200) {
var top = $("#top");
if (top.children().length) return;
top.html('<div id="top" style="background: #1d2021;font-weight: bold;color: white;border: 2px solid #08265c;border-radius: 4px;padding: 2%;font-size: 16px;height: 140px;display: inline-block;width: 96%;"><div><img alt="Council-Communism-Chara-Portrait-Server Profile Picture.png" src="//static.miraheze.org/polcompballwiki/thumb/d/d8/Council-Communism-Chara-Portrait-Server_Profile_Picture.png/200px-Council-Communism-Chara-Portrait-Server_Profile_Picture.png" decoding="async" srcset="//static.miraheze.org/polcompballwiki/thumb/d/d8/Council-Communism-Chara-Portrait-Server_Profile_Picture.png/300px-Council-Communism-Chara-Portrait-Server_Profile_Picture.png 1.5x, //static.miraheze.org/polcompballwiki/thumb/d/d8/Council-Communism-Chara-Portrait-Server_Profile_Picture.png/400px-Council-Communism-Chara-Portrait-Server_Profile_Picture.png 2x" data-file-height="400" data-file-width="400" width="100px" height="100%"><div style="width: 90%;margin-left: 100px;margin-top: -100px;"><div style="font-size: 20px;color: #d40000;">Today is the day the backup of the wiki is saved, in preperation for the migration to <a href="https://polcompball.wikitide.org/wiki/Main_Page">WikiTide</a>. During this, it is vital then wiki isn't changed in the slightest. Do not edit main wiki pages, user pages or create new pages. Doing so will result in an immediate ban.</div><div style="margin-top: 10px;color: #d2d2d2;"><a href="https://polcompball.miraheze.org/wiki/Blog:Announcement_(2023;Week_42)">Full mod announcement</a></div></div></div><div style="width: 2%;margin-left: 99.9%;margin-top: -70px;"><button id="close_top" style="border: 0px;padding: 0px;width: 2%;background: #1d2021;color: #d2d2d2; cursor: pointer;">X</button></div><div>');
$("#close_top").on("click", function () {
localStorage.setItem("dismissed-pcb-msgbox-1", "true");
$("#top").html("");
});
}
}
window.addEventListener("load", function () {
addMsgBox();
});
setTimeout(function () {
var ev = new Event("load");
window.dispatchEvent(ev);
}, 1000);