Compatible with jQuery 1.11 and 3.x, as jQuery.expr.pseudos was
introduced in jQuery 1.8.
Note that this is not blocking jQuery 3 (T124742) since it is
covered by jQuery Migrate. But fixing this makes the edit page less
noisy by default.
Change-Id: I7ffbfd2e55aa7dcc31860eb0117b203e63ca7283
Source code:
https://code.jquery.com/jquery-3.2.1.jshttps://code.jquery.com/jquery-migrate-3.0.0.js
Documentation:
https://blog.jquery.com/2016/06/09/jquery-3-0-final-released/https://jquery.com/upgrade-guide/3.0/
This is not a breaking change because jQuery Migrate covers
all breaking changes.
However some extensions (especially unit tests) may've relied
on undocumented behaviour. For that reason, and due to unresolved
upsteam issues this is still behind a feature flag for now.
It is true by default to ensure this has wide exposure to discover
issues as quickly as possible. If this is not resolved before
the end of the 1.29 release cycle it should be turned off again.
Bug: T124742
Change-Id: I3c3dedaa9a9d449eaa2b7e5d24b4540e7fa421c0
Languages and locales now with support:
* aeb-arab
* dv
* fy
* gd
* jv
* kk-cyrl
* ky
* lo
* ms
* pa
* se
* si
* ss
* sw
* te
* zh-hk
Skipped languages because we don't support them in MW:
* ar-ly
* en-ie
* en-nz
* es-do
* fr-ch
* me
* tlh
* tzl
Change-Id: I7f89569c6ee6640d368af1378e84c5a9e725da0d
This minor change fixes an error when using draggable revert and grid.
Since upgrading of jQuery UI probably won't happen in the near future [1]
I looked for another way to fix the issue.
See [2]. Unlike stated in the second comment adding the lines below
won't fix the bug. Moving the lines up fixed the issue.
See also the description of the bug in [3].
[1] https://phabricator.wikimedia.org/T71386
[2] https://bugs.jqueryui.com/ticket/4696
[3] https://phabricator.wikimedia.org/T140965#2944610
Bug: T140965
Change-Id: Ib0f386c6a2447740f44591be70c34cf4a83b88c4
All A-graded browsers now supports JSON so skip the
JSON polyfill. Krinkle investigated the current
status for 3 months on Wikimedia traffic (T141344#2784065)
with support being nearly 100%.
Bug: T141344
Change-Id: I8280faf1cbcd876ead2dafae4347b7d46e3e2acb
[Backport from OOjs UI master as this fixes a significant regression.]
* Make the `<legend>` 'display: inline-table' rather than 'table'.
A block-level table would push down elements that follow it,
including the "help" icon, which in turn messed up the fields.
Fixes T145682, T145678 and first half of T145680.
* Only style .oo-ui-labelElement-label with margin and padding
if we have the .oo-ui-labelElement class (label is not empty).
Fixes second half of T145680.
Follow-up to 9cf8b941a9c618f1d7ba2512508f576f70116e1e.
Bug: T145682
Bug: T145678
Bug: T145680
Change-Id: Id95f4167afa6c000d6d2fa2ad7a62b65b6d4d53b
If there is an element with id="global" on the page,
typeof global !== 'undefined' is true, but global.moment will
still be undefined and shouldn't be used.
For now, comment out the wrapper and just use 'this'.
We should look into upgrading to momentjs 2.14 where this bug is fixed.
Bug: T145382
Change-Id: Ia6e3b46e42248a5ee3c61c5fcda7d020d012e89e
SHA-1 is not secure enough to be used as a cryptographic hash function, and its
implementation in JavaScript is too long and too slow for it to be a good
general-purpose hash function. And we currently throw away most of the work:
SHA-1 produces 160-bit hash values, of which we keep 48.
Although the JavaScript implementation is not exported, SHA-1 is a well-known
hash function, and I'm willing to bet that sooner or later someone will move to
make it accessible to other modules, at which point usage will start to spread.
For ResourceLoader, the qualities we're looking for in a hash function are:
* Already implemented in PHP
* Easy to implement in JavaScript
* Fast
* Collision-resistant
The requirement that hashes be cheap to compute in JavaScript narrows the field
to 32-bit hash functions, because in JavaScript bitwise operators treat their
operands as 32 bits, and arithmetic uses double-precision floats, which have a
total precision of 53 bits. It's possible to work around these limitations, but
it's a lot of extra work.
The best match I found is the 32-bit variant of FNV-1, which is available in
PHP as of version 5.4 (as 'fnv1a32'). The fnv132 JavaScript function is
around ten times faster and eight times shorter than sha1.
Change-Id: I1e4fb08d17948538d96f241b2464d594fdc14578
Add a generic barebones Router class to core to allow registration of
routes in a central place and deal with potential clashes in future.
See patches making use of the router:
- Kartographer extension I456a4582a67e31533d51d5817d0f4af57528c35e
- mediawiki.special.preference If7cb76e362464943df20598bd09fd341574756c4
Bug: T114007
Change-Id: I4295db446eac7cf24a3ed89edfa9eefa5cb34b73