打トレ開始ボタン

ウェブアーカイブの打トレ開始ボタン

// ==UserScript==
// @name         打トレ開始ボタン
// @namespace    http://tampermonkey.net/
// @version      2025-02-01
// @description  ウェブアーカイブの打トレ開始ボタン
// @author       You
// @include      https://web.archive.org/*/type.cgi
// @icon         https://www.google.com/s2/favicons?sz=64&domain=archive.org
// @grant        none
// @license MIT

// ==/UserScript==

document.body.insertAdjacentHTML("beforeend",
                                 `<button id="start_func_button">startFunc(Enter)</button>
                                 <style>
#start_func_button  {
    position: fixed;
    bottom: 50px;
    right: 40px;
    padding: 1rem;
    font-size: larger;
    border: solid 2px;
    border-radius: 0.5rem;
    background: chartreuse;
}
</style> `)

const element = document.getElementById("start_func_button")

element.addEventListener("click", (event) => {
startFunc()
})

window.addEventListener("keydown", (event) => {
if(event.key === "Enter")
    startFunc()
})

Math.random = function(){return new Date().getMilliseconds()/1000}

QingJ © 2025

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