Jump to content

MediaWiki:Common.js: Difference between revisions

From ZenithXI
Created page with "// Wait for the DOM to be fully loaded $(document).ready(function() { // Target the logo wordmark var wordmark = $('.mw-logo-wordmark'); if (wordmark.length) { // Get the current text var text = wordmark.text(); // If the text is "ZenithXI", split it if (text === "ZenithXI") { // Empty the current content wordmark.empty(); // Set inline style with !important via attribute wordmark.attr('style', 'font-size: 40px..."
 
No edit summary
Tag: Reverted
Line 12: Line 12:
       // Empty the current content
       // Empty the current content
       wordmark.empty();
       wordmark.empty();
     
      // Set inline style with !important via attribute
      wordmark.attr('style', 'font-size: 40px !important');
        
        
       // Add the colored spans
       // Add the colored spans

Revision as of 12:53, 3 April 2025

// Wait for the DOM to be fully loaded
$(document).ready(function() {
  // Target the logo wordmark
  var wordmark = $('.mw-logo-wordmark');
  
  if (wordmark.length) {
    // Get the current text
    var text = wordmark.text();
    
    // If the text is "ZenithXI", split it
    if (text === "ZenithXI") {
      // Empty the current content
      wordmark.empty();
      
      // Add the colored spans
      wordmark.append(
        $('<span>').text("ZENITH").css("color", "#0077B6"),
        $('<span>').text("XI").css("color", "#F4A261")
      );
    }
  }
});