Greasy Fork

Greasy Fork is available in English.

Auto Goku.to Sign

Automatically clicks the Sign In button for goku.to after a specified amount of time (default: 10 seconds).

当前为 2023-05-03 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name       Auto Goku.to Sign
// @namespace  http://tampermonkey.net/
// @version    3.0
// @ author    longkidkoolstar
// @description  Automatically clicks the Sign In button for goku.to after a specified amount of time (default: 10 seconds).
// @match       https://goku.to/*
// @grant      none
// @license    GPL-3.0
// @icon        https://cdn.dribbble.com/users/289074/screenshots/1614713/sans_titre_-_2.png
// ==/UserScript==

//Clicks the Sign-in Button at the Goku Homepage

(function() {
    'use strict';

    window.addEventListener('load', function() {
        const button = document.querySelector('.account-button .btn.btn-blank');
        if (button) {
            button.click();
        }
    });
})();

(function() {
    'use strict';

    if (window.location.href.startsWith('https://goku.to/login')) {
        let secondsToWait = null;
        const storedSeconds = localStorage.getItem('goku.to.autosign.seconds');
        if (storedSeconds !== null) {
            secondsToWait = parseInt(storedSeconds, 10);
        }
        if (!secondsToWait) {
            const input = prompt('Enter the number of seconds to wait before clicking the "Sign In" button. Default is 10 seconds.', '10');
            if (!input) return;
            secondsToWait = parseInt(input, 10);
            if (isNaN(secondsToWait)) {
                secondsToWait = 10;
            }
            localStorage.setItem('goku.to.autosign.seconds', secondsToWait.toString());
        }
        setTimeout(function() {
            const button = document.querySelector('.btn.btn-block.btn-primary.position-relative');
            if (button) {
                button.click();
            }
        }, secondsToWait * 1000);
    }
})();