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

JavaScript imitates Jingdong magnifying glass special effects

This article shares the specific code of JavaScri...

Detailed Analysis of Event Bubbling Mechanism in JavaScript

What is bubbling? There are three stages in DOM e...

Example analysis of mysql user rights management

This article describes the MySQL user rights mana...

Web front-end development experience summary

XML files should be encoded in utf-8 as much as p...

How to make spaces have the same width in IE and FF?

body{font-size:12px; font-family:"宋体";}...

Introduction to the B-Tree Insertion Process

In the previous article https://www.jb51.net/arti...

Several popular website navigation directions in the future

<br />This is not only an era of information...

A brief discussion of the interesting box model of CSS3 box-sizing property

Everyone must know the composition of the box mod...

How to implement navigation function in WeChat Mini Program

1. Rendering2. Operation steps 1. Apply for Tence...

Summary of how JS operates on pages inside and outside Iframe

Table of contents Get the content of the iframe o...

5 Ways to Send Emails in Linux Command Line (Recommended)

When you need to create an email in a shell scrip...

Install ethereum/Ethereum from scratch under CentOS7

Table of contents Preface Add sudo write permissi...

Share the responsive frameworks commonly used by web design masters (summary)

This article introduces and shares the responsive...