autoAnswer_Nav

题目快速导航

目前為 2022-06-09 提交的版本,檢視 最新版本

// ==UserScript==
// @name         autoAnswer_Nav
// @namespace    http://tampermonkey.net/
// @version      0.1.8
// @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/'
    function createBtnGroup(){
        let container = document.createElement('div')
        container.style=`
            display:flex;
            flex-direction: column;
            width:270px;
            padding:20px 0;
            position:fixed;
            text-align:center;
            top:15%;
            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 = '导航(点击并跳转到新页面)'
        h22.style.color = 'white'
        h22.style.fontSize = '22px'
        container.append(h22)
        let h2 = document.createElement('h2')
        h2.innerText = 'Nav(click and go to new Page)'
        h2.style.color = 'white'
        container.append(h2)
        questAddress.forEach((element,idx) => {
            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 = `${idx+1}、${element}`
            btn.onclick = ()=>{
                window.location.href = basePath + element
            }
            container.append(btn)
        });
        document.body.append(container)
    }
    setTimeout(function(){
        let quiz = document.getElementsByClassName('quizQuestion')
        if(quiz.length === 0){
            createBtnGroup()
            if(window.location.href.includes('https://www.wizard101.com/quiz/trivia/game/')){
                if(window.Notification && Notification.permission !== "denied") {
                    Notification.requestPermission(function(status) {
                        var n = new Notification('我滴任务完成辣👑', { body: '皇冠给我拿来吧!' }); 
                        setTimeout(() => {
                            n.close()
                        }, 2000);
                    });
                }
            }else{
                if(localStorage.getItem('autoAnswer_nav') === null){
                    if(window.Notification && Notification.permission !== "denied") {
                        Notification.requestPermission(function(status) {
                            localStorage.setItem('autoAnswer_nav',true)
                            var n = new Notification('仅首次弹出', { body: '欢迎使用😛' }); 
                        });
                    }
                }
            }
        }
    },1000)
})();

QingJ © 2025

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