diff --git a/substore/README.md b/substore/README.md index 57213b2..ef170a1 100644 --- a/substore/README.md +++ b/substore/README.md @@ -5,7 +5,7 @@ `common.js` 是公共工具库,各处理脚本会按下面的 raw 地址自动加载: ```text -https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=20260603-6 +https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=20260603-7 ``` ## 推荐使用顺序 diff --git a/substore/alphaair-rename.js b/substore/alphaair-rename.js index b7de897..0b23a45 100644 --- a/substore/alphaair-rename.js +++ b/substore/alphaair-rename.js @@ -6,9 +6,10 @@ * - 不追加订阅后缀,整合订阅最后仍交给 rename.js 处理 */ // noinspection JSUnusedGlobalSymbols -const COMMON_SCRIPT_URL = 'https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=20260603-6'; +const COMMON_SCRIPT_VERSION = '20260603-7'; +const COMMON_SCRIPT_URL = `https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=${COMMON_SCRIPT_VERSION}`; const hasCurrentRenameUtils = utils => Boolean( - utils && typeof utils.normalizeLeadingMojibakeFlag === 'function' + utils && utils.version === COMMON_SCRIPT_VERSION ); async function loadRenameUtils() { diff --git a/substore/common.js b/substore/common.js index ae08db7..4c9b9d0 100644 --- a/substore/common.js +++ b/substore/common.js @@ -2,9 +2,10 @@ * Sub-Store 节点命名公共工具 * * 远程引用地址: - * https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=20260603-6 + * https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=20260603-7 */ (function (root) { + const VERSION = '20260603-7'; const regexSpecialChars = new Set(['.', '*', '+', '?', '^', '$', '{', '}', '(', ')', '|', '[', ']', '\\']); const leadingFlagRegex = /^([\u{1F1E6}-\u{1F1FF}]{2}|🏴‍☠️)\s*/u; const inlineFlagRegex = /^(.{1,24}?)([\u{1F1E6}-\u{1F1FF}]{2}|🏴‍☠️)\s*(.*)$/u; @@ -325,6 +326,7 @@ stripLeadingMojibakeFlag, splitLeadingFlag, splitLeadingOrInlineFlag, - stripLineDescriptors + stripLineDescriptors, + version: VERSION }; })(globalThis); diff --git a/substore/liangxin-rename.js b/substore/liangxin-rename.js index 6c9a9a2..6a42fa2 100644 --- a/substore/liangxin-rename.js +++ b/substore/liangxin-rename.js @@ -3,9 +3,10 @@ * 负责去掉高速、BGP、CMCU 等 LiangXin 线路描述,保留地区、序号和倍率。 */ // noinspection JSUnusedGlobalSymbols -const COMMON_SCRIPT_URL = 'https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=20260603-6'; +const COMMON_SCRIPT_VERSION = '20260603-7'; +const COMMON_SCRIPT_URL = `https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=${COMMON_SCRIPT_VERSION}`; const hasCurrentRenameUtils = utils => Boolean( - utils && typeof utils.normalizeLeadingMojibakeFlag === 'function' + utils && utils.version === COMMON_SCRIPT_VERSION ); async function loadRenameUtils() { diff --git a/substore/peiqian-rename.js b/substore/peiqian-rename.js index 96efe3d..827e212 100644 --- a/substore/peiqian-rename.js +++ b/substore/peiqian-rename.js @@ -3,9 +3,10 @@ * 负责清理推荐、用途、hy2、倍率、线路特征和提供商等 PeiQian 节点文案。 */ // noinspection JSUnusedGlobalSymbols -const COMMON_SCRIPT_URL = 'https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=20260603-6'; +const COMMON_SCRIPT_VERSION = '20260603-7'; +const COMMON_SCRIPT_URL = `https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=${COMMON_SCRIPT_VERSION}`; const hasCurrentRenameUtils = utils => Boolean( - utils && typeof utils.normalizeLeadingMojibakeFlag === 'function' + utils && utils.version === COMMON_SCRIPT_VERSION ); async function loadRenameUtils() { diff --git a/substore/rename.js b/substore/rename.js index 71e7166..d779888 100644 --- a/substore/rename.js +++ b/substore/rename.js @@ -5,9 +5,10 @@ * - 基于归一化后的完整名称做精准去重 */ // noinspection JSUnusedGlobalSymbols -const COMMON_SCRIPT_URL = 'https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=20260603-6'; +const COMMON_SCRIPT_VERSION = '20260603-7'; +const COMMON_SCRIPT_URL = `https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=${COMMON_SCRIPT_VERSION}`; const hasCurrentRenameUtils = utils => Boolean( - utils && typeof utils.normalizeLeadingMojibakeFlag === 'function' + utils && utils.version === COMMON_SCRIPT_VERSION ); async function loadRenameUtils() { @@ -675,6 +676,7 @@ async function operator(proxies) { const normalizeRegionSequence = name => utils.normalizeRegionSequence(name, { allowCityCode: true }); const stripTrailingFeatureSequence = name => String(name) + .replace(/\bHY\s+(\d{1,2})(?=-[A-Z]{2}\d{2}\b)/i, (match, version) => `HY${Number(version)}`) .replace(/^([A-Z]{2}(?:\s+[A-Z]{3})?)\s+([A-Z][A-Z0-9.]{1,15})\s+\d{1,2}$/i, '$1 $2') .replace(/\s{2,}/g, ' ') .trim(); diff --git a/substore/sntp-rename.js b/substore/sntp-rename.js index 69dd517..2477077 100644 --- a/substore/sntp-rename.js +++ b/substore/sntp-rename.js @@ -4,9 +4,10 @@ * 维护说明:仅需修改 featureMap 字典即可,底部逻辑永远无需改动。 */ // noinspection JSUnusedGlobalSymbols -const COMMON_SCRIPT_URL = 'https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=20260603-6'; +const COMMON_SCRIPT_VERSION = '20260603-7'; +const COMMON_SCRIPT_URL = `https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=${COMMON_SCRIPT_VERSION}`; const hasCurrentRenameUtils = utils => Boolean( - utils && typeof utils.normalizeLeadingMojibakeFlag === 'function' + utils && utils.version === COMMON_SCRIPT_VERSION ); async function loadRenameUtils() { diff --git a/substore/yuetong-rename.js b/substore/yuetong-rename.js index 82bf35e..e67c8f7 100644 --- a/substore/yuetong-rename.js +++ b/substore/yuetong-rename.js @@ -4,9 +4,10 @@ * 按地区稳定归并后重新连续编号,避免专属/普通节点撞号。 */ // noinspection JSUnusedGlobalSymbols -const COMMON_SCRIPT_URL = 'https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=20260603-6'; +const COMMON_SCRIPT_VERSION = '20260603-7'; +const COMMON_SCRIPT_URL = `https://git.orionc.me/orion/script/raw/branch/main/substore/common.js?v=${COMMON_SCRIPT_VERSION}`; const hasCurrentRenameUtils = utils => Boolean( - utils && typeof utils.normalizeLeadingMojibakeFlag === 'function' + utils && utils.version === COMMON_SCRIPT_VERSION ); async function loadRenameUtils() {