fix: capture practice choice option content
This commit is contained in:
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name 华谊题库助手 · CSV导出与划词检索
|
||||
// @namespace local.huayi.question-bank
|
||||
// @version 1.2.1
|
||||
// @version 1.2.2
|
||||
// @description 全网页快捷键唤出、本地题库文字检索与自动选择答案,按库导入导出;每页默认完全隐藏。
|
||||
// @match *://*/*
|
||||
// @run-at document-start
|
||||
@@ -654,7 +654,7 @@ const QBAdapter = (() => {
|
||||
} else if (Array.isArray(node.choiceItems)) {
|
||||
if (node.choiceItems.some(option => !option || typeof option !== 'object')) return null;
|
||||
options = node.choiceItems.slice(0, 100).map((option, index) => ({
|
||||
id: idString(option.id), text: text(option.content), label: labelFor(index)
|
||||
id: idString(option.id), text: text(option.itemContent) || text(option.content), label: labelFor(index)
|
||||
}));
|
||||
if (options.length < 2 || options.some(o => !o.text)) return null;
|
||||
} else if (previous) options = previous.options.map(o => ({ ...o }));
|
||||
|
||||
Reference in New Issue
Block a user