|
@@ -4,7 +4,8 @@ let htmlText = $response.body || '';
|
|
|
let regex = /<div class="tgme_page_action">\s*<a class="tgme_action_button_new shine" href="([\S]+)">([^<]+)<\/a>\s*<\/div>/;
|
|
let regex = /<div class="tgme_page_action">\s*<a class="tgme_action_button_new shine" href="([\S]+)">([^<]+)<\/a>\s*<\/div>/;
|
|
|
let matches = htmlText.match(regex);
|
|
let matches = htmlText.match(regex);
|
|
|
if (matches) {
|
|
if (matches) {
|
|
|
- let isTgToNcgNotify = lk.getVal('lkTgToNcgNotify', '');
|
|
|
|
|
|
|
+ let tgToNcgNotifyFlag = lk.getVal('lkTgToNcgNotifyFlag', 'true');
|
|
|
|
|
+ tgToNcgNotifyFlag = lk.isEmpty(tgToNcgNotifyFlag) ? true : JSON.parse(tgToNcgNotifyFlag);
|
|
|
|
|
|
|
|
let mContent = matches[0];
|
|
let mContent = matches[0];
|
|
|
let originalHref = matches[1];
|
|
let originalHref = matches[1];
|
|
@@ -19,12 +20,13 @@ if (matches) {
|
|
|
|
|
|
|
|
rHtmlText = rHtmlText.replace(/if\s*\(true\)\s*\{/, 'if (false) {');
|
|
rHtmlText = rHtmlText.replace(/if\s*\(true\)\s*\{/, 'if (false) {');
|
|
|
|
|
|
|
|
- rHtmlText = rHtmlText.replace(/var\s*protoUrl\s*=\s*"([\S]+)"/, 'var protoUrl=null');
|
|
|
|
|
|
|
+ rHtmlText = rHtmlText.replace(/var\s*protoUrl\s*=\s*"([\S]+);"/, 'var protoUrl=null;');
|
|
|
|
|
|
|
|
htmlText = rHtmlText;
|
|
htmlText = rHtmlText;
|
|
|
- console.log(htmlText);
|
|
|
|
|
|
|
|
|
|
- if(!lk.isEmpty(isTgToNcgNotify)){
|
|
|
|
|
|
|
+ // console.log(htmlText);
|
|
|
|
|
+
|
|
|
|
|
+ if(tgToNcgNotifyFlag){
|
|
|
lk.msg('', '在"Nicegram"中打开?', newHref);
|
|
lk.msg('', '在"Nicegram"中打开?', newHref);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|