打开/关闭菜单
26
6675
46
1.2万
OGAS数据中枢
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

微件:追放信息

来自OGAS数据中枢
弃权者留言 | 贡献2026年5月27日 (三) 22:55的版本 (撤销弃权者讨论)的修订版本18827
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

<script> (function() {

   function initExileInfobox() {
       document.querySelectorAll('.xb').forEach(function(box) {
           if (box.dataset.initialized) return;
           box.dataset.initialized = 'true';
           var btn = box.querySelector('.xb-skin-btn');
           var overlay = box.querySelector('.xb-overlay');
           var curName = box.querySelector('.xb-cur-name');
           var items = box.querySelectorAll('.xb-skin-item');
           var imgs = box.querySelectorAll('.xb-img-item');
           var intros = box.querySelectorAll('.xb-intro-item');
           if (!btn || !overlay) return;
           btn.addEventListener('click', function(e) {
               e.stopPropagation();
               var isOpen = overlay.classList.toggle('open');
               btn.classList.toggle('open', isOpen);
           });
           items.forEach(function(item) {
               item.addEventListener('click', function() {
                   var idx = item.getAttribute('data-idx');
                   items.forEach(function(el) { el.classList.remove('on'); });
                   imgs.forEach(function(el) { el.classList.remove('on'); });
                   intros.forEach(function(el) { el.classList.remove('on'); });
                   item.classList.add('on');
                   if (imgs[idx]) imgs[idx].classList.add('on');
                   if (intros[idx]) intros[idx].classList.add('on');
                   var nameEl = item.querySelector('.xb-skin-item-name');
                   if (nameEl && curName) {
                       curName.textContent = nameEl.textContent;
                   }
                   overlay.classList.remove('open');
                   btn.classList.remove('open');
               });
           });
           document.addEventListener('click', function(e) {
               if (!overlay.contains(e.target) && e.target !== btn) {
                   overlay.classList.remove('open');
                   btn.classList.remove('open');
               }
           });
       });
   }
   if (document.readyState === 'loading') {
       document.addEventListener('DOMContentLoaded', initExileInfobox);
   } else {
       initExileInfobox();
   }

})(); </script>