I-Ready Tools

Clicks next on iready when you hit enter, also speeds up video to custom speed. Videos may also be skipped.

当前为 2021-09-01 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         I-Ready Tools
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Clicks next on iready when you hit enter, also speeds up video to custom speed. Videos may also be skipped.
// @author       Alan Yu
// @grant        none
// @include      https://login.i-ready.com/*
// @include      https://cdn.i-ready.com/*
// ==/UserScript==

(function() {
    'use strict';
    document.onkeydown = function(e){
        if(e.key == "Enter"){
            document.querySelector('#doneButton').click();
        }
    }
    window.oldvid = 0;
    setInterval(function(){
        var vid = document.querySelector("video");
        if(!((vid == null)||(window.oldvid == vid))){
            try{
                vid.playbackRate = parseInt(prompt("Playback speed of video?"));
                window.oldvid = vid;
                vid.setAttribute("controls", "true");
                var btn = document.createElement("button");
                btn.innerText = "Skip";
                btn.style.position = "absolute";
                btn.style.top = "10px";
                btn.style.left = "10px";
                vid.parentElement.parentElement.parentElement.parentElement.appendChild(btn);
                var btn2 = document.createElement("button");
                btn2.innerText = "Change Speed";
                btn2.style.position = "absolute";
                btn2.style.top = "50px";
                btn2.style.left = "10px";
                vid.parentElement.parentElement.parentElement.parentElement.appendChild(btn2);
                window.vid = vid;
                window.btn = btn;
                window.btn2 = btn2;
                btn.onclick = function(){
                    vid.currentTime = vid.duration;
                    this.remove();
                }
                btn2.onclick = function(){
                    try{
                        vid.playbackRate = parseInt(prompt("Playback speed of video?"));
                    }
                    catch{
                        alert("INVALID");
                    }
                }
                vid.onended = function(){
                    btn.remove();
                    btn2.remove();
                }
            }
            catch{
                alert("INVALID");
            }
        }
    },100);
    window.diagnostic_next = setInterval(function(){
        try{
            document.getElementById("survey-no-label").click();
            document.querySelector('[name="Continue"]').click();
        }
        catch{}
    }, 100);
    window.start_lesson = setInterval(function(){
        try{
            document.querySelector('[aria-label="Open Lesson"]').click();
        }
        catch{}
        try{
            var go_button = document.querySelector("button");
            if(go_button.innerText == "GO!"){
                go_button.click();
            }
        }
        catch{}
    }, 100);
    window.next_button = setInterval(function(){
        try{
            document.getElementsByClassName("unlock-button")[0].click();
        }
        catch{}
    }, 100);
})();