您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Export questions and answers from the specified website
// ==UserScript== // @name Export Questions and Answers // @namespace http://tampermonkey.net/ // @version 0.1 // @description Export questions and answers from the specified website // @author You // @match https://bgi.zhixueyun.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; if (window.location.hash.includes('score-detail')) { function exportQuestionsAndAnswers() { let items = document.querySelectorAll('div.score-question-item'); let output = ''; items.forEach((item, index) => { let questionNumber = index + 1; let questionText = item.querySelector('.stem-content-main').innerText; output += questionNumber +"、" + questionText + '\n'; let options = item.querySelectorAll('.answer-options'); options.forEach((option) => { let optionLabel = option.parentElement.querySelector('.option-num').innerText.trim(); output += optionLabel + ' ' + option.innerText + '\n'; }); let answer = item.querySelector('.answer-value').innerText; output += '标准答案: ' + answer + '\n'; output += '-----------------------------\n'; }); let blob = new Blob([output], { type: 'text/plain' }); let url = URL.createObjectURL(blob); let a = document.createElement('a'); a.style.display = 'none'; a.href = url; a.download = 'questions.txt'; document.body.appendChild(a); a.click(); window.URL.revokeObjectURL(url); document.body.removeChild(a); } // 添加按钮 let button = document.createElement('button'); button.innerText = '导出题目和答案'; button.style.position = 'fixed'; button.style.top = '10px'; button.style.right = '10px'; button.style.zIndex = 9999; button.onclick = exportQuestionsAndAnswers; document.body.appendChild(button); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址