Load jquery.uls only when the trigger is clicked.
Reduces the initial footprint by 63.9 KB (uncompressed)
Bug: T135210
Change-Id: I972cb6ea1794485917ea530f7abe68bdddc2014f
Modern browsers will use woff2, which has smaller size than woff
Updated the README in the font repository explaining how different
file formats are produced.
Bug: T128291
Change-Id: I81c5380fdbf0ff76142b67cf8fce9db20e8164fa
It re-triggers mw.uls.getFrequentLanguageList(),
getPreviousLanguages() and localstorage read.
In this patch the result was saved and reused.
Bug: T122341
Change-Id: I14839eb611cd3e995e8d8ab729ee3f714840f9ad
We don't need plugin pattern here since it is not meant for a use
in multiple contexts. Code simplified.
Change-Id: Iee86069aaa82f5a9ab3a856c19360e9ea89211ad
Includes changes to the generated repository file
because the script had not been run for last update.
Change-Id: I6b5d1ce980c6e5b42e36c0044729536b6b0ae4dc
We had a browser check to blacklist all browsers older than IE 8
IE <= 7
But that is no longer required since JS support is not there for such
browsers as per https://www.mediawiki.org/wiki/Compatibility#Modern
We can support all modern browsers listed there and we don't need
additional blacklisting now. From 1.27 onwards, there is no JS loaded
for IE 8 too. So we can just use MW browser support policy.
In this commit, the code to do brower checks removed and simplified
the initialization code. Still I am not happy with the interface module,
that need further refactoring.
Change-Id: I655826c55fb2c7c5c88f16368110142d64a96eec
Test plan:
* Remove localstorage and cookies for a site
* Go the the site
* Change language and observe the undo tooltip
Change-Id: Ibecb5ea1cd537b2f019e7a9aa67ffac1a4e0923d
These changes affect anonymous users:
* Old code to restore preferences from jStorage removed
* No cookie used anymore
Bug: T100639
Change-Id: I3cfec447703d9c67cd2310ec4acc5692ad76be8e
The ext.uls.buttons style can be removed but Translate extension use that.
Once it is separated we can remove it from ULS.
Testplan:
Use ULS settings and notice the style difference of buttons, checkboxes
and radio buttons. No functionality should be affected and UI should not
be broken in any ways.
This was once attempted in Id186ece6513f154e0388bc4170c21bdabb59038a
but we had to revert because of incompleteness
Bug: T52599
Bug: T127020
Change-Id: Ibbb2068b5036537f298fad6c49169a5b986304d5
Interlanguage lists can contain language codes that are redirects
in language data of ULS.
For example, sr is a redirect to sr-cyrl.
So, if sr is passes as one of the language to ULS, its region, script
grouping is failing and the end result will be missing them in the ULS
language list. This should be properly fixed in jquery.uls library.
Tracked at https://github.com/wikimedia/jquery.uls/issues/207
In this patch we are following a simple approach of passing the language
codes to ULS as redirect resolved.
Bug: T100002
Bug: T131005
Bug: T126909
Bug: T123834
Change-Id: I8b89edb60b4d2c6f2b25c8589569f748c5523722
The pointer arrow of the ULS was not aligned with the 'x more' trigger
and it missed shadow. This commit fixes it.
Notably, we replace the old arrow with a box rotated 45 degree so that
we can apply the shadow very easily.
Bug: T130633
Change-Id: I4d36f3ee9fcfea932e10208518a03e7b246a7abe
Removed the code to log whether map(removed long time back), search,
common languages used for selecting the language.
This logs were introduced to measure and adapt UI effectiveness.
No longer needed now.
Change-Id: I83bdd250cb6474da4fbf22aed2011071b9f9eba4
Zopfli is the most efficient DEFLATE compression algorithm, trading run-time
performance for file sizes that are typically 3-8% smaller than those produced
by zlib with the maximum compression setting. Its output is Deflate-compatible,
so no specialized decoder is needed.
This change was created by running zopflipng against all the PNG files in this
repository. The exact invocation was:
git ls-files --exclude-per-directory=.gitignore -- '*.png' \|
parallel zopflipng -m -y {} {} \;
Files which zopflipng was not able to compress more efficiently were left unmodified.
Bug: T127608
Change-Id: I7f0ef09941cffb964acb3c67ef755e8538904084
- Updated versions and order of checkers.
- Some consistency updates in Gruntfile.js.
- Updates to make jscs pass.
Change-Id: I7ed93596ff383dc713bd17af2da0472be934d59d
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
T122341:
* Move hideOriginal() call to right before render() to reduce repaint flash.
* Use plain css() instead of show() and hide().
* Use native getAttribute() instead of jQuery().attr.
Other minor clean up:
* Fix jsduck syntax.
* Consistently use 'location' instead of 'window.location'
(mostly the case already except for one).
Bug: T122341
Change-Id: Ief76fe7c0fb2bfca3468361ebab14c1dfb1df4c2
Per discussion on Gerrit about previous patch-sets in this change, only use
jQuery.tipsy for the undo popover. This means that in the common case (i.e.,
the user has not just changed languages), the ULS tooltip will be system native
tooltip.
Change-Id: I9206a79d59687930c26b7ef86d29bfba050691fe
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
Automatically migrates data from uls-previous-language cookie to localStorage.
See associated bug for rationale.
Bug: T110353
Change-Id: Ib98499040b9edf4a1f1d9e3afd7661fc2d1f7fea
Using try-catch block to handle common case of empty options isn't nice.
Avoid it be replacing options to valid JSON
Change-Id: I5b64f7f9a76a94d9c07face8059beab59d4aef93