打开/关闭菜单
1680
2.2万
6524
11.7万
舰R百科
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

舰R百科是靠无数志愿编辑者持续地建设更新完善的。编辑非常简单,无需代码知识,请勇于更新页面!
编辑入门 | 资助百科 | 留言讨论页 | 微博@舰R百科 | 百科编辑讨论Q群:366818861

微件:Donation:修订间差异

舰R百科,玩家自由编辑的战舰少女R百科
无编辑摘要
无编辑摘要
第4行: 第4行:
     <strong>Donation Banner Widget</strong><br>
     <strong>Donation Banner Widget</strong><br>
     Use this code in <i>MediaWiki:Sitenotice</i> to display the banner:<br>
     Use this code in <i>MediaWiki:Sitenotice</i> to display the banner:<br>
     <b>{{#widget:Donation}}</b>
     <b>{{#widget:DonationBanner}}</b>
   </div>
   </div>
</noinclude>
</noinclude>
第134行: 第134行:
             <!-- IMPORTANT: Change 'DonationQR.png' to your actual file name -->
             <!-- IMPORTANT: Change 'DonationQR.png' to your actual file name -->
             <!-- We use Special:FilePath to get the raw image URL dynamically -->
             <!-- We use Special:FilePath to get the raw image URL dynamically -->
             <img src="https://0v0.zjsnrwiki.com/images/c/c9/Afdian_qr_small.png" alt="Donation QR Code">
             <img src="/wiki/Special:FilePath/DonationQR.png" alt="Donation QR Code">
             <div class="jr-qr-caption">扫码支持</div>
             <div class="jr-qr-caption">扫码支持</div>
         </div>
         </div>
第152行: 第152行:


     if (!isClosed) {
     if (!isClosed) {
         // Show the banner
         // Show the banner using vanilla JS
         $(banner).fadeIn(); // Use jQuery for smooth fade if available, or just banner.style.display = 'block';
         if (banner) {
            banner.style.display = 'block';
        }
     }
     }


     // 2. Handle Close Click
     // 2. Handle Close Click
     closeBtn.addEventListener('click', function() {
     if (closeBtn) {
        // Hide visually
        closeBtn.addEventListener('click', function() {
        $(banner).slideUp();  
            // Hide visually using vanilla JS
       
            if (banner) {
        // Save to storage
                banner.style.display = 'none';
        localStorage.setItem(storageKey, 'true');
            }
    });
           
            // Save to storage
            localStorage.setItem(storageKey, 'true');
        });
    }
})();
})();
</script>
</script>
</includeonly>
</includeonly>