Commit graph

4 commits

Author SHA1 Message Date
tsepothoabala
9e32ff669e Create a function that checks if a username is a temporary user in JS
Bug: T327888
Change-Id: I45c888251676e7e84fef2eccf0e33b29d46c12e1
2023-02-21 22:47:18 +02:00
Ed Sanders
fc96dcc9d9 mediawiki.util: Add getTargetFromFragment (and percentDecode)
Allows you to take an arbitrary URL fragment and find the target
element, as you would with querySelector(':target') for the current
fragment.

Useful for finding arbitrary fragments, or if the current URL
was set with history.pushState, in which case :target is not
updated.

Used in DiscussionTools (I4ccc3fd) and MobileFrontend (I48d7346).

Requires the web2017-polyfills to support all our JS environments,
but this is skipped on all modern browsers.

Bug: T315872
Change-Id: I605a24c708e60ccffde9dce524485f61fd5c7b06
2022-08-30 17:36:27 +01:00
Timo Tijhof
a43ecd9a46 mediawiki.util: Add parentheses to wfUrlencode test cases
Clarify docs and reasoning in the tests.
Add some line breaks.
Consistent comment formatting.
Add "NOTE" in both directions.

This is in prep for an implementation change to the JS version, to
detect/prevent regressions.

Change-Id: Iaae47c040e13dcb55b141e5bc8304e8d140ce04f
2022-08-05 16:30:38 -07:00
Timo Tijhof
76c033b403 tests: Fix outdated /tests/qunit structure and flatten a bit
Some of these were outdated and predated modules that were combined,
split, or renamed (e.g. "mediawiki" no longer exists as a module,
we now have "startup" and "mediawiki.base").

Bug: T193826
Bug: T250045
Change-Id: I98a26c11651eacf727514e372ed12eadf17b4e7e
2022-07-14 21:59:16 -07:00
Renamed from tests/qunit/resources/mediawiki/mediawiki.util.test.js (Browse further)