更新完善网页逻辑,工具迁移至html逻辑
This commit is contained in:
1 parent
c3bfce7afb
commit
646754c04d
26 files changed
+1606
-167
No files matched your search
@@ -168,6 +168,52 @@ select { width: auto; min-width: 150px; }
|
||||
/* 第三方天气 iframe 内容为白底,无法跨域改色:深色主题下用反色滤镜融入当前背景 */
|
||||
[data-theme="dark"] .weather-box iframe { filter: invert(0.9) hue-rotate(180deg) contrast(0.92) saturate(0.9); }
|
||||
|
||||
/* ---------- 首页顶部组件:访客信息模式(hero_mode=info) ---------- */
|
||||
.visitor-box { display: flex; justify-content: center; }
|
||||
.vb-grid {
|
||||
width: 100%; max-width: 800px;
|
||||
display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
|
||||
background: rgba(255, 255, 255, .28);
|
||||
border: 1px solid rgba(255, 255, 255, .22);
|
||||
border-radius: 10px; overflow: hidden;
|
||||
}
|
||||
.vb-cell { background: rgba(10, 22, 44, .32); padding: 9px 16px; text-align: left; }
|
||||
.vb-cell span { display: block; font-size: 11px; letter-spacing: .5px; opacity: .72; margin-bottom: 2px; }
|
||||
.vb-cell b { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; word-break: break-all; color: #fff; }
|
||||
|
||||
/* ---------- 首页顶部组件:空白精简模式(hero_mode=blank) ---------- */
|
||||
.hero-slim { min-height: 0; padding: 16px 0 12px; }
|
||||
|
||||
/* ============ 后台访问信息页 ============ */
|
||||
.vis-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
|
||||
.vis-stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
|
||||
.vis-stat b { display: block; font-size: 22px; line-height: 1.3; font-variant-numeric: tabular-nums; }
|
||||
.vis-stat span { font-size: 12px; color: var(--text-3); }
|
||||
.v-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
|
||||
.v-filter input[type=text] { width: 200px; }
|
||||
.v-filter input[type=text].w-s { width: 160px; }
|
||||
.v-scroll { overflow-x: auto; margin-top: 4px; }
|
||||
.v-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
|
||||
.v-tbl th, .v-tbl td { padding: 8px 10px; text-align: left; vertical-align: top; }
|
||||
.v-tbl th { color: var(--text-3); font-weight: 600; border-bottom: 1px solid var(--line-2); }
|
||||
.v-tbl td { border-bottom: 1px solid var(--line); word-break: break-all; }
|
||||
.v-tbl tr:last-child td { border-bottom: none; }
|
||||
.v-nowrap { white-space: nowrap; }
|
||||
.v-tag { display: inline-block; min-width: 44px; text-align: center; padding: 1px 8px; border-radius: 20px; font-size: 12px; border: 1px solid var(--line-2); color: var(--text-2); }
|
||||
.v-tag.good { color: var(--ok); border-color: var(--ok); }
|
||||
.v-tag.info { color: var(--brand); border-color: var(--brand); }
|
||||
.v-tag.warn { color: var(--warn); border-color: var(--warn); }
|
||||
.v-tag.bad { color: var(--danger); border-color: var(--danger); }
|
||||
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
|
||||
.pager .pg-info { font-size: 13px; color: var(--text-3); margin-right: 4px; }
|
||||
.bl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line); }
|
||||
.bl-row:first-child { border-top: none; padding-top: 0; }
|
||||
.bl-rule { font-family: Consolas, Menlo, monospace; background: var(--code-bg); color: var(--code-text); border-radius: 6px; padding: 2px 9px; font-size: 13px; }
|
||||
.bl-note { color: var(--text-2); flex: 1 1 140px; min-width: 100px; font-size: 13px; }
|
||||
.bl-time { font-size: 12px; color: var(--text-3); white-space: nowrap; }
|
||||
.vis-ok-tip { background: rgba(22, 163, 74, .12); color: var(--ok); border-radius: 8px; padding: 7px 12px; font-size: 13px; display: inline-block; }
|
||||
.vis-warn-tip { background: rgba(217, 119, 6, .12); color: var(--warn); border-radius: 8px; padding: 7px 12px; font-size: 13px; display: inline-block; }
|
||||
|
||||
/* ---------- 名言条 ---------- */
|
||||
.quote-bar { background: var(--card); border-bottom: 1px solid var(--line); }
|
||||
.quote-inner { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 16px; text-align: center; }
|
||||
@@ -572,6 +618,9 @@ a.nav-btn[data-note]:hover::after { opacity: 1; transform: translateX(-50%) tran
|
||||
.hero-top { flex-direction: column; text-align: center; }
|
||||
.hero-meta { text-align: center; }
|
||||
.weather-box iframe { width: 100%; }
|
||||
.visitor-box .vb-grid { grid-template-columns: repeat(2, 1fr); }
|
||||
.vis-stats { grid-template-columns: repeat(2, 1fr); }
|
||||
.v-filter input[type=text] { width: 100%; }
|
||||
.quote-inner { flex-wrap: wrap; }
|
||||
.boards { grid-template-columns: repeat(2, 1fr); gap: 12px; min-height: 0; }
|
||||
.board-panel { width: 100%; }
|
||||
@@ -761,3 +810,18 @@ a.nav-btn[data-note]:hover::after { opacity: 1; transform: translateX(-50%) tran
|
||||
.art-tg-txt { display: none; }
|
||||
.art-topbar-nav { gap: 4px; }
|
||||
}
|
||||
|
||||
/* ---------- 右下角 Toast 通知(后台操作成功/失败即时提示,不影响页面布局) ---------- */
|
||||
.hp-toasts { position: fixed; right: 18px; bottom: 18px; z-index: 9990; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; max-width: min(380px, calc(100vw - 36px)); pointer-events: none; }
|
||||
.hp-toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; min-width: 220px; max-width: 100%; box-sizing: border-box; background: var(--card); color: var(--text-1); border: 1px solid var(--line-2); border-left: 4px solid var(--brand); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(15,23,42,.18); font-size: 14px; line-height: 1.55; animation: hpToastIn .26s ease; }
|
||||
.hp-toast.ok { border-left-color: var(--ok); }
|
||||
.hp-toast.err { border-left-color: var(--danger); }
|
||||
.hp-toast .ht-ic { flex: none; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
|
||||
.hp-toast.ok .ht-ic { background: var(--ok); }
|
||||
.hp-toast.err .ht-ic { background: var(--danger); }
|
||||
.hp-toast .ht-tx { flex: 1 1 auto; min-width: 0; word-break: break-word; }
|
||||
.hp-toast .ht-x { flex: none; align-self: flex-start; margin-left: 2px; padding: 0 2px; border: 0; background: none; color: var(--text-3); font-size: 16px; line-height: 1; cursor: pointer; }
|
||||
.hp-toast .ht-x:hover { color: var(--danger); }
|
||||
.hp-toast.hide { opacity: 0; transform: translateY(8px); transition: opacity .22s ease, transform .22s ease; }
|
||||
@keyframes hpToastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
|
||||
@media (max-width: 600px) { .hp-toasts { right: 12px; bottom: 12px; left: 12px; align-items: stretch; } .hp-toast { min-width: 0; } }
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
+6
-5
@@ -1,6 +1,6 @@
|
||||
/* codec.js —— 编码/加解密纯前端算法库
|
||||
* 提供:UTF-8、Base64、Base32、URL、Unicode、SHA 系列(Web Crypto 原生)
|
||||
* MD5 / SHA-224 依赖 CryptoJS(由页面懒加载,双 CDN fallback)
|
||||
* MD5 / SHA-224 依赖 CryptoJS(优先本地 assets/js/crypto-js.min.js,缺失则回退 CDN)
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
@@ -177,10 +177,11 @@
|
||||
return cryptoJsDigest(algorithm, text);
|
||||
}
|
||||
|
||||
/* ---------- CryptoJS 懒加载(MD5 / SHA-224 等需要) ---------- */
|
||||
/* ---------- CryptoJS 懒加载(MD5 / SHA-224 等需要;优先本地,其次 CDN) ---------- */
|
||||
var CDN_CRYPTO_JS = [
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/crypto-js.min.js',
|
||||
'https://cdn.jsdelivr.net/npm/crypto-js@4.2.0/crypto-js.min.js'
|
||||
'../assets/js/crypto-js.min.js', // 本地内置(离线可用)
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/crypto-js.min.js', // 回退 1
|
||||
'https://cdn.jsdelivr.net/npm/crypto-js@4.2.0/crypto-js.min.js' // 回退 2
|
||||
];
|
||||
|
||||
var cryptoJSPromise = null;
|
||||
@@ -209,7 +210,7 @@
|
||||
|
||||
function cryptoJsDigest(algo, text) {
|
||||
return loadCryptoJS().then(function (C) {
|
||||
if (!C) throw new Error('计算 ' + algo + ' 需要联网加载加密组件(crypto-js)失败,请检查网络');
|
||||
if (!C) throw new Error('计算 ' + algo + ' 的加密组件加载失败:请将 crypto-js.min.js 放入 assets/js/ 目录离线使用,或检查网络');
|
||||
var method = CRYPTO_JS_METHODS[algo];
|
||||
if (!method || typeof C[method] !== 'function') throw new Error('不支持的算法: ' + algo);
|
||||
return C[method](text).toString(C.enc.Hex);
|
||||
|
||||
+180
-2
@@ -342,10 +342,90 @@
|
||||
var f = ev.target;
|
||||
if (!f || !f.getAttribute || !f.hasAttribute('data-confirm')) return;
|
||||
ev.preventDefault();
|
||||
siteConfirm(f.getAttribute('data-confirm')).then(function (ok) { if (ok) f.submit(); });
|
||||
siteConfirm(f.getAttribute('data-confirm')).then(function (ok) {
|
||||
if (ok) { f.submit(); } else { hpClearScrollY(); }
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/* ---------- 同页 POST 提交后保持滚动位置(整页刷新不再跳回顶部) ---------- */
|
||||
var HP_SCROLL_KEY = 'hp-scroll-pos';
|
||||
function hpSamePagePost(f) {
|
||||
if (!f || !f.method) return false;
|
||||
if (!/post/i.test(f.method)) return false;
|
||||
if (f.target === '_blank') return false;
|
||||
var a = (f.getAttribute('action') || '').trim();
|
||||
if (a === '') return true; // 无 action = 提交当前页
|
||||
try {
|
||||
var cur = new URL(location.href.split('#')[0]);
|
||||
var u = new URL(a, cur.href);
|
||||
return u.origin === cur.origin && u.pathname === cur.pathname;
|
||||
} catch (e) { return false; }
|
||||
}
|
||||
function hpSaveScrollY() {
|
||||
try {
|
||||
var y = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
||||
sessionStorage.setItem(HP_SCROLL_KEY, JSON.stringify({ p: location.pathname + location.search, y: y }));
|
||||
} catch (e) { /* ignore */ }
|
||||
}
|
||||
function hpClearScrollY() {
|
||||
try { sessionStorage.removeItem(HP_SCROLL_KEY); } catch (e) { /* ignore */ }
|
||||
}
|
||||
var hpScrollTarget = -1;
|
||||
function hpRestoreScrollY() {
|
||||
if (hpScrollTarget >= 0) { window.scrollTo(0, hpScrollTarget); return; }
|
||||
try {
|
||||
var raw = sessionStorage.getItem(HP_SCROLL_KEY);
|
||||
if (!raw) return;
|
||||
sessionStorage.removeItem(HP_SCROLL_KEY);
|
||||
var d = JSON.parse(raw);
|
||||
if (d && d.p === (location.pathname + location.search) && typeof d.y === 'number' && d.y > 0) {
|
||||
hpScrollTarget = d.y;
|
||||
window.scrollTo(0, hpScrollTarget);
|
||||
}
|
||||
} catch (e) { hpClearScrollY(); }
|
||||
}
|
||||
// 捕获阶段:同页 POST 提交前保存(按回车等也会触发 submit 事件)
|
||||
document.addEventListener('submit', function (ev) {
|
||||
if (hpSamePagePost(ev.target)) hpSaveScrollY();
|
||||
}, true);
|
||||
// 捕获阶段:点击提交按钮时也保存(bindConfirmForms 确认后走 f.submit() 不触发 submit 事件)
|
||||
document.addEventListener('click', function (ev) {
|
||||
var t = ev.target;
|
||||
var btn = (t && t.closest) ? t.closest('button[type="submit"], input[type="submit"], button:not([type])') : null;
|
||||
if (!btn) return;
|
||||
var f = btn.form || null;
|
||||
if (hpSamePagePost(f)) hpSaveScrollY();
|
||||
}, true);
|
||||
// 资源加载完成后再定位一次,防止图片等异步资源改变高度造成轻微偏移
|
||||
window.addEventListener('load', function () {
|
||||
if (hpScrollTarget >= 0) {
|
||||
window.scrollTo(0, hpScrollTarget);
|
||||
hpScrollTarget = -1;
|
||||
}
|
||||
});
|
||||
|
||||
/* ---------- 首页访客信息(hero 信息模式:补齐屏幕分辨率 / 系统语言) ---------- */
|
||||
function initVisitorInfo() {
|
||||
var box = $('.js-visitor-box');
|
||||
if (!box) return;
|
||||
var langEl = $('.js-vlang', box);
|
||||
if (langEl) {
|
||||
var lang = '';
|
||||
try { lang = navigator.language || (navigator.languages && navigator.languages[0]) || ''; } catch (e) { /* ignore */ }
|
||||
langEl.textContent = lang || '--';
|
||||
}
|
||||
var scrEl = $('.js-vscreen', box);
|
||||
if (scrEl) {
|
||||
var w = 0, h = 0, dpr = 1;
|
||||
try { w = window.screen.width || 0; h = window.screen.height || 0; dpr = window.devicePixelRatio || 1; } catch (e) { /* ignore */ }
|
||||
if (w && h) {
|
||||
var ratio = Math.round(dpr * 100);
|
||||
scrEl.textContent = (ratio !== 100) ? (w + ' × ' + h + '(' + ratio + '%)') : (w + ' × ' + h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------- 返回顶部(右下角按钮,滚动后出现;兼容内滚容器页面) ---------- */
|
||||
function initToTop() {
|
||||
var btn = document.querySelector('.js-to-top');
|
||||
@@ -380,8 +460,101 @@
|
||||
measure();
|
||||
}
|
||||
|
||||
/* ---------- 功能区静态工具页:库卡片 ?from=nav 进入时,返回按钮改为“返回上一页” ---------- */
|
||||
function initFuncBack() {
|
||||
var el = document.querySelector('.js-fb-back');
|
||||
if (!el) return;
|
||||
if (!/(?:^|[?&])from=nav(?:&|$)/.test(location.search)) return;
|
||||
el.textContent = '← 返回上一页';
|
||||
el.title = '返回上一页(回到来源库首页)';
|
||||
el.addEventListener('click', function (ev) {
|
||||
// 有浏览历史时返回来源页;否则保留默认 href(功能区首页)
|
||||
if (window.history.length > 1) {
|
||||
ev.preventDefault();
|
||||
window.history.back();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* ---------- 右下角 Toast 通知(后台整页刷新后的成功/失败提示使用,不影响页面布局) ---------- */
|
||||
function hpToast(kind, text, dur) {
|
||||
if (text === '' || text === null || typeof text === 'undefined') return;
|
||||
kind = (kind === 'ok' || kind === 'err') ? kind : 'ok';
|
||||
var wrap = document.querySelector('.hp-toasts');
|
||||
if (!wrap) {
|
||||
wrap = document.createElement('div');
|
||||
wrap.className = 'hp-toasts';
|
||||
document.body.appendChild(wrap);
|
||||
}
|
||||
var box = document.createElement('div');
|
||||
box.className = 'hp-toast ' + kind;
|
||||
var ic = document.createElement('span');
|
||||
ic.className = 'ht-ic';
|
||||
ic.textContent = kind === 'ok' ? '✓' : '!';
|
||||
var tx = document.createElement('div');
|
||||
tx.className = 'ht-tx';
|
||||
tx.textContent = String(text);
|
||||
var x = document.createElement('button');
|
||||
x.type = 'button';
|
||||
x.className = 'ht-x';
|
||||
x.setAttribute('aria-label', '关闭提示');
|
||||
x.textContent = '×';
|
||||
function close() {
|
||||
if (!box.parentNode) return;
|
||||
box.classList.add('hide');
|
||||
setTimeout(function () {
|
||||
if (box.parentNode) box.parentNode.removeChild(box);
|
||||
if (wrap.parentNode && !wrap.children.length) wrap.parentNode.removeChild(wrap);
|
||||
}, 240);
|
||||
}
|
||||
x.addEventListener('click', close);
|
||||
box.appendChild(ic);
|
||||
box.appendChild(tx);
|
||||
box.appendChild(x);
|
||||
wrap.appendChild(box);
|
||||
var delay = (typeof dur === 'number' && dur > 0) ? dur : (kind === 'err' ? 6000 : 3600);
|
||||
setTimeout(close, delay);
|
||||
}
|
||||
/* 由 PHP 注入的整页操作提示(window.hpToastMsg = {kind, text})自动弹出 */
|
||||
function hpShowPageToast() {
|
||||
var m = window.hpToastMsg;
|
||||
if (!m || typeof m !== 'object') return;
|
||||
hpToast(m.kind, m.text);
|
||||
}
|
||||
|
||||
/* ---------- 静态工具页 favicon 跟随后台站点 logo(api/site.php 探测,异常静默回退默认) ---------- */
|
||||
function initSiteIcon() {
|
||||
// 仅纯静态 .html 页需要(PHP 页面 favicon 已由 layout_head 服务端输出)
|
||||
if (!/\.html$/i.test(location.pathname)) return;
|
||||
var iconEl = document.querySelector('link[rel~="icon"]');
|
||||
if (!iconEl) return;
|
||||
var abs = '';
|
||||
try { abs = new URL(iconEl.getAttribute('href') || '', location.href).href; } catch (e) { return; }
|
||||
var marker = '/assets/img/logo.svg';
|
||||
var pos = abs.indexOf(marker);
|
||||
if (pos < 0) return; // 非默认图标(已自定义)则无需处理
|
||||
var root = abs.slice(0, pos + 1);
|
||||
var xhr = new XMLHttpRequest();
|
||||
try {
|
||||
xhr.open('GET', root + 'api/site.php', true);
|
||||
xhr.timeout = 4000;
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState !== 4) return;
|
||||
try {
|
||||
var d = JSON.parse(xhr.responseText || '{}');
|
||||
if (d && typeof d.logo === 'string' && d.logo !== '') {
|
||||
iconEl.href = root + d.logo;
|
||||
}
|
||||
} catch (e) { /* 接口异常:保持默认图标 */ }
|
||||
};
|
||||
xhr.onerror = function () { /* file:// 或网络异常:保持默认图标 */ };
|
||||
xhr.send();
|
||||
} catch (e) { /* 同源限制等:保持默认图标 */ }
|
||||
}
|
||||
|
||||
/* ---------- 自动初始化 ---------- */
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
initSiteIcon();
|
||||
initTheme();
|
||||
initClocks();
|
||||
initQuoteRefresh();
|
||||
@@ -390,11 +563,16 @@
|
||||
initIconControls();
|
||||
initCopyButtons();
|
||||
bindConfirmForms();
|
||||
initVisitorInfo();
|
||||
initToTop();
|
||||
initFuncBack();
|
||||
hpShowPageToast();
|
||||
});
|
||||
|
||||
global.HomePage = {
|
||||
$: $, $$: $$, copyText: copyText, applyTheme: applyTheme, currentTheme: currentTheme,
|
||||
confirm: siteConfirm, ask: askConfirm
|
||||
confirm: siteConfirm, ask: askConfirm, toast: hpToast
|
||||
};
|
||||
// 底部脚本执行时 DOM 已解析完毕:在首帧绘制前后尽早恢复滚动位置,避免“先停在顶部再跳回”的大幅跳动
|
||||
hpRestoreScrollY();
|
||||
})(window);
|
||||
+11
-8
@@ -1,7 +1,7 @@
|
||||
/* gmcrypto.js —— 国密 SM2 / SM3 / SM4 前端封装
|
||||
* SM1 为国密硬件算法(不公开、依赖专用加密芯片),无法在浏览器纯软件实现,
|
||||
* 故本页提供可在网页中直接使用的 SM2(非对称)/ SM3(摘要)/ SM4(对称分组)。
|
||||
* 底层使用 sm-crypto@0.3.13,运行时按需双 CDN 懒加载(jsdelivr → unpkg)。
|
||||
* 底层使用 sm-crypto@0.3.13:优先本地 assets/js/sm-crypto/ 目录,缺失则回退 CDN(jsdelivr → unpkg)。
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
@@ -11,22 +11,25 @@
|
||||
sm2: {
|
||||
file: 'sm2.js', key: 'sm2',
|
||||
urls: [
|
||||
'https://cdn.jsdelivr.net/npm/sm-crypto@' + VERSION + '/dist/sm2.js',
|
||||
'https://unpkg.com/sm-crypto@' + VERSION + '/dist/sm2.js'
|
||||
'../assets/js/sm-crypto/sm2.js', // 本地内置(离线可用)
|
||||
'https://cdn.jsdelivr.net/npm/sm-crypto@' + VERSION + '/dist/sm2.js', // 回退 1
|
||||
'https://unpkg.com/sm-crypto@' + VERSION + '/dist/sm2.js' // 回退 2
|
||||
]
|
||||
},
|
||||
sm3: {
|
||||
file: 'sm3.js', key: 'sm3',
|
||||
urls: [
|
||||
'https://cdn.jsdelivr.net/npm/sm-crypto@' + VERSION + '/dist/sm3.js',
|
||||
'https://unpkg.com/sm-crypto@' + VERSION + '/dist/sm3.js'
|
||||
'../assets/js/sm-crypto/sm3.js', // 本地内置(离线可用)
|
||||
'https://cdn.jsdelivr.net/npm/sm-crypto@' + VERSION + '/dist/sm3.js', // 回退 1
|
||||
'https://unpkg.com/sm-crypto@' + VERSION + '/dist/sm3.js' // 回退 2
|
||||
]
|
||||
},
|
||||
sm4: {
|
||||
file: 'sm4.js', key: 'sm4',
|
||||
urls: [
|
||||
'https://cdn.jsdelivr.net/npm/sm-crypto@' + VERSION + '/dist/sm4.js',
|
||||
'https://unpkg.com/sm-crypto@' + VERSION + '/dist/sm4.js'
|
||||
'../assets/js/sm-crypto/sm4.js', // 本地内置(离线可用)
|
||||
'https://cdn.jsdelivr.net/npm/sm-crypto@' + VERSION + '/dist/sm4.js', // 回退 1
|
||||
'https://unpkg.com/sm-crypto@' + VERSION + '/dist/sm4.js' // 回退 2
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -137,7 +140,7 @@
|
||||
|
||||
function need(name) {
|
||||
return loadLib(name).then(function (lib) {
|
||||
if (!lib) throw new Error('国密 ' + name.toUpperCase() + ' 组件加载失败,请检查网络后重试');
|
||||
if (!lib) throw new Error('国密 ' + name.toUpperCase() + ' 组件加载失败:请将 ' + name + '.js 放入 assets/js/sm-crypto/ 目录离线使用,或检查网络后重试');
|
||||
return lib;
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 段按出现次数(段内全部 IP 原文出现次数之和)从高到低排列;
|
||||
* 「重点匹配 IP」:填写的 IP 命中后,其所在 /24 段优先置顶、对应 IP 红色标出。
|
||||
* CDN 段库由服务端通过 #ipCdnRaw 隐藏文本框注入,可在后台维护。
|
||||
* CDN 段库默认内置在页面 #ipCdnRaw 隐藏文本框中(func/ip.html),可直接用编辑器增补厂商。
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
Reference in new issue
Block a user