From: Karim Hamidou Date: Sun, 14 Jan 2018 18:04:08 +0000 (+0100) Subject: Also hide reddit comments X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=07338c4011ec6ca124d24fea2dd52eb7947ec22e;p=infinity-pools.git Also hide reddit comments --- diff --git a/InfinityPools.crx b/InfinityPools.crx index feb1d64..504b77a 100644 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 index 0000000..b8dd6c0 Binary files /dev/null and b/infinity_pools-1.2-an+fx.xpi differ diff --git a/manifest.json b/manifest.json index 0a9dcd3..608b768 100644 --- a/manifest.json +++ b/manifest.json @@ -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"] } ] diff --git a/start.js b/start.js index 3c30acc..02766ef 100644 --- 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(); } + + + }