mirror of
https://github.com/octfx/mediawiki-extensions-TemplateStylesExtender.git
synced 2024-11-14 11:18:49 +00:00
202add59e6
Instead of checking the page content for a raw `wrapclass` string, look up the current revision's user and check if that user has the permission to enable un-scoping. This _is_ expensive as each time the tag is handled, a lookup will occur. In reference to #18
61 lines
1.8 KiB
JSON
61 lines
1.8 KiB
JSON
{
|
|
"name": "TemplateStylesExtender",
|
|
"version": "1.2.0",
|
|
"author": [
|
|
"[https://www.mediawiki.org/wiki/User:Octfx Octfx]"
|
|
],
|
|
"url": "https://github.com/octfx/mediawiki-extensions-TemplateStylesExtender",
|
|
"descriptionmsg": "ext-templatestylesextender-desc",
|
|
"license-name": "GPL-2.0-or-later",
|
|
"type": "parserhook",
|
|
"requires": {
|
|
"MediaWiki": ">= 1.39.0",
|
|
"platform": {
|
|
"php": ">=8.0"
|
|
},
|
|
"extensions": {
|
|
"TemplateStyles": ">= 1.0"
|
|
}
|
|
},
|
|
"config": {
|
|
"TemplateStylesExtenderEnablePrefersColorScheme": {
|
|
"description": "Enable the prefers-color-scheme media query. WARNING this can break things if TemplateStyles was updated upstream",
|
|
"value": true
|
|
},
|
|
"TemplateStylesExtenderEnableCssVars": {
|
|
"description": "Enable the matcher for css variables",
|
|
"value": true
|
|
},
|
|
"TemplateStylesExtenderEnableUnscopingSupport": {
|
|
"description": "Allow to unscope css by changing '.mw-parser-output' to a custom class",
|
|
"value": false
|
|
},
|
|
"TemplateStylesExtenderUnscopingPermission": {
|
|
"description": "Speficy the permission a user must have to use unscoping. Defaults to 'editinterface'.",
|
|
"value": "editinterface"
|
|
}
|
|
},
|
|
"ConfigRegistry": {
|
|
"TemplateStylesExtender": "GlobalVarConfig::newInstance"
|
|
},
|
|
"MessagesDirs": {
|
|
"TemplateStylesExtender": [
|
|
"i18n"
|
|
]
|
|
},
|
|
"AutoloadNamespaces": {
|
|
"MediaWiki\\Extension\\TemplateStylesExtender\\": "includes/"
|
|
},
|
|
"HookHandlers": {
|
|
"MainHooks": {
|
|
"class": "MediaWiki\\Extension\\TemplateStylesExtender\\Hooks\\MainHooks"
|
|
}
|
|
},
|
|
"Hooks": {
|
|
"TemplateStylesPropertySanitizer": "MediaWiki\\Extension\\TemplateStylesExtender\\Hooks\\PropertySanitizerHook::onSanitize",
|
|
"TemplateStylesStylesheetSanitizer": "MediaWiki\\Extension\\TemplateStylesExtender\\Hooks\\StylesheetSanitizerHook::onSanitize",
|
|
"ParserFirstCallInit": "MainHooks"
|
|
},
|
|
"manifest_version": 2
|
|
}
|