From dc1261d703ae1e1a14841b030888e3f87ff7c38f Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Wed, 1 May 2024 21:45:52 -0500 Subject: prettier formatting and rewrap lines --- .../blog/2023-01-05-mass-unlike-tumblr-posts.md | 36 ++++++++++++---------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'content/blog/2023-01-05-mass-unlike-tumblr-posts.md') 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 971b61a..2e0178e 100644 --- a/content/blog/2023-01-05-mass-unlike-tumblr-posts.md +++ b/content/blog/2023-01-05-mass-unlike-tumblr-posts.md @@ -26,14 +26,18 @@ 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`. -``` html +```html ``` @@ -46,8 +50,8 @@ 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): +sure you're on the "Console" tab. It should look something like this (this is in +Firefox, Chromium should be similar): ![Firefox Dev !Tools](https:///img.cleberg.net/blog/20230105-mass-unlike-tumblr-posts/dev_console.png) @@ -58,17 +62,17 @@ 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. +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 +```javascript const elements = document.querySelectorAll('[aria-label="Unlike"]'); // console.log(elements); // 👉 [button] -for (let i=0; i < elements.length; i++) { - // console.log(elements[i]); - elements[i].click(); -} +for (let i = 0; i < elements.length; i++) { + // console.log(elements[i]); + elements[i].click(); +} ``` # Results -- cgit v1.2.3-70-g09d2