From 1bc9c1d6c1b5565f2410aa650d67eef9060d4197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E8=90=BD=E5=87=8B=E6=AE=87?= <1782832653@qq.com> Date: Wed, 24 Feb 2021 01:03:23 +0000 Subject: [PATCH] Update skyaddfriends.js --- skyaddfriends.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/skyaddfriends.js b/skyaddfriends.js index 9ec8471..cc2d15c 100644 --- a/skyaddfriends.js +++ b/skyaddfriends.js @@ -4,9 +4,10 @@ url = url.trim(); //校验链接 var isNetease = /^http[s]{0,1}:\/\/sky.163.com\/yqlj\/\?i=[\w_]+$/.test(url); var isInternational = /^http[s]{0,1}:\/\/sky.thatg.co\/\?i=[\w_]+$/.test(url); +var isTest = /^http[s]{0,1}:\/\/sky-beta.thatg.co\/\?i=[\w_]+$/.test(url); var packageName,className; //判断国服或国际服链接 -if (isNetease == false && isInternational == false) { +if (isNetease == false && isInternational == false && isTest == false) { toast('请检查链接是否正确!'); } else if (isNetease) { toast('添加国服好友!'); @@ -16,14 +17,18 @@ if (isNetease == false && isInternational == false) { toast('添加国际服好友!'); packageName = 'com.tgc.sky.android'; className = 'com.tgc.sky.GameActivity'; +} else if (isTest){ + toast('添加测试际服好友!'); + packageName = 'com.tgc.sky.android.test.gold'; + className = 'com.tgc.sky.GameActivity'; } log(packageName, '=>', url); //启动app -if (isNetease || isInternational) { +if (isNetease || isInternational || isTest) { app.startActivity({ action: "android.intent.action.VIEW", data: url, packageName: packageName, className: className }); -} \ No newline at end of file +}