Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
  • Loading branch information
abccsss committed May 22, 2022
1 parent 5deb4d0 commit 1a42d6a
Show file tree
Hide file tree
Showing 37 changed files with 2,564 additions and 48 deletions.
4 changes: 2 additions & 2 deletions extensions/Banana/includes/EditorHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ private static function injectBtexMonaco( EditPage $editPage, bool $readOnly ) {
$html = '
<script>
var require = {
paths: { vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.32.1/min/vs" },
paths: { vs: "https://cdn.bootcdn.net/ajax/libs/monaco-editor/0.33.0/min/vs" },
"vs/nls": { availableLanguages: { "*": "zh-cn" } },
};
</script>
<script src="https://cdn.jsdelivr.net/npm/monaco-editor@0.32.1/min/vs/loader.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/monaco-editor/0.33.0/min/vs/loader.js"></script>
<script>
window.monacoEditorData = $json;
</script>
Expand Down
2 changes: 1 addition & 1 deletion extensions/Banana/resources/ext.KaTeXcss.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mw.loader.load( 'https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css', 'text/css' );
mw.loader.load( 'https://cdn.bootcdn.net/ajax/libs/KaTeX/0.15.3/katex.min.css', 'text/css' );
3 changes: 3 additions & 0 deletions extensions/HeadScript/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules
/vendor
/composer.lock
6 changes: 6 additions & 0 deletions extensions/HeadScript/.gitreview
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[gerrit]
host=gerrit.wikimedia.org
port=29418
project=mediawiki/extensions/HeadScript.git
track=1
defaultrebase=0
7 changes: 7 additions & 0 deletions extensions/HeadScript/.phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
<file>.</file>
<arg name="extensions" value="php" />
<arg name="encoding" value="UTF-8" />
</ruleset>
11 changes: 11 additions & 0 deletions extensions/HeadScript/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-banana-checker' );

var conf = grunt.file.readJSON( 'extension.json' );
grunt.initConfig( {
banana: conf.MessagesDirs
} );

grunt.registerTask( 'test', [ 'banana' ] );
grunt.registerTask( 'default', 'test' );
};
14 changes: 14 additions & 0 deletions extensions/HeadScript/HeadScript.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
if ( function_exists( 'wfLoadExtension' ) ) {
wfLoadExtension( 'HeadScript' );
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['HeadScript'] = __DIR__ . '/i18n';
wfWarn(
'Deprecated PHP entry point used for the HeadScript extension. ' .
'Please use wfLoadExtension() instead, ' .
'see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extension_registration for more details.'
);
return;
} else {
die( 'This version of the HeadScript extension requires MediaWiki 1.29+' );
}
22 changes: 22 additions & 0 deletions extensions/HeadScript/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2015 'JinRyuu' Thomas Nagy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

6 changes: 6 additions & 0 deletions extensions/HeadScript/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
HeadScript
==========

Adds an easy system for adding and configuring head sripts for wiki on MediaWiki powered websites from the LocalSettings.php file.

Installation instructions can be found at https://www.mediawiki.org/wiki/Extension:HeadScript
20 changes: 20 additions & 0 deletions extensions/HeadScript/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"require-dev": {
"mediawiki/mediawiki-codesniffer": "38.0.0",
"mediawiki/minus-x": "1.1.0",
"php-parallel-lint/php-console-highlighter": "0.5.0",
"php-parallel-lint/php-parallel-lint": "1.2.0"
},
"scripts": {
"test": [
"parallel-lint . --exclude vendor --exclude node_modules",
"minus-x check .",
"@phpcs"
],
"fix": [
"minus-x fix .",
"phpcbf"
],
"phpcs": "phpcs -sp --cache"
}
}
38 changes: 38 additions & 0 deletions extensions/HeadScript/extension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "HeadScript",
"version": "1.1.1",
"author": [
"[https://www.mediawiki.org/wiki/User:JinRyuuNagy JinRyuu]",
"[https://www.mediawiki.org/wiki/User:StarHeartHunt StarHeartHunt]"
],
"url": "https://www.mediawiki.org/wiki/Extension:HeadScript",
"descriptionmsg": "headscript-desc",
"type": "other",
"requires": {
"MediaWiki": ">= 1.29.0"
},
"license-name": "MIT",
"MessagesDirs": {
"HeadScript": [
"i18n"
]
},
"Hooks": {
"BeforePageDisplay": [
"HeadScript::onBeforePageDisplay"
]
},
"AutoloadClasses": {
"HeadScript": "src/HeadScript.php"
},
"config_prefix": "wg",
"config": {
"HeadScriptCode": {
"value": "<!-- No Head Script -->"
},
"HeadScriptName": {
"value": "<!-- No Script Name -->"
}
},
"manifest_version": 2
}
1 change: 1 addition & 0 deletions extensions/HeadScript/gitinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"head": "dd22f72c3e75211e2e466e6f0a99dd5cf220bdda\n", "headSHA1": "dd22f72c3e75211e2e466e6f0a99dd5cf220bdda\n", "headCommitDate": "1650010424", "branch": "dd22f72c3e75211e2e466e6f0a99dd5cf220bdda\n", "remoteURL": "https://gerrit-replica.wikimedia.org/r/mediawiki/extensions/HeadScript"}
4 changes: 4 additions & 0 deletions extensions/HeadScript/i18n/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"@metadata": {},
"headscript-desc": "Allows Scripts to be added just before </head> to the wiki as configured in the LocalSettings.php file."
}
9 changes: 9 additions & 0 deletions extensions/HeadScript/i18n/fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"@metadata": {
"authors": [
"Wladek92",
"Thibaut120094"
]
},
"headscript-desc": "Permet d’ajouter des scripts juste avant </head> sur le wiki, comme configuré dans le fichier LocalSettings.php."
}
8 changes: 8 additions & 0 deletions extensions/HeadScript/i18n/mk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Bjankuloski06"
]
},
"headscript-desc": "Овозможува додавање на скрипти веднаш пред </head> кон викито според поставеното во податотеката LocalSettings.php."
}
8 changes: 8 additions & 0 deletions extensions/HeadScript/i18n/nb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Jon Harald Søby"
]
},
"headscript-desc": "Lar skript legges til like før </head> som konfigurert i LocalSettings.php."
}
8 changes: 8 additions & 0 deletions extensions/HeadScript/i18n/pt-br.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Eduardo Addad de Oliveira"
]
},
"headscript-desc": "Permite que Scripts sejam adicionados logo antes </head> na wiki conforme configurado no arquivo LocalSettings.php."
}
8 changes: 8 additions & 0 deletions extensions/HeadScript/i18n/pt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Hamilton Abreu"
]
},
"headscript-desc": "Permite que sejam adicionados conjuntos de comandos imediatamente antes do </head> da wiki, ''(head scripts)'', como for configurado no ficheiro LocalSettings.php."
}
6 changes: 6 additions & 0 deletions extensions/HeadScript/i18n/qqq.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"@metadata": {
"authors": []
},
"headscript-desc": "{{desc|name=HeadScript|url=https://www.mediawiki.org/wiki/Extension:HeadScript}}"
}
8 changes: 8 additions & 0 deletions extensions/HeadScript/i18n/roa-tara.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Joetaras"
]
},
"headscript-desc": "Allows Scripts adda essere aggiunde apprime de </head> a 'a uicchi cumme configurate jndr'à 'u file LocalSettings.php"
}
8 changes: 8 additions & 0 deletions extensions/HeadScript/i18n/ru.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Rubin16"
]
},
"headscript-desc": "Разрешает скриптам быть добавленными прямо перед </head> В соответствии с настройками LocalSettings.php."
}
8 changes: 8 additions & 0 deletions extensions/HeadScript/i18n/sv.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Sabelöga"
]
},
"headscript-desc": "Gör så att skript kan läggas till precis innan </head> på wikin som det konfigurerades i LocalSettings.php-filen."
}
9 changes: 9 additions & 0 deletions extensions/HeadScript/i18n/tr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"@metadata": {
"authors": [
"MuratTheTurkish",
"Vito Genovese"
]
},
"headscript-desc": "LocalSettings.php dosyası yapılandırması uyarınca </head> etiketinin hemen öncesine yerleştirilen betiklerin vikiye eklenmesine izin verir."
}
8 changes: 8 additions & 0 deletions extensions/HeadScript/i18n/uk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"DDPAT"
]
},
"headscript-desc": "Дозволяє додавати скрипти безпосередньо перед </head> до вікі, як це налаштовано у файлі LocalSettings.php."
}
8 changes: 8 additions & 0 deletions extensions/HeadScript/i18n/uz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Jamshiduralovofficial"
]
},
"headscript-desc": "Skriptlarni </ head> dan oldin wikiga LocalSettings.php faylida sozlangan tarzda qo'shishga ruxsat beradi."
}
6 changes: 6 additions & 0 deletions extensions/HeadScript/i18n/zh-hans.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"@metadata": {
"authors": []
},
"headscript-desc": "允许向wiki页面的<code><head></code>标签引入LocalSettings.php中配置的JavaScript/CSS内容。"
}
8 changes: 8 additions & 0 deletions extensions/HeadScript/i18n/zh-hant.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Kly"
]
},
"headscript-desc": "依照在 LocalSettings.php 檔案的設定,允許添加腳本在 </head> 前方到 wiki 裡。"
}

0 comments on commit 1a42d6a

Please sign in to comment.