mediawiki-extensions-Popups/extension.json
jdlrobson 7dfad14da1 Directory structure should reflect the ResourceLoader definitions
Given we currently have modules defined in extension.json and in hooks
it can be really confusing understanding how the code fits together.

This change hopefully makes this a little clearer by using folder names
that are named after the resource loader modules - this is also consistent
with how we do things in our other extensions.

A images folder is added to the route so that it is clearer that the images
are not used in ResourceLoader module definitions and are only used to illustrate
the beta feature.

Change-Id: Ia650ec03e3a6d3069165441ddfa069d390be4d10
2016-10-19 20:52:40 +00:00

133 lines
3.5 KiB
JSON

{
"name": "Popups",
"author": [
"Prateek Saxena",
"Yair Rand"
],
"url": "https://www.mediawiki.org/wiki/Extension:Popups",
"descriptionmsg": "popups-desc",
"license-name": "GPL-2.0+",
"type": "betafeatures",
"AutoloadClasses": {
"PopupsHooks": "Popups.hooks.php"
},
"ConfigRegistry": {
"popups": "GlobalVarConfig::newInstance"
},
"Hooks": {
"GetBetaFeaturePreferences": [
"PopupsHooks::getPreferences"
],
"BeforePageDisplay": [
"PopupsHooks::onBeforePageDisplay"
],
"ResourceLoaderTestModules": [
"PopupsHooks::onResourceLoaderTestModules"
],
"ResourceLoaderRegisterModules": [
"PopupsHooks::onResourceLoaderRegisterModules"
],
"ResourceLoaderGetConfigVars": [
"PopupsHooks::onResourceLoaderGetConfigVars"
],
"BeforePageDisplayMobile": [
"PopupsHooks::onBeforePageDisplayMobile"
],
"MakeGlobalVariablesScript": [
"PopupsHooks::onMakeGlobalVariablesScript"
]
},
"MessagesDirs": {
"Popups": [
"i18n"
]
},
"EventLoggingSchemas": {
"Popups": 15906495
},
"config": {
"@PopupsBetaFeature": "@var bool: Whether the extension should be enabled as an opt-in beta feature. If true, the BetaFeatures extension must be installed. False by default.",
"PopupsBetaFeature": false,
"@PopupsSurveyLink": "@var bool|string: When defined a link will be rendered at the bottom of the popup for the user to provide feedback. The URL must start with https or http. If not, then an error is thrown client-side. The link is annotated with `rel=\"noreferrer\"` so no referrer information or `window.opener` is leaked to the survey hosting site (see https://html.spec.whatwg.org/multipage/semantics.html#link-type-noreferrer for more information).",
"PopupsSurveyLink": false,
"EnablePopupsMobile": false,
"@SchemaPopupsSamplingRate": "@var number: Sample rate for logging events to Schema:Popups.",
"SchemaPopupsSamplingRate": 0,
"PopupsExperiment": false
},
"DefaultUserOptions": {
"popupsmobile": "1"
},
"ResourceModules": {
"ext.popups.core": {
"scripts": [
"resources/ext.popups.core/ext.popups.core.js"
],
"dependencies": [
"mediawiki.api",
"mediawiki.Title",
"mediawiki.Uri",
"mediawiki.RegExp",
"mediawiki.storage",
"mediawiki.user",
"mediawiki.experiments"
],
"targets": [
"desktop",
"mobile"
],
"styles": [
"resources/ext.popups.core/ext.popups.core.less"
]
},
"ext.popups.targets.desktopTarget": {
"scripts": [
"resources/ext.popups.targets.desktopTarget/desktopTarget.js"
],
"dependencies": [
"mediawiki.storage",
"jquery.client",
"ext.popups.core",
"ext.popups.renderer.desktopRenderer"
],
"targets": [ "desktop" ]
},
"ext.popups.images": {
"selector": ".mw-ui-icon-{name}:before",
"class": "ResourceLoaderImageModule",
"prefix": "mw-ui",
"images": {
"popups-close": "resources/ext.popups.images/close.svg"
}
},
"ext.popups.renderer.desktopRenderer": {
"scripts": [
"resources/ext.popups.renderer.desktopRenderer/desktopRenderer.js"
],
"dependencies": [
"ext.popups.core"
]
},
"ext.popups.schemaPopups.utils": {
"scripts": [
"resources/ext.popups.schemaPopups.utils/ext.popups.schemaPopups.utils.js"
],
"dependencies": [
"mediawiki.experiments",
"mediawiki.Title",
"mediawiki.user",
"ext.popups.core",
"ext.popups.renderer.desktopRenderer"
],
"targets": [
"desktop"
]
}
},
"ResourceFileModulePaths": {
"localBasePath": "",
"remoteExtPath": "Popups"
},
"manifest_version": 1
}