shawenguan 2 лет назад
Родитель
Сommit
2283d595e1
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      Scripts/tglinks/tglinks.js

+ 4 - 0
Scripts/tglinks/tglinks.js

@@ -16,6 +16,10 @@ if (matches) {
     let newText = 'View on Nicegram';
     let replacement = `<a class="tgme_action_button_new shine" href="${newHref}">${newText}</a>`;
     let newHtmlStr = html.replace(regex, matches[0]+'\n'+replacement);
+
+    let regex2 = /var\s*protoUrl\s*=\s*"([^"]+)"/;
+    newHtmlStr = newHtmlStr.replace(regex, 'var protoUrl=null');
+
     newHtmlStr = newHtmlStr.replace('if\s*\(true\)\s*\{', 'if (false) {');
     html = newHtmlStr;
 }