]> khamidou — GitHub mirrors - infinity-pools.git/commitdiff
Also hide reddit comments
authorKarim Hamidou <khamidou@gmail.com>
Sun, 14 Jan 2018 18:04:08 +0000 (19:04 +0100)
committerKarim Hamidou <khamidou@gmail.com>
Tue, 16 Jan 2018 14:33:53 +0000 (15:33 +0100)
InfinityPools.crx
infinity_pools-1.2-an+fx.xpi [new file with mode: 0644]
manifest.json
start.js

index feb1d6480a3f6858181da36215226a044101a11a..504b77a2499fbaaac8bbe3a55372125f7fae66a4 100644 (file)
Binary files a/InfinityPools.crx and b/InfinityPools.crx differ
diff --git a/infinity_pools-1.2-an+fx.xpi b/infinity_pools-1.2-an+fx.xpi
new file mode 100644 (file)
index 0000000..b8dd6c0
Binary files /dev/null and b/infinity_pools-1.2-an+fx.xpi differ
index 0a9dcd37c5037e912165b2ec9d9793d4091a0df3..608b768b2f430e5a90385bd789639ebc21ca6643 100644 (file)
@@ -1,13 +1,15 @@
 {
   "manifest_version": 2,
   "name": "Infinity Pools",
-  "version": "1.1",
+  "version": "1.2",
 
   "description": "An extension to hide various feeds like Facebook's, Pocket, etc. ",
   "update_url": "https://khamidou.com/extensions/update.xml",
   "content_scripts": [
     {
-      "matches": ["*://*.facebook.com/*", "*://*.getpocket.com/*", "*://*.twitter.com/*"],
+      "matches": ["*://*.facebook.com/*", "*://*.getpocket.com/*",
+                  "*://*.twitter.com/*", "*://*.reddit.com/*",
+                  "*://news.ycombinator.com/*"],
       "js": ["start.js"]
     }
   ]
index 3c30acc5baddcd58b7301d883d31127cc2f3b20a..02766efcc983d75a87981b5fbef734012155519e 100644 (file)
--- a/start.js
+++ b/start.js
@@ -35,6 +35,17 @@ var hideTwitterFeed = function() {
 }
 
 
+var hideRedditComments = function() {
+  console.log("Hiding reddit comments");
+  hideAll("commentarea");
+}
+
+
+var hideHNComments = function() {
+  hideAll("comment");
+}
+
+
 var hideFeeds = function() {
   var domain = document.domain;
 
@@ -44,7 +55,14 @@ var hideFeeds = function() {
     hidePocketFeed();
   } else if (domain.match(/twitter\.com/)) {
     hideTwitterFeed();
+  } else if (domain.match(/reddit\.com/)) {
+    hideRedditComments();
+  } else if (domain.match(/news\.ycombinator\.com/)) {
+    hideHNComments();
   }
+
+
+
 }