diff options
| author | Yuval Adam <_@yuv.al> | 2018-08-26 00:31:59 +0300 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2018-08-26 00:31:59 +0300 |
| commit | e37826e39ec23828a6be0401f0a3edea73fea2b5 (patch) | |
| tree | 9d6533378561c7d5aee2b7c4e958775b3baf497f | |
Initial commit
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | dislike.css | 0 | ||||
| -rw-r--r-- | dislike.js | 13 | ||||
| -rw-r--r-- | manifest.json | 16 |
4 files changed, 32 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..2298527 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Dislike + +A browser extensions that cleans up the mess that Twitter creates in your feed diff --git a/dislike.css b/dislike.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/dislike.css diff --git a/dislike.js b/dislike.js new file mode 100644 index 0000000..c31b9ee --- /dev/null +++ b/dislike.js @@ -0,0 +1,13 @@ +function remove_liked_tweets() { + document.querySelectorAll('div.tweet-context').forEach(function (el) { + if (el.innerText.endsWith('others liked')) { + var tweet = el.parentNode.parentNode; + var button = tweet.querySelector('button[data-feedback-type="DontLike"]'); + button.click(); + var permalink = tweet.getAttribute('data-permalink-path'); + console.log('Removed liked tweet ' + permalink); + } + }); +} + +setInterval(remove_liked_tweets, 5000); diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..957fd82 --- /dev/null +++ b/manifest.json @@ -0,0 +1,16 @@ +{ + "name": "Dislike", + "version": "0.1.0", + "manifest_version": 2, + "description": "A browser extensions that cleans up the mess that Twitter creates in your feed", + "homepage_url": "https://github.com/yuvadm/dislike", + "content_scripts": [{ + "matches": [ + "https://twitter.com/*" + ], + "js": ["dislike.js"] + }], + "permissions": [ + "https://twitter.com/*" + ] +} |
