Commit Graph
24 Commits
Author SHA1 Message Date
Fomafix b30315da05 Use ResourceLoader::makeConfigSetScript to generate mw.config.set() script
Change-Id: If2ca0585c17f772567fffeab0fc32239e87d8cd7
2017-04-02 14:41:33 +02:00
Fomafix 3ec9a325a4 Use module 'mediawiki.storage' from core to access localStorage
This change requires MediaWiki version 1.26 and removes support for lower
versions.

Bug: T153635
Change-Id: Ia74e16cb08e8cb1f15196a98329e2994b0283edb
2017-01-20 17:19:46 +01:00
Fomafix 1312b905f2 Remove module 'jquery.i18n'
Since MediaWiki 1.26 the module 'jquery.i18n' is in core:
 git blame origin/REL1_26 -- resources/Resources.php

Bug: T153635
Change-Id: Ie4cf86dd5020a75456cfe183b26c114437eb22e0
2017-01-20 16:58:52 +01:00
Fomafix 47cfd9c1ae Replace $( document ).ready(...) by $(...)
In jQuery 3 $(document).ready(...) is deprecated.
https://jquery.com/upgrade-guide/3.0/#deprecated-document-ready-handlers-other-than-jquery-function

Change-Id: I1a9f578d8cf8fa2d9dd38a1b2d3a0b3c32914b74
2017-01-06 14:10:55 +01:00
Fomafix f6023ec051 Use an empty array instead of the uls-p-lang-dummy list item (JS)
This change is the JavaScript part of change
I54a18f5bd85a8261a25e1160dda7a33fbdf3dd7b.

This change should get deployed when the HTML caches of change
I54a18f5bd85a8261a25e1160dda7a33fbdf3dd7b has expired.

Change-Id: Id7f429d9d1217316341102e27389711525f17b2d
2017-01-04 14:24:02 +01:00
Fomafix a159ff1444 Use an empty array instead of the uls-p-lang-dummy list item (PHP)
This change avoids a flash of a list item bullet while loading on skin
MonoBook.

The JavaScript part of this change is in
Id7f429d9d1217316341102e27389711525f17b2d. The JavaScript part should get
deployed when the HTML caches of this change has expired.

Change-Id: I54a18f5bd85a8261a25e1160dda7a33fbdf3dd7b
2017-01-04 14:20:33 +01:00
Fomafix 337e0aef8c Move interface styles to ext.uls.interface.css
This change avoids loading of not needed styles for non-JavaScript client.

Change-Id: Ieaca5098181d1e922b940ed339fcee7bad8741b4
2016-11-08 16:46:00 +01:00
Fomafix 58777c4e37 Use mw.msg() for parameter substitution
mw.msg() has already a parameter substitution of $1.
A separate .replace( '$1', ... ) is not necessary.

Change-Id: Ie77bddc4dfb60df36211ce821c1a6f7223cde706
2016-11-06 15:45:50 +01:00
FomafixandNikerabbit fda55e2ab1 Integrate ext.uls.nojs into ext.uls.pt
The CSS hiding for non-JavaScript clients is only necessary when the buttons
get added.

Change-Id: I6e43e39d29c093a19f3e8355d657f162f9a62736
2016-09-20 12:22:51 +00:00
Fomafix 80a943d41e Add pure CSS modules via addModuleStyles() instead of addModules()
'ext.uls.pt' and 'ext.uls.interlanguage' are pure CSS modules.
This change avoids a FOUC of the ULS icons.

Change-Id: I912d0c98d1857461d21b4db0ef7376783cc871d2
2016-09-13 18:51:53 +02:00
Fomafix 8778051f8f Remove unused variable loginUri
The variable loginUri was added in 422371f6 but never used.

Change-Id: I85aaa6aa524dbe0a02129696f1bff46fb410fbe5
2016-08-30 12:18:45 +02:00
Fomafixand[[mw:User:Fomafix]] 6dab908f30 Remove since MW 1.25 deprecated functions
In class ApiBase the methods
* getParamDescription()
* getDescription()
* getExamples()
are deprecated since MediaWiki 1.25.

