Greasy Fork

Greasy Fork is available in English.

Acfun自动点赞(随机间隔)

直播间自动点赞

目前为 2021-11-28 提交的版本,查看 最新版本

// ==UserScript==
// @name         Acfun自动点赞(随机间隔)
// @description  直播间自动点赞
// @version      0.0.1
// @author       A
// @match        https://live.acfun.cn/live/*
// @run-at       document-start
// @license      GNU General Public License v3.0 or later
// @namespace    http://greasyfork.icu/zh-CN/users/845476-longfeigit
// ==/UserScript==


function random(min, max) {
  return Math.floor(Math.random() * (max - min) ) + min;
}

function randomClock() {
    const time = random(0, 3000)
    const timer = setTimeout(() => {
        // console.timeEnd()
        document.getElementsByClassName('like-heart')[0].click()
        randomClock()
        clearTimeout(timer)
        // console.time()
    }, time)

}

randomClock()