B站视频自动点赞

自动给B站视频点赞!

当前为 2021-06-20 提交的版本,查看 最新版本

// ==UserScript==
// @name         B站视频自动点赞
// @namespace    https://eliotzhang.cn
// @version      1.0.1
// @description  自动给B站视频点赞!
// @author       EliotZhang
// @match        https://www.bilibili.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
    function main() {
        var like_btn = $('.like')
        if (like_btn.length == 0)
        {
            return
        }
        if (like_btn[0].className === 'like') {
            like_btn[0].click()
            console.log('--- EliotZhang auto thumbs-up ---\nLike this video!!!')
        }else{
            console.log('--- EliotZhang auto thumbs-up ---\nLiked!!!')
        }
    }

    setTimeout(main, 5000)
})();