MCPcopy Create free account
hub / github.com/Moli-X/Resources / RenameScript

Function RenameScript

Script/Parser.js:2289–2304  ·  view source on GitHub ↗
(servers, script)

Source from the content-addressed store, hash-verified

2287}
2288
2289function RenameScript(servers, script) {
2290 $notify("🤖 启用脚本进行重命名", "", script);
2291 try {
2292 const $ = Tools().rename;
2293 // extract server tags
2294 const nodes = Tools().getNodeInfo(servers);
2295 eval(script);
2296 const newNames = rename(nodes);
2297 // rename nodes
2298 return servers.map((s, i) => s.split("tag=")[0] + "tag=" + newNames[i]);
2299 } catch (err) {
2300 $notify("❌ 脚本重命名出现错误", "", err);
2301 return servers;
2302 }
2303
2304}
2305
2306//删除 emoji
2307function emoji_del(str) {

Callers 1

ResourceParseFunction · 0.85

Calls 2

ToolsFunction · 0.85
$notifyFunction · 0.70

Tested by

no test coverage detected