Skip to content

Commit

Permalink
Update MediaWiki:Gadget-wikieditor-highlight.js
Browse files Browse the repository at this point in the history
让用户自行选择加载的插件
  • Loading branch information
bhsd-harry authored Feb 1, 2024
1 parent c2ab02d commit 0026888
Showing 1 changed file with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,7 @@
document.head.append(script);
});
}
cm = await window.CodeMirror6.fromTextArea($textarea[0], lang);
cm.prefer([
"highlightSpecialChars",
"highlightActiveLine",
"bracketMatching",
"closeBrackets",
"allowMultipleSelections",
]);
const [config] = await Promise.all([
libCachedCode.getCachedCode("https://testingcf.jsdelivr.net/npm/wikiparser-node/config/moegirl.json"),
cm.defaultLint(true, { include: [2, 10, 828].includes(ns) }),
]);
try {
window.wikiparse?.setConfig(JSON.parse(config));
} catch (e) {
console.error(e);
}
window.CodeMirror6.fromTextArea($textarea[0], lang, ns);
};
if (!isAdvanced) {
init();
Expand Down

0 comments on commit 0026888

Please sign in to comment.