This change requires MediaWiki 1.25+.

Change-Id: Ice6b310b8dea3a223f45317aa803a743b5daa680
2016-03-30 07:07:21 +00:00
Fomafixand[[mw:User:Fomafix]] cd58ac2f18 Use mw.Api.plugin.options to set user options
This requires MediaWiki version 1.25+.

Change-Id: I3a76b0b4ec403b3acdc29e64b0c750a3b57e252a
2016-02-15 14:13:13 +00:00
Fomafixand[[mw:User:Fomafix]] c329f1473d Use spaces inside of brackets in JavaScript
* For consistency
* For MediaWiki coding conventions

Change-Id: I625a8ce0119b1490073f048e1b8ad4e90762d6e2
2016-02-15 13:31:45 +00:00
FomafixandNikerabbit 63bc85649a Ensure module 'jquery.tipsy' is loaded before using
Move the showTipsy calls into the callback.

Move the declaration of the functions hideTipsy and showTipsy before the
new call position.

Also change the order of the declaration of the functions hideTipsy and
showTipsy to avoid a forward reference in showTipsy. Spotted by JSLint.

Bug: T118507
Change-Id: I338a78cde249405459be14948b78cf59d715145a
2016-02-15 13:03:52 +00:00
Fomafixand[[mw:User:Fomafix]] bd44ae4888 Use .prop() instead of .attr()/.removeAttr() to set boolean attributes
Change-Id: I4988316b202c19f851f2c05e3d07acc8c5ea38cf
2016-02-08 18:38:15 +00:00
Fomafixand[[mw:User:Fomafix]] 0d5c69f655 Do not use setlang to change user language
Requests using GET should only retrieve data and should have no other effect.
(https://en.wikipedia.org/wiki/HTTP_GET_request)

* Use API with POST to change the user interface language in user settings.
* When allowed by wgULSAnonCanChangeLanguage set cookie for anonymous user
  or when API fails.

This change uses mediawiki.cookie which requires MediaWiki 1.24+.

Bug: T46649
Change-Id: Iaf6fafbf200933dfc760be69d2adf5e5efcf8245
2015-09-08 20:21:05 +00:00
Fomafixand[[mw:User:Fomafix]] 6dac1ca48e Add missing dependency to 'mediawiki.notify'
ext.uls.ime.js uses mw.notify().

Change-Id: If435d6934df6edf8aff5431cb7a303cc6361a472
2015-08-28 19:39:17 +00:00
FomafixandNikerabbit 69475f0308 Prevent predefined object methods to be interpreted as valid language
Change-Id: I97bb0f8eef6a9361118527cecb4680aeac51b7e1
2015-02-14 12:08:07 +00:00
Fomafixand[[mw:User:Fomafix]] 0833c990e7 Apply coding conventions for JavaScript
Change-Id: Id158ac08d32cc7421e47ae6abdd2bd80879f04d9
2015-02-07 19:34:21 +00:00
Fomafixand[[mw:User:Fomafix]] c33ac5fdb4 Restore support for IE8
IE8 does not support Object.keys.

Bug: T86516
Change-Id: Ib1a5df6c1660bc30f7b33f1b794a9229ce31cba6
2015-01-12 10:54:22 +00:00
Fomafixand[[mw:User:Fomafix]] 78d9d155f3 Remove support for MediaWiki version < 1.22
On https://www.mediawiki.org/wiki/Extension:UniversalLanguageSelector
MediaWiki 1.22 or later is required.

Change-Id: Ib1b1db6cddb48318dbcae64797b2fa57d3198747
2014-12-04 22:37:55 +00:00
Fomafixand[[mw:User:Fomafix]] d50ca14543 Encode URL parameter
Change-Id: I2eaf564b35624c8441cb8f54f6ab166f5d1762a2
2014-01-21 07:18:03 +00:00
FomafixandErshad K 14aef6d7e1 Fixed the bug 42013 - 'class' as property name
Applied the patch given in bug report

Change-Id: I01ded82bd426edf630561b013d7cafe46130d697
2012-11-12 00:28:35 +05:30