diff --git a/src/content_scripts/thread_inject.js b/src/content_scripts/thread_inject.js
index 90eb421..984774e 100644
--- a/src/content_scripts/thread_inject.js
+++ b/src/content_scripts/thread_inject.js
@@ -1,45 +1,35 @@
-var CCRegex = /^https:\/\/support\.google\.com\/s\/community/;
-if (!CCRegex.test(location.href)) {
-  var intersectionObserver;
+var intersectionObserver;
 
-  function intersectionCallback(entries, observer) {
-    entries.forEach(entry => {
-      if (entry.isIntersecting) {
-        entry.target.click();
-      }
-    });
-  };
-
-  var intersectionOptions = {
-    threshold: 1.0,
-  };
-
-  chrome.storage.sync.get(null, function(items) {
-    var path = document.location.pathname.split('/');
-    if (path[path.length - 1] == 'new' ||
-        (path.length > 1 && path[path.length - 1] == '' &&
-         path[path.length - 2] == 'new')) {
-      return;
-    }
-
-    var redirectLink = document.querySelector('.community-console');
-    if (items.redirect && redirectLink !== null) {
-      window.location = redirectLink.href;
-    } else {
-      var button =
-          document.querySelector('.thread-all-replies__load-more-button');
-      if (items.thread && button !== null) {
-        intersectionObserver =
-            new IntersectionObserver(intersectionCallback, intersectionOptions);
-        intersectionObserver.observe(button);
-      }
-      var allbutton =
-          document.querySelector('.thread-all-replies__load-all-button');
-      if (items.threadall && button !== null) {
-        intersectionObserver =
-            new IntersectionObserver(intersectionCallback, intersectionOptions);
-        intersectionObserver.observe(allbutton);
-      }
+function intersectionCallback(entries, observer) {
+  entries.forEach(entry => {
+    if (entry.isIntersecting) {
+      entry.target.click();
     }
   });
-}
+};
+
+var intersectionOptions = {
+  threshold: 1.0,
+};
+
+chrome.storage.sync.get(null, function(items) {
+  var redirectLink = document.querySelector('.community-console');
+  if (items.redirect && redirectLink !== null) {
+    window.location = redirectLink.href;
+  } else {
+    var button =
+        document.querySelector('.thread-all-replies__load-more-button');
+    if (items.thread && button !== null) {
+      intersectionObserver =
+          new IntersectionObserver(intersectionCallback, intersectionOptions);
+      intersectionObserver.observe(button);
+    }
+    var allbutton =
+        document.querySelector('.thread-all-replies__load-all-button');
+    if (items.threadall && button !== null) {
+      intersectionObserver =
+          new IntersectionObserver(intersectionCallback, intersectionOptions);
+      intersectionObserver.observe(allbutton);
+    }
+  }
+});
diff --git a/templates/manifest.gjson b/templates/manifest.gjson
index 97deaba..5fd7fff 100644
--- a/templates/manifest.gjson
+++ b/templates/manifest.gjson
@@ -26,11 +26,13 @@
     },
     {
       "matches": ["https://support.google.com/*/thread/*"],
+      "exclude_matches": ["https://support.google.com/s/community*", "https://support.google.com/*/thread/new*"],
       "js": ["common/content_scripts.js", "content_scripts/thread_inject.js"],
       "run_at": "document_end"
     },
     {
       "matches": ["https://support.google.com/s/community*", "https://support.google.com/*/thread/*"],
+      "exclude_matches": ["https://support.google.com/*/thread/new*"],
       "js": ["common/content_scripts.js", "content_scripts/profileindicator_inject.js"]
     },
     {
