E-Z Login on ENTER

Press the "Log In" button when ENTER key is pressed

目前為 2024-06-13 提交的版本,檢視 最新版本

// ==UserScript==
// @name         E-Z Login on ENTER
// @namespace    http://tampermonkey.net/
// @license      MIT
// @version      1.1
// @description  Press the "Log In" button when ENTER key is pressed
// @author       Not_Noob
// @match        https://e-z.gg/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=e-z.gg
// @grant        none
// ==/UserScript==

// Yan edited the original
// His changes include: Sending you to login page if you're on the home page instantly,
// and getting the button by class name instead of any button with querySelector (for login)
if (document.location.href == 'https://e-z.gg/') {
    const loginButton = document.querySelector('button')
    if (loginButton) {
        loginButton.click()
    }
}

document.addEventListener('keydown', (event) => {
    if (event.key === 'Enter') {
        const btn = document.getElementsByClassName(
            'bg-blue-700 border-2 border-blue-600 hover:bg-blue-600 active:translate-y-1 duration-300 rounded-md opacity-80 p-1 w-full text-base text-white font-poppins font-medium',
        )
        if (btn[0].innerText == 'Log In') {
            btn[0].click()
        }
    }
})

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址