autoAnswer_Nav

题目快速导航

目前为 2022-06-10 提交的版本。查看 最新版本

// ==UserScript==
// @name         autoAnswer_Nav
// @namespace    http://tampermonkey.net/
// @version      0.2.5
// @description  题目快速导航
// @author       lsmhq
// @match        https://www.wizard101.com/quiz/trivia/game/*
// @match        https://www.wizard101.com/game/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=https://www.wizard101.com
// @require      https://gf.qytechs.cn/scripts/446229-nav-list/code/nav_list.js?version=1059140
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    let questAddress = window.questAddress
    let basePath = 'https://www.wizard101.com/quiz/trivia/game/'
    if(sessionStorage.getItem('tested_quiz_val') == null){
        sessionStorage.setItem('tested_quiz_val',JSON.stringify([]))
    }
    function createBtnGroup(){
        let container = document.createElement('div')
        container.style=`
            display:flex;
            flex-direction: column;
            width:270px;
            padding:20px 0;
            position:fixed;
            text-align:center;
            bottom:0;
            right:0;
            background:rgb(57 57 57 / 85%);
            z-index:1000;
            border-radius:10px;
            color:white;
        `
        container.classList.add('fadeIn')
        let h22 = document.createElement('h1')
        h22.innerText = 'Quiz List'
        h22.style.color = 'white'
        h22.style.fontSize = '20px'
        container.append(h22)
        let h2 = document.createElement('h2')
        h2.innerText = 'Click to the test Page!'
        h2.style.color = 'white'
        container.append(h2)
        let quizs = JSON.parse(sessionStorage.getItem('tested_quiz_val'))
        let index = 0
        questAddress.forEach((element,idx) => {
            if(!quizs.includes(element)){
                let btn = document.createElement('div')
                btn.style=`
                    width:100%;
                    position:relative;
                    height:24px;
                    line-height:24px;
                    text-align:left;
                    cursor:pointer;
                    padding-left:15px;
                `
                btn.innerText = `${++index}、${element}`
                btn.onclick = ()=>{
                    window.location.href = basePath + element
                    quizs.push(element)
                    sessionStorage.setItem('tested_quiz_val',JSON.stringify(quizs))
                }
                container.append(btn)
            }
        });
        document.body.append(container)
    }
    setTimeout(function(){
        let quiz = document.getElementsByClassName('quizQuestion')
        if(quiz.length === 0){
            createBtnGroup()
        }
    },1000)
})();

QingJ © 2025

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