🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Greasy Fork is available in English.

📂 缓存分发状态(共享加速已生效)
🕒 页面同步时间:2026/01/20 19:25:12
🔄 下次更新时间:2026/01/20 20:25:12
手动刷新缓存

Twitter Script

helps with the twitter event stuff

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey, Greasemonkey или Violentmonkey.

За да инсталирате този скрипт, трябва да инсталирате разширение, като например Tampermonkey .

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey или Violentmonkey.

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey или Userscripts.

За да инсталирате скрипта, трябва да инсталирате разширение като Tampermonkey.

За да инсталирате този скрипт, трябва да имате инсталиран скриптов мениджър.

(Вече имам скриптов мениджър, искам да го инсталирам!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

(Вече имам инсталиран мениджър на стиловете, искам да го инсталирам!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

// ==UserScript==
// @name         Twitter Script
// @version      0.3
// @description  helps with the twitter event stuff
// @author       Tjololo12
// @match        https://s3.amazonaws.com/eventeval-akiai7vktywrmkata7ra/Hits_EventEval/*
// @require     http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js
// @grant        none
// @namespace https://greasyfork.org/users/710
// ==/UserScript==

var buttons = document.getElementsByTagName("button");
var index = buttons.length;
var isButtonClicked = false;
var isTyping = false;
var index = 0;

document.onkeydown = showkeycode;

function stopTyping (){
    console.log("Not typing");
    isTyping = false;
}

function startTyping (){
    console.log("Typing");
    isTyping = true;
}

function showkeycode(evt){
        var keycode = evt.keyCode;
        console.log(keycode);
        switch (keycode) {
            case 192: //`
                var textbox = document.getElementById("topic"+(index+1)+"-sum");
                var texted = true;
                if (textbox){
                    var text = textbox.value;
                    if (text.length == 0){
                        if (textbox.style.display === 'block')
                            texted = false;
                    }
                }
                if (!isButtonClicked && texted){
                    isButtonClicked = true;
                    if (index == buttons.length - 1){
                        if (confirm("Are you sure you want to submit?"))
                            buttons[index].click();
                    }
                    else
                    	buttons[index].click();
                }
                else{
                    if (isButtonClicked)
                        alert("Choose an answer by pressing 1, 2, or 3");
                    if (!texted)
                        alert("Make sure to enter a few keywords in the box");
                }
                break;
            case 49: //1
                if (!isTyping){
                    if (isButtonClicked){
                        document.getElementById("topic"+(index+1)+"-1").click();
                        document.getElementById("topic"+(index+1)+"-sum").focus();
                        document.getElementById("topic"+(index+1)+"-sum").onblur=function(event){stopTyping();};
                        document.getElementById("topic"+(index+1)+"-sum").onfocus=function(event){startTyping();};
                        isTyping = true;
                        isButtonClicked = false;
                        var num = index+1;
                        setTimeout(function(){document.getElementById("topic"+(num)+"-sum").value="";index += 1;},50);
                    }
                    else
                        alert("Hit ` to open the tweet link before selecting an answer.");
                }
                break;
            case 97: //numpad 1
                if (!isTyping){
                    if (isButtonClicked){
                        document.getElementById("topic"+(index+1)+"-1").click();
                        document.getElementById("topic"+(index+1)+"-sum").focus();
                        document.getElementById("topic"+(index+1)+"-sum").onblur=function(event){stopTyping();};
                        document.getElementById("topic"+(index+1)+"-sum").onfocus=function(event){startTyping();};
                        setTimeout(function() {document.getElementById("topic"+(index+1)+"-sum").value="";},200);
                        isTyping = true;
                        isButtonClicked = false;
                        index += 1;
                    }
                    else
                        alert("Hit ` to open the tweet link before selecting an answer.");
                }
                break;
            case 50: //2
                if (!isTyping){
                    if (isButtonClicked){
                        document.getElementById("topic"+(index+1)+"-0").click();
                        isButtonClicked = false;
                        index += 1;
                    }
                    else
                        alert("Hit ` to open the tweet link before selecting an answer.");
                }
                break;
            case 98: //numpad 2
                if (!isTyping){
                    if (isButtonClicked){
                        document.getElementById("topic"+(index+1)+"-0").click();
                        isButtonClicked = false;
                        index += 1;
                    }
                    else
                        alert("Hit ` to open the tweet link before selecting an answer.");
                }
                break;
            case 51: //3
                if (!isTyping){
                    if (isButtonClicked){
                        document.getElementById("topic"+(index+1)+"-2").click();
                        isButtonClicked = false;
                        index += 1;
                    }
                    else
                        alert("Hit ` to open the tweet link before selecting an answer.");
                }
                break;
            case 99: //numpad 3
                if (!isTyping){
                    if (isButtonClicked){
                        document.getElementById("topic"+(index+1)+"-2").click();
                        isButtonClicked = false;
                        index += 1;
                    }
                    else
                        alert("Hit ` to open the tweet link before selecting an answer.");
                }
                break;
            default: break;
        }
}