Twitch Auto Refresh and Key F

Auto refresh Twitch and press F after 10 seconds

// ==UserScript==
// @name         Twitch Auto Refresh and Key F
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Auto refresh Twitch and press F after 10 seconds
// @author       You
// @match        https://www.twitch.tv/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Wait for 10 minutes then refresh the page
    setTimeout(function() {
        location.reload();
    }, 600000);  // 600000 milliseconds = 10 minutes

    // After refresh, wait for 10 seconds then press F
    window.onload = function() {
        setTimeout(function() {
            var e = new KeyboardEvent('keydown', {
                key: 'F',
                code: 'KeyF',
                keyCode: 70,
                which: 70
            });
            document.dispatchEvent(e);
        }, 10000);  // 10000 milliseconds = 10 seconds
    };
})();
长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元