打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

Widget:GFLMail:修订间差异

来自OGAS数据中枢
弃权者留言 | 贡献
无编辑摘要
弃权者留言 | 贡献
无编辑摘要
第1行: 第1行:
<script>
document.querySelectorAll('.gfl-item').forEach(item => {
document.querySelectorAll('.gfl-item').forEach(item => {
   item.addEventListener('click', () => {
   item.addEventListener('click', () => {
     const idx = item.getAttribute('data-gfl-index');
     const idx = item.getAttribute('data-gfl-index');
     const root = item.closest('.gfl-mail');
     const root = item.closest('.gfl-mail');
     root.querySelectorAll('.gfl-detail').forEach(detail => detail.classList.remove('is-open'));
    if (!root) return;
 
     root.querySelectorAll('.gfl-detail').forEach(d => d.classList.remove('is-open'));
 
     const targetDetail = root.querySelector(`#gflDetail-${idx}`);
     const targetDetail = root.querySelector(`#gflDetail-${idx}`);
     if (targetDetail) {
     if (!targetDetail) return;
      targetDetail.classList.add('is-open');
 
      root.classList.add('view-detail');
    targetDetail.classList.add('is-open');
    root.classList.add('view-detail');
 
    const detailHeight = targetDetail.scrollHeight;
    if (detailHeight > 0) {
      root.style.height = detailHeight + 'px';
     }
     }
   });
   });
});
});
document.querySelectorAll('.gfl-back-btn').forEach(btn => {
document.querySelectorAll('.gfl-back-btn').forEach(btn => {
   btn.addEventListener('click', () => {
   btn.addEventListener('click', () => {
     const root = btn.closest('.gfl-mail');
     const root = btn.closest('.gfl-mail');
    if (!root) return;
     root.classList.remove('view-detail');
     root.classList.remove('view-detail');
     root.querySelectorAll('.gfl-detail').forEach(detail => detail.classList.remove('is-open'));
     root.querySelectorAll('.gfl-detail').forEach(d => d.classList.remove('is-open'));
 
    root.style.height = '';
   });
   });
});
});
</script>

2026年5月20日 (三) 22:49的版本

document.querySelectorAll('.gfl-item').forEach(item => {

 item.addEventListener('click', () => {
   const idx = item.getAttribute('data-gfl-index');
   const root = item.closest('.gfl-mail');
   if (!root) return;
   root.querySelectorAll('.gfl-detail').forEach(d => d.classList.remove('is-open'));
   const targetDetail = root.querySelector(`#gflDetail-${idx}`);
   if (!targetDetail) return;
   targetDetail.classList.add('is-open');
   root.classList.add('view-detail');
   const detailHeight = targetDetail.scrollHeight;
   if (detailHeight > 0) {
     root.style.height = detailHeight + 'px';
   }
 });

});

document.querySelectorAll('.gfl-back-btn').forEach(btn => {

 btn.addEventListener('click', () => {
   const root = btn.closest('.gfl-mail');
   if (!root) return;
   root.classList.remove('view-detail');
   root.querySelectorAll('.gfl-detail').forEach(d => d.classList.remove('is-open'));
   root.style.height = ;
 });

});