wikiplus-highlight 3.0.6 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/main.js +5 -4
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -5,13 +5,14 @@
5
5
  * @license GPL-3.0
6
6
  */
7
7
  (() => {
8
- if ('wphl' in mw.libs) {
8
+ const { libs } = mw, { wphl } = libs;
9
+ if (wphl === null || wphl === void 0 ? void 0 : wphl.version) {
9
10
  return;
10
11
  }
11
- const version = '3.0.6';
12
- mw.libs['wphl'] = { version }; // 开始加载
12
+ const version = '3.0.7';
13
+ libs.wphl = { version, cmVersion: '2.9', ...wphl }; // 开始加载
13
14
  // 路径
14
- const CDN = '//testingcf.jsdelivr.net', MW_CDN = 'npm/@bhsd/codemirror-mediawiki/dist/mw.min.js', REPO_CDN = 'npm/wikiplus-highlight';
15
+ const CDN = '//testingcf.jsdelivr.net', MW_CDN = `npm/@bhsd/codemirror-mediawiki@${libs.wphl.cmVersion || 'latest'}/dist/mw.min.js`, REPO_CDN = 'npm/wikiplus-highlight';
15
16
  const /** 加载CodeMirror 6 */ init = 'CodeMirror6' in window
16
17
  ? Promise.resolve()
17
18
  : new Promise(resolve => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wikiplus-highlight",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "description": "A plugin for the MediaWiki front-end add-on \"Wikiplus\"",
5
5
  "keywords": [
6
6
  "mediawiki",