🐛 修复(substore): 强制加载匹配版本的公共工具
This commit is contained in:
+4
-2
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user