/* v35: 自愈+版本徽标 —— profile容器空则自动调用渲染;header显示当前补丁版本 */ (function () { 'use strict'; if (window.__mobV35) return; window.__mobV35 = true; function $(i) { return document.getElementById(i); } function heal() { try { var pc = $('profile-container'); if (!pc) return; var nav4 = null; var items = document.querySelectorAll('.bottom-nav .nav-item'); for (var i = 0; i < items.length; i++) { if ((items[i].getAttribute('onclick') || '').indexOf('profile') >= 0 && items[i].className.indexOf('active') >= 0) nav4 = items[i]; } var vis = pc.style.display === 'block' || nav4; if (vis && pc.children.length === 0 && typeof window.loadUserProfile === 'function') { try { window.loadUserProfile(); } catch (e) {} } /* 菜单兜底:任何 v2chip/导航点击后 1.2s 检查一次 */ } catch (e) {} } /* 版本徽标 */ function badge() { try { var hd = document.querySelector('.mobile-header'); if (!hd || $('v35ver')) return; var v = document.createElement('span'); v.id = 'v35ver'; v.textContent = 'v34'; v.style.cssText = 'font-size:9px;color:#94a3b8;background:#eef2f7;border-radius:8px;padding:1px 6px;margin-left:6px;'; var h1 = hd.querySelector('h1'); if (h1) h1.appendChild(v); } catch (e) {} } setInterval(heal, 1200); setTimeout(badge, 800); setTimeout(heal, 400); console.log('[MobV35] 自愈/版本徽标就绪(看到顶部标题旁 v34 即最新版)'); })();