wikiplus-highlight 2.7.1

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.
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # Wikiplus-highlight
2
+
3
+ **Wikiplus-highlight** 是由 Bhsd 编写的一款 [Wikiplus](https://github.com/Wikiplus/Wikiplus) 语法高亮插件,它主要基于 MediaWiki 内置的 [JavaScript 模块](https://www.mediawiki.org/wiki/ResourceLoader/Core_modules)和 [CodeMirror](https://codemirror.net/) 编写。
4
+
5
+ ## 使用方法
6
+
7
+ ### 最新版本
8
+
9
+ 在*个人 JS 页*添加以下代码:
10
+
11
+ ```javascript
12
+ mw.loader.load('//cdn.jsdelivr.net/gh/bhsd-harry/Wikiplus-highlight@2.7.1/main.min.js');
13
+ ```
14
+
15
+ ### 稳定版本
16
+
17
+ 在*个人 JS 页*添加以下代码:
18
+
19
+ ```javascript
20
+ mw.loader.load('//cdn.jsdelivr.net/gh/bhsd-harry/Wikiplus-highlight@stable/main.min.js');
21
+ ```
22
+
23
+ 由于 CDN 的缓存机制,稳定版本的更新大约会滞后一周。
24
+
25
+ ## 更多插件
26
+
27
+ 使用 *Vector* 皮肤时,在右上角的【更多】菜单将添加一个【Wikiplus高亮设置】选项,点击后可以选择想要加载的 CodeMirror 插件。默认加载【搜索】插件。
28
+
29
+ ### 搜索
30
+
31
+ 这个插件会向 Wikiplus 编辑区添加一个【搜索】按钮及以下快捷键:
32
+
33
+ - Ctrl(Cmd)-F: 打开搜索框
34
+ - Ctrl(Cmd)-G: 搜索下一处
35
+ - Shift-Ctrl(Cmd)-G: 搜索上一处
36
+
37
+ 搜索可以使用字符串,也可以使用形如 `/re/` 或 `/re/i` 的正则表达式。正则表达式仅接受可选的 `i` 修饰符,暂不接受其他修饰符。
38
+
39
+ ## Supported languages
40
+
41
+ - **English (en)**
42
+ - ‪**中文(简体)‬ (zh-hans)**
43
+ - 中文(繁體)‬ (zh-hant)
44
+
45
+ [GNU General Public License 3.0](https://www.gnu.org/licenses/gpl-3.0-standalone.html)
package/bump.sh ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/local/bin/bash
2
+ sed -i '' -E "s/version = '.+'/version = '$1'/" main.js
3
+ perl -pi -e "s|Wikiplus-highlight@\d+\..+?/|Wikiplus-highlight\@$1/|" README.md
4
+ for file in i18n/*
5
+ do
6
+ sed -i '' -E "s/\"wphl-version\": \".+\"/\"wphl-version\": \"$1\"/" $file
7
+ done
8
+ git add -A
9
+ git commit -m "chore: bump version to $1"
10
+ git push
11
+ git tag $1
12
+ git push origin $1
package/i18n/en.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "wphl-version": "2.7.1",
3
+ "wphl-lang": "en",
4
+ "wphl-addon-search": "Search",
5
+ "wphl-addon-active-line": "Show active line",
6
+ "wphl-addon-trailingspace": "Show trailing spaces",
7
+ "wphl-addon-matchbrackets": "Highlight matching/nonmatching brackets",
8
+ "wphl-addon-matchtags": "Highlight matching/nonmatching tags",
9
+ "wphl-addon-contextmenu": "Open the template or module page when right clicking",
10
+ "wphl-addon-indentwithspace": "Indent JavaScript/CSS/Lua codes with spaces instead of tabs",
11
+ "wphl-addon-indent": "Indent",
12
+ "wphl-addon-label": "Please select the addons you wish to load",
13
+ "wphl-addon-notice": "Changes will apply when opening a new Wikiplus dialog.",
14
+ "wphl-addon-title": "Wikiplus Highlight Addons",
15
+ "wphl-search-placeholder": "Search using a string or a regex pattern",
16
+ "wphl-contentmodel": "Please choose the content model:",
17
+ "wphl-feedback": "Bug reports or suggestions are welcome at <a href=\"https://github.com/bhsd-harry/Wikiplus-highlight/issues\" target=\"_blank\">GitHub</a> .",
18
+ "wphl-portlet": "Wikiplus Highlight",
19
+ "wphl-welcome": "Welcome to <b>Wikiplus-highlight</b>!<br>You can change your local settings <a id=\"wphl-settings-notify\" href=\"#\">here</a>.",
20
+ "wphl-welcome-upgrade": "<b>Wikiplus-highlight</b> has been upgraded to $1.<br>You may need to check and update your local settings <a id=\"wphl-settings-notify\" href=\"#\">here</a>."
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "wphl-version": "2.7.1",
3
+ "wphl-lang": "zh-hans",
4
+ "wphl-addon-search": "搜索",
5
+ "wphl-addon-active-line": "高亮显示光标所在行",
6
+ "wphl-addon-trailingspace": "显示尾随空格",
7
+ "wphl-addon-matchbrackets": "高亮显示匹配和未匹配的括号",
8
+ "wphl-addon-matchtags": "高亮显示匹配和未匹配的标签",
9
+ "wphl-addon-contextmenu": "右键点击可打开模板或模块页面",
10
+ "wphl-addon-indentwithspace": "代码缩进使用空格而非Tab",
11
+ "wphl-addon-indent": "缩进",
12
+ "wphl-addon-label": "请选择您希望加载的插件",
13
+ "wphl-addon-notice": "更改将于打开新的Wikiplus编辑区时生效。",
14
+ "wphl-addon-title": "Wikiplus高亮插件",
15
+ "wphl-search-placeholder": "使用字符串或正则表达式搜索",
16
+ "wphl-contentmodel": "请选择内容模型:",
17
+ "wphl-feedback": "欢迎将错误报告或是改进建议提交到 <a href=\"https://github.com/bhsd-harry/Wikiplus-highlight/issues\" target=\"_blank\">GitHub</a> !",
18
+ "wphl-portlet": "Wikiplus高亮设置",
19
+ "wphl-welcome": "欢迎使用 <b>Wikiplus-highlight</b>!<br>您可以点击 <a id=\"wphl-settings-notify\" href=\"#\">这里</a> 更改本地设置。",
20
+ "wphl-welcome-upgrade": "<b>Wikiplus-highlight</b> 已升级到 $1。<br>您可能需要点击 <a id=\"wphl-settings-notify\" href=\"#\">这里</a> 查看并更新本地设置。"
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "wphl-version": "2.7.1",
3
+ "wphl-lang": "zh-hant",
4
+ "wphl-addon-search": "搜尋",
5
+ "wphl-addon-active-line": "突出顯示游標所在行",
6
+ "wphl-addon-trailingspace": "顯示尾隨空格",
7
+ "wphl-addon-matchbrackets": "突出顯示匹配和未匹配的括弧",
8
+ "wphl-addon-matchtags": "突出顯示匹配和未匹配的標籤",
9
+ "wphl-addon-contextmenu": "右鍵點擊可打開模板或模組頁面",
10
+ "wphl-addon-indentwithspace": "代碼縮排使用空格而非Tab",
11
+ "wphl-addon-indent": "縮排",
12
+ "wphl-addon-label": "請選擇您希望載入的外掛程式",
13
+ "wphl-addon-notice": "更改將於打開新的Wikiplus編輯區時生效。",
14
+ "wphl-addon-title": "Wikiplus突顯外掛程式",
15
+ "wphl-search-placeholder": "使用字串或正規表示式搜尋",
16
+ "wphl-contentmodel": "請選擇內容模型:",
17
+ "wphl-feedback": "歡迎將錯誤報告或是改進建議提交到 <a href=\"https://github.com/bhsd-harry/Wikiplus-highlight/issues\" target=\"_blank\">GitHub</a> !",
18
+ "wphl-portlet": "Wikiplus突顯設定",
19
+ "wphl-welcome": "歡迎使用 <b>Wikiplus-highlight</b>!<br>您可以點擊 <a id=\"wphl-settings-notify\" href=\"#\">這裡</a> 更改本地設定。",
20
+ "wphl-welcome-upgrade": "<b>Wikiplus-highlight</b> 已升級到 $1。<br>您可能需要點擊 <a id=\"wphl-settings-notify\" href=\"#\">這裡</a> 檢視並更新本地設定。"
21
+ }