summaryrefslogtreecommitdiff
path: root/dislike.js
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2018-08-26 00:31:59 +0300
committerYuval Adam <_@yuv.al>2018-08-26 00:31:59 +0300
commite37826e39ec23828a6be0401f0a3edea73fea2b5 (patch)
tree9d6533378561c7d5aee2b7c4e958775b3baf497f /dislike.js
Initial commit
Diffstat (limited to 'dislike.js')
-rw-r--r--dislike.js13
1 files changed, 13 insertions, 0 deletions
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);