Auto Like Bilibili videos

Auto click on the "Like it" button when watching bilibili videos and donate one coin

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

Advertisement:

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Advertisement:

// ==UserScript==
// @name         Auto Like Bilibili videos
// @namespace    http://www.callmsn.top
// @version      1.0
// @description  Auto click on the "Like it" button when watching bilibili videos and donate one coin
// @author       Alston
// @match        https://www.bilibili.com/video/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    // auto like video after 20s
    setTimeout(function(){document.querySelectorAll('.ops>.like:not(.on)')[0].click()}, 20000);
    // auto donate one coin after 4 min
    setTimeout(function(){
        document.querySelectorAll('.ops>.coin:not(.on)')[0].click();
        setTimeout(function(){document.querySelectorAll('.mc-box.left-con')[0].click()}, 200);
        setTimeout(function(){document.querySelectorAll('.coin-bottom>.bi-btn')[0].click()}, 200);
    }, 240000)
})();