MediaWiki:Modern.js
Jump to navigation
Jump to search
Note: After saving, you may have to bypass your browser's cache to see the changes. Mozilla / Firefox / Safari: hold down Shift while clicking Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac); IE: hold Ctrl while clicking Refresh, or press Ctrl-F5; Konqueror: simply click the Reload button, or press F5; Opera users may need to completely clear their cache in Tools→Preferences. — More skins
/*extern addOnloadHook */
//add an alt stylesheet
$( function () {
link = document.createElement('link');
link.type = 'text/css';
link.href = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/index.php?title=Wikinews%3ASkins%2FDynamicMenu.css&action=raw&ctype=text/css&smaxage=2678400';
link.media = 'screen,projection';
link.rel = "alternate stylesheet";
link.title = 'Dynamic Menus';
document.getElementsByTagName('head')[0].appendChild(link);
});
//Make an empty p-logo portlet that can be styled. by itself doesn't do anything (code for apperence at css file). (Maintainer: Bawolff)
var addLogoDiv = function () {
var port = document.getElementById("mw_portlets");
if (!port) return;
var logo = document.createElement("a");
logo.href = mw.config.get('wgArticlePath').replace( '$1', 'Main_Page' );
logo.style.display = 'block';
logo.id = "p-logo";
logo.className = "portlet";
var nav = document.getElementById("p-navigation");
port.insertBefore(logo, nav);
}
$(addLogoDiv);