shawenguan 2 rokov pred
rodič
commit
9accbade6f
1 zmenil súbory, kde vykonal 2 pridanie a 3 odobranie
  1. 2 3
      Scripts/tghelper/tgLinksHelper.js

+ 2 - 3
Scripts/tghelper/tgLinksHelper.js

@@ -17,10 +17,9 @@ if (matches) {
     let ncgDivHtml = `<div class="tgme_page_action"><a class="tgme_action_button_new shine" href="${newHref}">${newText}</a></div>`;
     let rHtmlText = htmlText.replace(mContent, mContent+'\n'+ncgDivHtml);
 
-    rHtmlText = rHtmlText.replace('if\s*\(true\)\s*\{', 'if (false) {');
+    rHtmlText = rHtmlText.replace(/if\s*\(true\)\s*\{/, 'if (false) {');
 
-    let regex2 = /var\s*protoUrl\s*=\s*"([\S]+)"/;
-    rHtmlText = rHtmlText.replace(regex2, 'var protoUrl=null');
+    rHtmlText = rHtmlText.replace(/var\s*protoUrl\s*=\s*"([\S]+)"/, 'var protoUrl=null');
 
     htmlText = rHtmlText;
     console.log(htmlText);