From acadfaad1524b97670db52fdf9cf68f31c0f3c69 Mon Sep 17 00:00:00 2001 From: Shawn <45581750+KOP-XIAO@users.noreply.github.com> Date: Wed, 6 Jul 2022 15:41:55 +0800 Subject: [PATCH] update --- Scripts/switch-check-disneyplus.js | 8 ++++++++ Scripts/switch-check-nf.js | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/Scripts/switch-check-disneyplus.js b/Scripts/switch-check-disneyplus.js index 26906a3..0887ff1 100644 --- a/Scripts/switch-check-disneyplus.js +++ b/Scripts/switch-check-disneyplus.js @@ -42,6 +42,14 @@ var policy = $environment.executeType == 0 || $environment.executeType == "0" || console.log(JSON.stringify($environment)) console.log("策略组:"+policy) +function GetPolicy(cnt) { + if (cnt && cnt.indexOf("#policy=") !=-1) { + return decodeURIComponent(cnt.split("#policy=")[1].trim()) + }else { + return "" + } +} + const message = { action: "get_customized_policy", content: policy diff --git a/Scripts/switch-check-nf.js b/Scripts/switch-check-nf.js index 52fd2c4..822b939 100644 --- a/Scripts/switch-check-nf.js +++ b/Scripts/switch-check-nf.js @@ -30,6 +30,14 @@ var policy = $environment.executeType == 0 || $environment.executeType == "0" || console.log(JSON.stringify($environment)) console.log("策略组:"+policy) +function GetPolicy(cnt) { + if (cnt && cnt.indexOf("#policy=") !=-1) { + return decodeURIComponent(cnt.split("#policy=")[1].trim()) + }else { + return "" + } +} + const message = { action: "get_customized_policy", content: policy