mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CookieWarning
synced 2024-11-27 15:40:16 +00:00
4f3981580d
There's a lot of things going on here, so a quick summary:
* Moved the warning outside sitenotice to avoid reflows and all
kinds of other issues, including those with dismissable notices.
* Placed the warning on the bottom of the page, on all skins, for
consistency and to avoid obstructing vital UI elements such as
site name, user tools, search box.
* Changed the UI to use OOUI for, again, consistency and to avoid
reinventing the wheel with button styling.
* Removed the cookie emoji as it was only taking up valuable space
on mobile and making designing a sensible layout much harder.
* Merged the mobile and desktop RL modules into a single, responsive
one. The warning will work correctly for any skin and screen width.
* The integration tests are truly horrible, I tried to at least
make them work. They deserve a proper rewrite, but that should be
done after the extension switches to the new hook system.
I will post screenshots of this in action in the first of the linked
tasks.
Bug: T271047
Bug: T173335
Change-Id: I6e2a3d7aeccc0d4df1b3238e52c67e72099d27d8
(cherry picked from commit edd0a7d949
)
138 lines
3.1 KiB
JSON
138 lines
3.1 KiB
JSON
{
|
|
"name": "CookieWarning",
|
|
"version": "0.3.0",
|
|
"author": [
|
|
"Florian Schmidt",
|
|
"Liz Lee",
|
|
"Jack Phoenix",
|
|
"Ostrzyciel"
|
|
],
|
|
"url": "https://www.mediawiki.org/wiki/Extension:CookieWarning",
|
|
"descriptionmsg": "cookiewarning-desc",
|
|
"type": "other",
|
|
"license-name": "MIT",
|
|
"requires": {
|
|
"MediaWiki": ">= 1.35.0"
|
|
},
|
|
"MessagesDirs": {
|
|
"CookieWarning": [
|
|
"i18n"
|
|
]
|
|
},
|
|
"Hooks": {
|
|
"SkinAfterContent": "CookieWarning\\Hooks::onSkinAfterContent",
|
|
"GetPreferences": "CookieWarning\\Hooks::onGetPreferences",
|
|
"BeforeInitialize": "CookieWarning\\Hooks::onBeforeInitialize",
|
|
"BeforePageDisplay": "CookieWarning\\Hooks::onBeforePageDisplay",
|
|
"ResourceLoaderGetConfigVars": "CookieWarning\\Hooks::onResourceLoaderGetConfigVars"
|
|
},
|
|
"config": {
|
|
"CookieWarningEnabled": false,
|
|
"CookieWarningMoreUrl": "",
|
|
"CookieWarningGeoIPServiceURL": "//freegeoip.net/json/",
|
|
"CookieWarningGeoIPLookup": "none",
|
|
"CookieWarningForCountryCodes": {
|
|
"EU": "Europe",
|
|
"AD": "Andorra",
|
|
"AL": "Albania",
|
|
"AT": "Austria",
|
|
"BA": "Bosnia and Herzegovina",
|
|
"BE": "Belgium",
|
|
"BG": "Bulgaria",
|
|
"BY": "Belarus",
|
|
"CH": "Switzerland",
|
|
"CS": "Serbia and Montenegro",
|
|
"CZ": "Czech Republic",
|
|
"DE": "Germany",
|
|
"DK": "Denmark",
|
|
"EE": "Estonia",
|
|
"ES": "Spain",
|
|
"FI": "Finland",
|
|
"FO": "Faroe Islands",
|
|
"FR": "France",
|
|
"FX": "France, Metropolitan",
|
|
"GB": "United Kingdom",
|
|
"GI": "Gibraltar",
|
|
"GR": "Greece",
|
|
"HR": "Croatia",
|
|
"HU": "Hungary",
|
|
"IE": "Ireland",
|
|
"IS": "Iceland",
|
|
"IT": "Italy",
|
|
"LI": "Liechtenstein",
|
|
"LT": "Lithuania",
|
|
"LU": "Luxembourg",
|
|
"LV": "Latvia",
|
|
"MC": "Monaco",
|
|
"MD": "Moldova, Republic of",
|
|
"MK": "Macedonia",
|
|
"MT": "Malta",
|
|
"NL": "Netherlands",
|
|
"NO": "Norway",
|
|
"PL": "Poland",
|
|
"PT": "Portugal",
|
|
"RO": "Romania",
|
|
"SE": "Sweden",
|
|
"SI": "Slovenia",
|
|
"SJ": "Svalbard and Jan Mayen",
|
|
"SK": "Slovakia",
|
|
"SM": "San Marino",
|
|
"UA": "Ukraine",
|
|
"VA": "Holy See (Vatican City State)"
|
|
}
|
|
},
|
|
"ResourceModules": {
|
|
"ext.CookieWarning": {
|
|
"dependencies": [
|
|
"mediawiki.api",
|
|
"mediawiki.cookie",
|
|
"mediawiki.user"
|
|
],
|
|
"scripts": "resources/ext.CookieWarning/ext.CookieWarning.js",
|
|
"targets": [
|
|
"mobile",
|
|
"desktop"
|
|
]
|
|
},
|
|
"ext.CookieWarning.styles": {
|
|
"styles": "resources/ext.CookieWarning/ext.CookieWarning.less",
|
|
"targets": [
|
|
"mobile",
|
|
"desktop"
|
|
]
|
|
},
|
|
"ext.CookieWarning.geolocation": {
|
|
"scripts": "resources/ext.CookieWarning.geolocation/cookiePolicy.js",
|
|
"dependencies": [
|
|
"ext.CookieWarning",
|
|
"jquery.cookie"
|
|
],
|
|
"targets": [
|
|
"mobile",
|
|
"desktop"
|
|
]
|
|
},
|
|
"ext.CookieWarning.geolocation.styles": {
|
|
"styles": "resources/ext.CookieWarning.geolocation/styles.css",
|
|
"targets": [
|
|
"mobile",
|
|
"desktop"
|
|
]
|
|
}
|
|
},
|
|
"ResourceFileModulePaths": {
|
|
"localBasePath": "",
|
|
"remoteExtPath": "CookieWarning"
|
|
},
|
|
"AutoloadNamespaces": {
|
|
"CookieWarning\\": "includes/"
|
|
},
|
|
"ConfigRegistry": {
|
|
"cookiewarning": "GlobalVarConfig::newInstance"
|
|
},
|
|
"ServiceWiringFiles": [
|
|
"includes/ServiceWiring.php"
|
|
],
|
|
"manifest_version": 1
|
|
}
|