feat: add automatic practice question bank export
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { readFileSync, writeFileSync } from 'node:fs';
|
||||
|
||||
const metadata = `// ==UserScript==
|
||||
// @name 谊安学练习题库自动导出
|
||||
// @namespace yianxue-question-bank
|
||||
// @version 1.0.0
|
||||
// @description 进入练习后自动导出题干、选项、参考答案和解析;读取隐藏答案。
|
||||
// @match http://10.119.67.7/clientcn/*
|
||||
// @match https://10.119.67.7/clientcn/*
|
||||
// @match file:///*
|
||||
// @run-at document-idle
|
||||
// @grant none
|
||||
// @noframes
|
||||
// ==/UserScript==
|
||||
`;
|
||||
const core = readFileSync(new URL('./question-bank-core.js', import.meta.url), 'utf8');
|
||||
const automation = readFileSync(new URL('./practice-exporter.js', import.meta.url), 'utf8');
|
||||
writeFileSync(new URL('./谊安学题库导出.user.js', import.meta.url), metadata + '\n' + core + '\n' + automation, 'utf8');
|
||||
console.log('已生成 谊安学题库导出.user.js');
|
||||
Reference in New Issue
Block a user