diff options
Diffstat (limited to 'content/blog/2023-01-05-mass-unlike-tumblr-posts.md')
-rw-r--r-- | content/blog/2023-01-05-mass-unlike-tumblr-posts.md | 71 |
1 files changed, 32 insertions, 39 deletions
diff --git a/content/blog/2023-01-05-mass-unlike-tumblr-posts.md b/content/blog/2023-01-05-mass-unlike-tumblr-posts.md index c86102c..971b61a 100644 --- a/content/blog/2023-01-05-mass-unlike-tumblr-posts.md +++ b/content/blog/2023-01-05-mass-unlike-tumblr-posts.md @@ -7,27 +7,24 @@ draft = false # The Dilemma -The dilemma I had was pretty simple: I wanted to unlike all the posts I -have liked on Tumblr so that I could follow a new focus on blogs and -start fresh. Otherwise, Tumblr will keep recommending content based on -your previous likes. +The dilemma I had was pretty simple: I wanted to unlike all the posts I have +liked on Tumblr so that I could follow a new focus on blogs and start fresh. +Otherwise, Tumblr will keep recommending content based on your previous likes. # The Solution -I searched the web for a while and noted that most solutions referenced -Tumblr setting and dashboard pages that no longer exist. Additionally, I -did not want to install a third party extension to do this, as some -suggested. +I searched the web for a while and noted that most solutions referenced Tumblr +setting and dashboard pages that no longer exist. Additionally, I did not want +to install a third party extension to do this, as some suggested. -Luckily, I used Javascript for a while a few years ago and figured it -would be easy enough to script a solution, as long as Tumblr had a -system for the unlike buttons. +Luckily, I used Javascript for a while a few years ago and figured it would be +easy enough to script a solution, as long as Tumblr had a system for the unlike +buttons. ## Identifying Unlike Buttons -Tumblr\'s unlike buttons are structured as you can see in the following -code block. All unlike buttons have an `aria-label` with a -value of `Unlike`. +Tumblr's unlike buttons are structured as you can see in the following code +block. All unlike buttons have an `aria-label` with a value of `Unlike`. ``` html <button class="TRX6J" aria-label="Unlike"> @@ -43,28 +40,26 @@ value of `Unlike`. ## Running a Script to Unlike All Likes To run this script, you will need to load the [Likes \| -Tumblr](https://www.tumblr.com/likes) page while logged in to your -account. +Tumblr](https://www.tumblr.com/likes) page while logged in to your account. -Further, be sure to scroll down to the bottom and force Tumblr to load -more posts so that this script unlikes more posts at a time. +Further, be sure to scroll down to the bottom and force Tumblr to load more +posts so that this script unlikes more posts at a time. -Once you are logged in and the page is loaded, open the Developer Tools -and be sure you\'re on the \"Console\" tab. It should look something -like this (this is in Firefox, Chromium should be similar): +Once you are logged in and the page is loaded, open the Developer Tools and be +sure you're on the "Console" tab. It should look something like this (this is +in Firefox, Chromium should be similar):  -All you need to do is paste the following snippet into the dev console. -This code will collect all unlike buttons (`elements`) and -then click each button to unlike it. +All you need to do is paste the following snippet into the dev console. This +code will collect all unlike buttons (`elements`) and then click each button to +unlike it. -Optionally, you can comment-out the line -`elements[i].click();` and uncomment the -`console.log()` lines to simply print out information without -performing any actions. This can be useful to debug issues or confirm -that the code below isn\'t doing anything you don\'t want it to. +Optionally, you can comment-out the line `elements[i].click();` and uncomment +the `console.log()` lines to simply print out information without performing any +actions. This can be useful to debug issues or confirm that the code below +isn't doing anything you don't want it to. ``` javascript const elements = document.querySelectorAll('[aria-label="Unlike"]'); @@ -78,18 +73,16 @@ for (let i=0; i < elements.length; i++) { # Results -The results were quick for my situation, as it unliked \~200 posts -within 2-3 seconds. I am not sure how this will perform on larger sets -of likes (or if Tumblr has a limit to unliking posts). +The results were quick for my situation, as it unliked ~200 posts within 2-3 +seconds. I am not sure how this will perform on larger sets of likes (or if +Tumblr has a limit to unliking posts). -You can see the below screenshot showing that I pasted the snippet into -the console, pressed Enter, and then the posts are automatically -unliked. +You can see the below screenshot showing that I pasted the snippet into the +console, pressed Enter, and then the posts are automatically unliked.  -Thinking about this further, I would bet that this would be fairly -simple to package into a browser add-on so that users could install the -add-on, go to their Likes page, and click a button to run the script. -Food for thought. +Thinking about this further, I would bet that this would be fairly simple to +package into a browser add-on so that users could install the add-on, go to +their Likes page, and click a button to run the script. Food for thought. |