Skip to content

Commit

Permalink
misc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Apr 4, 2021
1 parent 6560c31 commit 92f6a81
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 15 deletions.
34 changes: 21 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@
"license": "CC-BY-SA-3.0",
"dependencies": {
"orange-i18n": "^1.4.0",
"types-mediawiki": "^0.7.3"
"types-mediawiki": "^1.1.0"
},
"devDependencies": {
"@types/jest": "^26.0.19",
"@types/select2": "^4.0.53",
"@typescript-eslint/eslint-plugin": "^4.11.1",
"@typescript-eslint/parser": "^4.11.1",
"dompurify": "^2.2.7",
"eslint": "^7.15.0",
"eslint-plugin-es5": "^1.5.0",
"husky": "^4.3.7",
Expand Down
4 changes: 4 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ export function urlParamValue(param: string): string {
return mw.util.getParamValue(param);
}

export function link(displaytext: string, title: string, params?: any) {
return `<a target="_blank" href="${mw.util.getUrl(title, params)}">${displaytext}</a>`;
}

// Used in batch, unlink, and deprod to sort pages by namespace, as
// json formatversion=2 sorts by pageid instead (#1251)
export function sortByNamespace(first, second) {
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
},
"include": [
"src/**/*",
"tests/**/*",
"./node_modules/types-mediawiki/index.d.ts",
"morebits/index.d.ts"
],
Expand Down

0 comments on commit 92f6a81

Please sign in to comment.