Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add InPageEdit #2

Merged
merged 9 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "awesome-gadgets",
"version": "3.7.9",
"version": "3.8.0",
"description": "Storage, management, compilation, and automatic deployment of MediaWiki gadgets.",
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/modules/utils/build-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ const buildScript = async (
const outputFileNames: string[] = [];

// The TypeScript file is always compiled into a JavaScript file, so replace the extension directly
const outputFileName: string = scriptFileName.replace(/\.tsx?$/, '.js');
const outputFileName: string = scriptFileName.replace(/\.[jt]sx?$/, '.js');

const inputFilePath: string = join(__rootDir, `src/${gadgetName}/${scriptFileName}`);
const outputFilePath: string = join(__rootDir, `dist/${gadgetName}/${outputFileName}`);
Expand Down
8 changes: 8 additions & 0 deletions src/InPageEdit/InPageEdit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(function inPageEditLoader(): void {
/**
* @see {@link https://git.qiuwen.net.cn/AnYi/inpageedit-v2/src/branch/master}
* @author 机智的小鱼君 Dragon-Fish <[email protected]>
* @license GPL-3.0-or-later {@link https://git.qiuwen.net.cn/AnYi/inpageedit-v2/src/branch/master/LICENSE}
*/
mw.loader.load('https://gitcdn.qiuwen.net.cn/AnYi/inpageedit-v2/raw/branch/master/dist/InPageEdit.min.js');
})();
20 changes: 20 additions & 0 deletions src/InPageEdit/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* SPDX-License-Identifier: CC-BY-SA-4.0
* _addText: '{{Gadget Header|license=CC-BY-SA-4.0}}'
*
* @source {@link https://git.qiuwen.net.cn/InterfaceAdmin/QiuwenGadgets/src/branch/master/src/InPageEdit}
* @license CC-BY-SA-4.0 {@link https://www.qiuwenbaike.cn/wiki/H:CC-BY-SA-4.0}
* @dependency mediawiki.util
*/
/**
* +--------------------------------------------------------+
* | === WARNING: GLOBAL GADGET FILE === |
* +--------------------------------------------------------+
* | All changes should be made in the repository, |
* | otherwise they will be lost. |
* +--------------------------------------------------------+
* | Changes to this page may affect many users. |
* | Please discuss changes at talk page before editing. |
* +--------------------------------------------------------+
*/
/* <nowiki> */
6 changes: 6 additions & 0 deletions src/InPageEdit/definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"enable": true,
"description": "<span id=\"Gadget-InPageEdit\"></span> [[Help:InPageEdit|InPageEdit]]",
"section": "edit",
"rights": ["skipcaptcha"]
}
3 changes: 0 additions & 3 deletions src/React/React.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/React/definition.json

This file was deleted.

4 changes: 0 additions & 4 deletions src/React/modules/global.d.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/global.d.ts

This file was deleted.