diff --git a/packages/scripts/src/projects/cx.ts b/packages/scripts/src/projects/cx.ts index 4d84ca89..acdd4978 100644 --- a/packages/scripts/src/projects/cx.ts +++ b/packages/scripts/src/projects/cx.ts @@ -1484,6 +1484,7 @@ export function getValidNumber(...nums: number[]) { * 5 名词解释 * 6 论述题 * 7 计算题 + * 9 分录题 * 10 资料题 * 11 连线题 * 14 完形填空 @@ -1498,7 +1499,7 @@ function getQuestionType( ? 'multiple' : val === 3 ? 'judgement' - : [2, 4, 5, 6, 7, 10].some((t) => t === val) + : [2, 4, 5, 6, 7, 9, 10].some((t) => t === val) ? 'completion' : val === 11 ? 'line' diff --git a/scripts/build-core.js b/scripts/build-core.js index 6798a506..546ce17b 100644 --- a/scripts/build-core.js +++ b/scripts/build-core.js @@ -38,60 +38,64 @@ async function createUserJs(cb) { const ocs = require(path.join(distPath, 'index.js')); const createOptions = () => - /** @type {import('../packages/utils').CreateOptions} */ - ({ - parseRequire: true, - parseResource: true, - resourceBuilder: (key, value) => `const ${key} = \`${value}\`;`, - metaDataFormatter: { - header: '==UserScript==', - footer: '==/UserScript==', - prefix: '// ', - symbol: '@', - gap: '\t'.repeat(4) - }, - metadata: { - name: 'OCS 网课助手', - version: version, - description: `OCS(online-course-script) 网课助手,专注于帮助大学生从网课中释放出来。让自己的时间把握在自己的手中,拥有人性化的操作页面,流畅的步骤提示,支持 ${ocs - .definedProjects() - .filter((p) => p.studyProject) - .map((s) => `【${s.name}】`) - .join(' ')},等网课的学习,作业。具体的功能请查看脚本悬浮窗中的教程页面,OCS官网 https://docs.ocsjs.com 。`, - author: 'enncy', - license: 'MIT', - namespace: 'https://enncy.cn', - homepage: 'https://docs.ocsjs.com', - source: 'https://github.com/ocsjs/ocsjs', - icon: 'https://cdn.ocsjs.com/logo.png', - connect: ['enncy.cn', 'icodef.com', 'ocsjs.com', 'localhost'], - match: Array.from(new Set(ocs - .definedProjects() - .map((p) => p.domains.map((d) => `*://*.${d}/*`)) - .flat())), - grant: [ - 'GM_info', - 'GM_getTab', - 'GM_saveTab', - 'GM_setValue', - 'GM_getValue', - 'unsafeWindow', - 'GM_listValues', - 'GM_deleteValue', - 'GM_notification', - 'GM_xmlhttpRequest', - 'GM_getResourceText', - 'GM_addValueChangeListener', - 'GM_removeValueChangeListener' - ], - require: [path.join(__dirname, distPath, 'index.js')], - resource: [`STYLE ${path.join(__dirname, '../packages/scripts/assets/css/style.css')}`], - 'run-at': 'document-start', - antifeature: 'payment' - }, - entry: path.join(__dirname, '../packages/scripts/entry.js'), - dist: path.join(__dirname, distPath, 'ocs.user.js') - }); + /** @type {import('../packages/utils').CreateOptions} */ + ({ + parseRequire: true, + parseResource: true, + resourceBuilder: (key, value) => `const ${key} = \`${value}\`;`, + metaDataFormatter: { + header: '==UserScript==', + footer: '==/UserScript==', + prefix: '// ', + symbol: '@', + gap: '\t'.repeat(4) + }, + metadata: { + name: 'OCS 网课助手', + version: version, + description: `OCS(online-course-script) 网课助手,专注于帮助大学生从网课中释放出来。让自己的时间把握在自己的手中,拥有人性化的操作页面,流畅的步骤提示,支持 ${ocs + .definedProjects() + .filter((p) => p.studyProject) + .map((s) => `【${s.name}】`) + .join(' ')},等网课的学习,作业。具体的功能请查看脚本悬浮窗中的教程页面,OCS官网 https://docs.ocsjs.com 。`, + author: 'enncy', + license: 'MIT', + namespace: 'https://enncy.cn', + homepage: 'https://docs.ocsjs.com', + source: 'https://github.com/ocsjs/ocsjs', + icon: 'https://cdn.ocsjs.com/logo.png', + connect: ['enncy.cn', 'icodef.com', 'ocsjs.com', 'localhost'], + match: Array.from( + new Set( + ocs + .definedProjects() + .map((p) => p.domains.map((d) => `*://*.${d}/*`)) + .flat() + ) + ), + grant: [ + 'GM_info', + 'GM_getTab', + 'GM_saveTab', + 'GM_setValue', + 'GM_getValue', + 'unsafeWindow', + 'GM_listValues', + 'GM_deleteValue', + 'GM_notification', + 'GM_xmlhttpRequest', + 'GM_getResourceText', + 'GM_addValueChangeListener', + 'GM_removeValueChangeListener' + ], + require: [path.join(__dirname, distPath, 'index.js')], + resource: [`STYLE ${path.join(__dirname, '../packages/scripts/assets/css/style.css')}`], + 'run-at': 'document-start', + antifeature: 'payment' + }, + entry: path.join(__dirname, '../packages/scripts/entry.js'), + dist: path.join(__dirname, distPath, 'ocs.user.js') + }); await createUserScript(createOptions()); const opts = createOptions();