MediaWiki:Common.js: Perbedaan antara revisi

Tidak ada ringkasan suntingan
Tanda: Suntingan perangkat seluler Suntingan peramban seluler
Tidak ada ringkasan suntingan
Tanda: Suntingan perangkat seluler Suntingan peramban seluler
Baris 1.327: Baris 1.327:


/* ==========================================================
/* ==========================================================
   🌙 MIPPEDIA DARK MODE ENGINE V2 (FULL COVERAGE)
   🌙 MIPPEDIA DARK MODE ENGINE V3 - FULL REPAIR
   Fix: Menjangkau Halaman Terkait, Footer, dan Mobile Cards
   Fix: Infobox, Tabel Data, Footer Lisensi, & Mobile Header
   ========================================================== */
   ========================================================== */
(function() {
(function() {
     var darkModeStyles = `
     var darkModeStyles = `
         /* 1. Global Reset & Content */
         /* 1. Reset Global */
         body.mippedia-dark,  
         body.mippedia-dark,  
         .mippedia-dark #content,  
         .mippedia-dark #content,  
         .mippedia-dark #mw-content-text,
         .mippedia-dark .pagelib-hentry,
         .mippedia-dark .pagelib-hentry {  
         .mippedia-dark .mw-body {  
             background-color: #121212 !important;  
             background-color: #121212 !important;  
             color: #e0e0e0 !important;  
             color: #e0e0e0 !important;  
         }
         }


         /* 2. Fix Halaman Terkait & Cards (Berdasarkan Screenshot) */
         /* 2. INFOBOX & TABEL FIX (Berdasarkan Screenshot lo) */
         .mippedia-dark .ext-related-articles-card,
         .mippedia-dark .infobox,
         .mippedia-dark .minerva-footer,
         .mippedia-dark table.wikitable,
        .mippedia-dark .read-more-container,
         .mippedia-dark .mw-parser-output table,
         .mippedia-dark .mw-ui-card,
         .mippedia-dark table {
         .mippedia-dark .related-article-card {
             background-color: #1e1e1e !important;
             background-color: #1e1e1e !important;
            color: #e0e0e0 !important;
            border-color: #333 !important;
        }
        .mippedia-dark .infobox th,
        .mippedia-dark table th,
        .mippedia-dark .infobox .infobox-header {
            background-color: #252525 !important;
            color: #ffffff !important;
        }
        .mippedia-dark .infobox td, .mippedia-dark table td {
             border-color: #333 !important;
             border-color: #333 !important;
            color: #e0e0e0 !important;
         }
         }
        .mippedia-dark .ext-related-articles-card__extract { color: #bbbbbb !important; }


         /* 3. Header & Navigation */
         /* 3. FOOTER & LISENSI FIX (Bagian bawah yang masih putih) */
         .mippedia-dark .header-container,
         .mippedia-dark .minerva-footer,
         .mippedia-dark .mw-header,
         .mippedia-dark .last-modified-bar,
         .mippedia-dark .navigation-drawer {
        .mippedia-dark #footer,
         .mippedia-dark .post-content.footer-content {
             background-color: #181818 !important;
             background-color: #181818 !important;
             border-bottom: 1px solid #333 !important;
            color: #bbbbbb !important;
             border-top: 1px solid #333 !important;
        }
        .mippedia-dark .license { color: #888 !important; }
 
        /* 4. HALAMAN TERKAIT & CARD REPAIR */
        .mippedia-dark .ext-related-articles-card,
        .mippedia-dark .mw-ui-card {
            background-color: #1e1e1e !important;
            border: 1px solid #333 !important;
         }
         }


         /* 4. Teks, Link, & Judul */
         /* 5. TEKS & LINK SINKRONISASI */
         .mippedia-dark h1, .mippedia-dark h2, .mippedia-dark h3, .mippedia-dark h4 { color: #ffffff !important; }
         .mippedia-dark h1, .mippedia-dark h2, .mippedia-dark h3 { color: #ffffff !important; }
         .mippedia-dark a { color: #8ab4f8 !important; }
         .mippedia-dark a { color: #8ab4f8 !important; }
         .mippedia-dark a:visited { color: #c58af9 !important; }
         .mippedia-dark a.new { color: #ff8080 !important; } /* Link merah buat halaman kosong */
         .mippedia-dark .mw-ui-button { background-color: #2d2d2d !important; color: #fff !important; }
         .mippedia-dark .mw-ui-button { background-color: #3498db !important; color: #fff !important; }


         /* 5. Tombol Saklar Melayang */
         /* 6. TOMBOL SAKLAR (Gue bikin lebih rapi) */
         #darkmode-toggle {
         #darkmode-toggle {
             position: fixed;
             position: fixed;
             bottom: 80px; /* Gue naikin dikit biar gak tabrakan sama tombol Scroll Up */
             bottom: 90px;
             right: 20px;
             right: 15px;
             width: 50px;
             width: 48px;
             height: 50px;
             height: 48px;
             background: #3498db;
             background: #3498db;
             color: white;
             color: white;
             border-radius: 50%;
             border-radius: 50%;
             text-align: center;
             text-align: center;
             line-height: 50px;
             line-height: 48px;
             font-size: 24px;
             font-size: 22px;
             cursor: pointer;
             cursor: pointer;
             z-index: 99999;
             z-index: 100000;
             box-shadow: 0 4px 15px rgba(0,0,0,0.5);
             box-shadow: 0 4px 12px rgba(0,0,0,0.6);
             transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
             transition: 0.3s;
            user-select: none;
         }
         }
         .mippedia-dark #darkmode-toggle { background: #f1c40f; color: #333; }
         .mippedia-dark #darkmode-toggle { background: #f1c40f; color: #333; }
Baris 1.394: Baris 1.410:


     $(document).ready(function() {
     $(document).ready(function() {
         var $toggle = $('<div id="darkmode-toggle">🌙</div>');
         if (!$('#darkmode-toggle').length) {
        $('body').append($toggle);
            var $toggle = $('<div id="darkmode-toggle">🌙</div>');
            $('body').append($toggle);
        }


         if (localStorage.getItem('mip-dark-mode') === 'enabled') {
         if (localStorage.getItem('mip-dark-mode') === 'enabled') {
             $('body').addClass('mippedia-dark');
             $('body').addClass('mippedia-dark');
             $toggle.html('☀️');
             $('#darkmode-toggle').html('☀️');
         }
         }


         $toggle.on('click', function() {
         $('#darkmode-toggle').on('click', function() {
             $('body').toggleClass('mippedia-dark');
             $('body').toggleClass('mippedia-dark');
             if ($('body').hasClass('mippedia-dark')) {
             if ($('body').hasClass('mippedia-dark')) {