百度题库默认展示答案和解析

省去手动点击

// ==UserScript==
// @name         百度题库默认展示答案和解析
// @namespace    https://bbs.tampermonkey.net.cn/
// @version      0.1.3
// @description  省去手动点击
// @author       小废物
// @match        https://easylearn.baidu.com/edu-page/tiangong/*
// @license      EPL
// ==/UserScript==

(function() {
    'use strict';
    setTimeout(() => {
        let searchButton = document.querySelector('.more-text')
         let limitTiYanCardDialog = document.querySelector('.kaixue-dialog-text')
 let toogleBtn = document.querySelector('.toogle-btn')
        if (limitTiYanCardDialog) {
            document.querySelector('.kaixue-dialog-close').click()
        }
 if (toogleBtn) {
            toogleBtn.click()
        }
        // 存在我们就点击
        if (searchButton) {
            searchButton.click()
            setTimeout(() => {
                // 仅查本地按钮
                let onlySearchOne = document.querySelector('.exercise-btn.exercise-btn-4')
                onlySearchOne.click()
            }, 1000)
        }
    }, 2000)
})();