shawenguan hace 2 años
padre
commit
96ce9b38b2
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      Scripts/tglinks/tglinks.js

+ 3 - 0
Scripts/tglinks/tglinks.js

@@ -9,11 +9,14 @@ if (matches) {
     let allContent = matches[0];
     let allContent = matches[0];
     let originalHref = matches[1];
     let originalHref = matches[1];
     let originalText = matches[2];
     let originalText = matches[2];
+    console.log(originalHref);
+    console.log(originalText);
     // 定义新的href和链接文本
     // 定义新的href和链接文本
     let newHref = originalHref.replace('tg://', 'ncg://');
     let newHref = originalHref.replace('tg://', 'ncg://');
     let newText = 'View on Nicegram';
     let newText = 'View on Nicegram';
     let replacement = `<a class="tgme_action_button_new shine" href="${newHref}">${newText}</a>`;
     let replacement = `<a class="tgme_action_button_new shine" href="${newHref}">${newText}</a>`;
     let newHtmlStr = html.replace(regex, matches[0]+'\n'+replacement);
     let newHtmlStr = html.replace(regex, matches[0]+'\n'+replacement);
+    newHtmlStr = newHtmlStr.replace('if\s*\(true\)\s*\{', 'if (false) {');
     html = newHtmlStr;
     html = newHtmlStr;
 }
 }
 $.done({
 $.done({