feat: add Huayi question bank assistant v1.1.0

This commit is contained in:
suanyuit-cyber
2026-10-29 18:08:28 +08:00
commit 6b04243428
13 changed files with 4348 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
const fs = require('node:fs');
const path = require('node:path');
const root = __dirname;
const header = `// ==UserScript==
// @name 华谊题库助手 · CSV导出与划词检索
// @namespace local.huayi.question-bank
// @version 1.1.0
// @description 按题库采集与同名CSV导出,支持多题库批量导入、文字搜索、划词查答案、选择复制与隐藏面板。
// @match https://www.shhuayi-elearning.cn/*
// @match https://shhuayi-elearning.cn/*
// @run-at document-start
// @noframes
// @grant unsafeWindow
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_registerMenuCommand
// @grant GM_addValueChangeListener
// ==/UserScript==
`;
const sources = ['src/core.js', 'src/adapter.js', 'src/app.js'];
const body = sources.map(file => `\n// ---- ${file} ----\n${fs.readFileSync(path.join(root, file), 'utf8')}`).join('\n');
fs.mkdirSync(path.join(root, 'dist'), { recursive: true });
const target = path.join(root, 'dist/huayi-question-bank.user.js');
fs.writeFileSync(target, `${header}\n(function () {\n'use strict';\n${body}\n})();\n`, 'utf8');
console.log(`已生成 ${target}`);