Autokahoot

Automatically move through kahoots - with more power and ease

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Autokahoot
// @version      1.5.2
// @description  Automatically move through kahoots - with more power and ease
// @author       codingMASTER398
// @match        https://play.kahoot.it/v2*
// @run-at       document-start
// @grant      none
// @icon https://img.icons8.com/plasticine/2x/kahoot.png
// @namespace https://greasyfork.org/users/682906
// ==/UserScript==
window.antibotAdditionalScripts = window.antibotAdditionalScripts || [];
window.antibotAdditionalScripts.push(()=>{
    console.log("[AUTOKAHOOT] running")

    window.toInsert = document.createElement("div");
    window.toInsert.innerHTML = "codingMASTER398 - Autokahoot"; //PLEASE DONT CHANGE, THIS IS MY ONLY FORM OF CREDIT ):
    window.toInsert.style.color = 'white'
    window.toInsert.style.position = "absolute";
    window.toInsert.style.bottom = "0px";
    window.toInsert.style.textAlign = "left";
    window.toInsert.style.width = "100%";
    document.body.appendChild(window.toInsert);

    icount=true
    setInterval(function() {
        if(icount==true){
            if(document.getElementsByClassName('flat-button__FlatButton-sc-6uljam-0')[0]){
                if(document.getElementsByClassName('flat-button__FlatButton-sc-6uljam-0')[0].disabled){}else{
                    icount = false
                    counts=16
                    countdown = setInterval(function(){
                        counts--
                        document.getElementsByClassName('flat-button__FlatButton-sc-6uljam-0')[0].innerText = "Start-"+counts
                        if(counts==0 || counts < 0){
                            if(counts < -5){
                                clearTimeout(countdown);
                                icount=true
                                document.getElementsByClassName('flat-button__FlatButton-sc-6uljam-0')[0].innerText = "Start"
                            }else{
                                clearTimeout(countdown);
                                icount=true
                                document.getElementsByClassName('flat-button__FlatButton-sc-6uljam-0')[0].innerText = "Start"
                                document.getElementsByClassName('flat-button__FlatButton-sc-6uljam-0')[0].click();
                            }
                        }
                    }, 1000);
                }
            }
        }
    },1000)
    setInterval(function() {
        if(document.getElementsByClassName('iJqmEC')[0]){
            document.getElementsByClassName('iJqmEC')[0].click();
        }
        if(document.getElementsByClassName('kFPtaw')[0]){
            if(document.getElementsByClassName('kFPtaw')[0].innerText=="Play next" || document.getElementsByClassName('kFPtaw')[0].innerText=="Play again"){
                document.getElementsByClassName('kFPtaw')[0].click();
            }
        }
    },10000)

    function waitforendportal() {
        a = setInterval(() => {
            if(document.getElementsByClassName('cRHjov')[0]){
                clearInterval(a)
                setTimeout(() => {
                    console.log("Clicking")
                    document.getElementsByClassName('cRHjov')[0].click();
                    setTimeout(() => {
                        document.getElementsByClassName('ghnSPz')[0].click();
                    }, 1000);
                    waitforendportal();
                }, 30000);
            }
        }, 3000);
    }
    waitforendportal();
    
    function waitfornext() {
        console.log("Waiting for next")
        setTimeout(
            function(){
                nexte = setInterval(() => {
            if(document.getElementsByClassName('kFPtaw')[0]){
                if(document.getElementsByClassName('kFPtaw')[0].innerHTML=='Next'){
                    console.log("Found next")
                    setTimeout(() => {
                            waitfornext();
                        }, 10);
                    clearInterval(nexte)
                    setTimeout(() => {
                        document.getElementsByClassName('kFPtaw')[0].innerHTML='Next - 3'
                    }, 1000);
                    setTimeout(() => {
                        document.getElementsByClassName('kFPtaw')[0].innerHTML='Next - 2'
                    }, 2000);
                    setTimeout(() => {
                        document.getElementsByClassName('kFPtaw')[0].innerHTML='Next - 1'
                    }, 3000);
                    setTimeout(() => {
                        document.getElementsByClassName('kFPtaw')[0].innerHTML='Please wait'
                        document.getElementsByClassName('kFPtaw')[0].click();

                    }, 4000);
                }
            }
        }, 50);
            },4000)
        
    }
    waitfornext();
    
    ae = setInterval(() => {
        if(document.getElementsByClassName('guhfFk')[0]){
            clearInterval(ae)
            countsr=31
            countdown = setInterval(function(){
                countsr--
                document.getElementsByClassName('guhfFk')[0].innerText = "Classic - "+countsr
                if(countsr==0 || countsr < 0){
                    clearInterval(countdown);
                    document.getElementsByClassName('guhfFk')[0].click();
                }
            }, 1000);
        }
    }, 3000);
});

if(!window.antibotAdditionalScripts){
    alert("Make sure you have theusaf's antibot on! Autokahoot wont work without it!")
}