MediaWiki
Common.js
From Dogcraft Wiki
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (โ-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (โ-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* Any JavaScript here will be loaded for all users on every page load. */
/* Navigation Popups */
/* Currently Disabled
mw.loader.load('/load.php?modules=ext.gadget.Navigation_popups');
window.popupAdminLinks = false;
window.popupActionsMenu = false;
window.popupStructure = 'lite';
window.popupSubpopups = false;
window.popupSummaryData = false;
*/
$(document).ready(function() {
// var indicator = document.querySelectorAll(".mw-indicators");
// var indicator1 = indicator[0];
// if (indicator1.childNodes.length !== 1) {document.getElementById("tagline").innerHTML = indicator1.innerHTML;}
/*== Hides the actions button and indicators while in the Visual editor ==*/
mw.hook( 've.activationComplete' ).add( function () {
$('.content .top').hide();
});
mw.hook( 've.deactivationComplete' ).add( function () {
$('.content .top').show();
});
/*== Dogcraft.net topbar: Automatically enabled to display the Dogcraft.net topbar on the Help Resources(WIP) and Rules pages. (moved from gadget) ==*/
$(document).ready(function() {
if (mw.config.get('wgPageName') === "Rules" || mw.config.get('wgPageName') === "Help_Resources")
{
$('.nav .nav-title a span').text('Dogcraft');
$('#wikiNav').removeClass('expanded');
}
});
/*== Shows edit button on Rules and Help Resources for those who can edit it ==*/
var pagename = mw.config.get('wgPageName');
if (pagename === 'Rules' || pagename === 'Help_Resources') {
if (mw.config.get('wgIsProbablyEditable')) {
$('#wikiActions').show();
}
}
});
This page was last modified on 28 May 2022, at 20:02. (2 months ago)