MediaWiki:Common.js: Difference between revisions

m 7 revisions imported
No edit summary
Tags: Mobile edit Mobile web edit
Line 1: Line 1:
/* Force load Google Fonts for Anisa */
/* Force 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">');
$('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">');


/* FORCE ANISA THEME INJECTION */
/* FORCE KH THEME INJECTION FOR COSMOS */
$(document).ready(function() {
$(document).ready(function() {
     if (mw.config.get('skin') === 'anisa') {
    // Check for cosmos skin
         var khStyles = `
     if (mw.config.get('skin') === 'cosmos') {
            @import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Crimson+Pro:wght@400;700&display=swap');
         console.log("KH Leaf Theme Initialized on Cosmos");
            :root {
       
                --kh-green: #3e5a47 !important;
        // Ensure the manual bubble handles the 'Actions' text correctly
                --kh-yellow: #ffd700 !important;
         $('#p-cactions h3 span').hide();
                --kh-dark-text: #2d4234 !important;
                --kh-light-bg: #f9fdfa !important;
            }
            .mw-parser-output h2, .mw-parser-output h3 {
                border-bottom: 2px solid var(--kh-green) !important;
                color: var(--kh-green) !important;
                font-family: 'Cinzel', serif !important;
            }
            .mw-parser-output h2::before { content: "\1F343  "; }
        `;
         $('<style>').text(khStyles).appendTo('head');
     }
     }
});
});