您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
推特时间线自动点赞
- // ==UserScript==
- // @name Twitter_Auto_Like
- // @namespace https://blog.chrxw.com
- // @version 0.1
- // @description 推特时间线自动点赞
- // @author Chr_
- // @include https://twitter.com/*
- // @license AGPL-3.0
- // @icon https://blog.chrxw.com/favicon.ico
- // ==/UserScript==
- (() => {
- 'use strict';
- let t = setInterval(() => {
- if (document.querySelector('a[href*=compose]') != null) {
- clearInterval(t);
- loadComplete();
- }
- }, 500);
- function loadComplete() {
- let btnArea = document.querySelector('a[href*=compose]').parentElement.parentElement;
- let btn = document.createElement('button');
- btn.textContent = '点赞';
- btn.addEventListener('click', autoLike);
- btnArea.appendChild(btn);
- }
- function autoLike() {
- let likes = document.querySelectorAll('div[role="button"][data-testid="like"]');
- let j = likes.length;
- let i = 0;
- let t = setInterval(() => {
- if (i < j) {
- likes[i++].click();
- } else {
- clearInterval(t);
- }
- }, 500);
- }
- })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址