JavaScript code to implement Weibo batch unfollow function

JavaScript code to implement Weibo batch unfollow function

A cool JavaScript code to unfollow Weibo users in batches

Weibo doesn't have a function to unfollow people in batches. I can't stand it. Here's how to use javascript code to implement the function of unfollowing people in batches!

Code

Without further ado, let's get straight to the code

var href = location.href;

function main() {
  document.write(`<frameset cols='*'>\n<frame id='inner' src='${href}'/></frameset>`)

  let frame = document.getElementById('inner');
  frame.onload = function () {
    let {
      contentWindow: window,
      contentDocument: document
    } = frame;
    window.setInterval(() => {
      try {
        document.querySelector('a[action-type="cancel_follow_single"]').click();
        document.querySelector('a[node-type="ok"]').click();
      } catch (err) {
        // do nothing
      }

    }, 2000)
  }
  document.close();
}

main();

setInterval(main, 1000 * 40);

How to eat

Enter your own Weibo

All Follow Pages

Press F12 on the first row of your keyboard, or right-click your mouse to see the inspect element

Open the console and paste the code

I don't want to run anymore, how can I stop?
關閉瀏覽器....

This is the end of this article about how to use JavaScript code to implement the batch unfollow function on Weibo. For more relevant js batch unfollow content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • NodeJS implements automatic reply function after following WeChat public account

<<:  Detailed explanation and summary of the use of Linux scheduled task Crontab command

>>:  The implementation principle of Mysql master-slave synchronization

Recommend

Mac node deletion and reinstallation case study

Mac node delete and reinstall delete node -v sudo...

Detailed explanation of using MySQL where

Table of contents 1. Introduction 2. Main text 2....

Some front-end basics (html, css) encountered in practice

1. The div css mouse hand shape is cursor:pointer;...

Vue implements the method example of tab routing switching component

Preface This article introduces the use of vue-ro...

Vue realizes adding watermark to uploaded pictures (upgraded version)

The vue project implements an upgraded version of...

Correct steps to install Nginx in Linux

Preface If you are like me, as a hard-working Jav...

Summary of new usage examples of computed in Vue3

The use of computed in vue3. Since vue3 is compat...

JavaScript to implement the back to top button

This article shares the specific code for JavaScr...

Vue monitoring properties and calculated properties

Table of contents 1. watch monitoring properties ...

Discussion on the problem of garbled characters in iframe page parameters

I encountered a very unusual parameter garbled pro...

MySQL 5.7.15 version installation and configuration method graphic tutorial

This article shares with you a detailed tutorial ...