MediaWiki:Common.js
From Lenn's Fun Stuff
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)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* Version 2.1 - Universal KH Theme (Responsive) */
(function() {
// 1. Load Google Fonts
$('head').append('<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Crimson+Pro:wght@400;700&display=swap">');
// 2. Standard Mobile Viewport (No more forced zooming)
var meta = document.createElement('meta');
meta.name = "viewport";
meta.content = "width=device-width, initial-scale=1.0";
var existingMeta = document.querySelector('meta[name="viewport"]');
if (existingMeta) {
existingMeta.setAttribute('content', meta.content);
} else {
document.getElementsByTagName('head')[0].appendChild(meta);
}
$(document).ready(function() {
console.log("KH Leaf Theme Initialized");
if (mw.config.get('skin') === 'cosmos') {
$('#p-cactions h3 span').hide();
}
});
})();