Commit graph

22 commits

Author SHA1 Message Date
Simon Legner f00dbbb939 Remove IIFE
Remove Immediately-invoked function expression throughout production code base.

Bug: T77349
Change-Id: Ia31b556975209bbea27df8444b69d924654b181e
2024-05-21 22:31:15 +02:00
TheDJ 24ee9dc48d Revert "Revert "Add position handling to URLs""
This reverts commit 5b89420182.

Reason for revert: restore previously reverted patch

Bug: T64039
Change-Id: Iac4486ae785f308d2a572f383073cfb73c7cb523
2024-05-21 19:09:16 +00:00
TheDJ 5b89420182 Revert "Add position handling to URLs"
This reverts commit de56d4a6de.

Reason for revert: breaks resize handler. Lets revert before branch cut.

Change-Id: I1e4d57d8384ab434f17968100f8bea1bf90c40ff
2024-05-20 20:51:59 +00:00
Simon Legner de56d4a6de Add position handling to URLs
- Instantiate LightboxImage object in mmv.bootstrap
- Add LightboxImage.position field: relative position of this image to others with same file
- Add optional routing suffix /:position

Bug: T64039
Change-Id: Ic7c5889064492fc88dae33271b635c5327b091e1
2024-05-20 18:36:23 +00:00
jenkins-bot 612ebb5c80 Merge "Public API to Check Wikimedia Media Viewer Extension Status" 2024-02-15 19:21:24 +00:00
libraryupgrader 147b576b57 build: Updating dependencies
composer:
* mediawiki/mediawiki-phan-config: 0.12.1 → 0.14.0

npm:
* eslint-config-wikimedia: 0.25.1 → 0.26.0
  The following rules are failing and were disabled:
  * resources:
    * es-x/no-resizable-and-growable-arraybuffers
  * tests/qunit:
    * es-x/no-resizable-and-growable-arraybuffers

* grunt-banana-checker: 0.11.0 → 0.11.1

Change-Id: Ief610bdadaccd2325cd1b8a2cae70b7e465d8b76
2024-02-13 02:13:29 +00:00
Simon Legner 1ab8d0d899 Public API to Check Wikimedia Media Viewer Extension Status
mw.mmv.isMediaViewerEnabledOnClick()

Bug: T348026
Change-Id: Ibc34e370e6bf631d9f861b9f6baa75d3f227123e
2024-02-07 20:38:01 +01:00
Simon Legner ef53ab0834 File with percentage sign in file name does not open
Invoking encodeURI on the imageFileTitle makes sure that a "%" character is properly URL-escaped.

Bug: T337540
Change-Id: I538b7f813b546134848e93cea4744de8f4da9e90
2024-02-07 20:13:35 +01:00
Umherirrender 4d4e86ecb2 Use a.mw-file-description to find thumbs
a.thumb is no longer outputted when $wgParserEnableLegacyMediaDOM is
false (fdd8f864 ), use the new class from 350721cc

Bug: T348275
Change-Id: I5ec67accab4e1cbfa90544087750016e1baab85d
2023-10-05 21:16:50 +02:00
Cormac Parle 6bb1cbaddb IP masking update
Use localstorage to store MMV preference for anon and temp users,
use regular user preference for non-temp accounts only

For embed default to wikitext for temp and regular users, html
for anon users

Bug: T340534
Change-Id: Ic19e8a6b6fbdeb2c86be14a33a306dd0f3088b1b
2023-07-04 11:52:40 +01:00
Simon Legner 30fad6b8b8 Use ES6 features
* classes
* arrow functions
* const/let
* string templates
* Object.assign

Bug: T337102
Change-Id: I757b9993a2feeed707fb4ad213944001498f3f6a
2023-06-12 16:45:08 +00:00
Simon Legner d82910fbb3 Use packageFiles in mmv
Bug: T337030
Change-Id: I833c7e91230272b82a2512fd55f1c7c0f61233b4
2023-05-20 10:04:41 +03:00
Simon Legner 35cd0f18c0 Use packageFiles in mmv
Bug: T337030
Change-Id: I90cdfb626c176b27b59db6b92b9edd6b2fe49b68
2023-05-20 09:34:56 +03:00
Sam Smith 34e4968b2c Remove instrumentation
The MediaViewer and MultimediaViewer* instruments were disabled circa
October 2021 in Ie7dd8739efc.

This patch removes those instruments and any supporting code and data.
Notably, this patch does not remove the mw.mmv.logging.ViewLogger
instrument, which is responsible for logging image views.

Bug: T310890
Change-Id: I97d41be93849b2ae9d1adba6660546ea716657fd
2022-07-05 17:41:24 +00:00
Ed Sanders e131da48f9 build: Update eslint-config-wikimedia to 0.22.1
Change-Id: I275ecfa03b3df8554b30f2a0f6d94d4b66da8088
2022-05-20 00:05:49 +01:00
Ed Sanders bfdcd8dbf1 eslint: Update eslint-config-wikimedia to 0.16.2
Change-Id: I0c35ed9b5ab00952124cb0e5c6c48fbc0d734f60
2020-06-26 12:14:27 +01:00
Ed Sanders d554d7f426 Docs: Fix whitespace
Change-Id: I98dc12787f68bd8db60e5a5bcb9366daf9f2f6b8
2020-06-26 11:21:04 +01:00
Simon Legner b1ade19388 Adopt mediawiki.router
Bug: T77258
Change-Id: Id4df92b0ebed3fb4f4b9269862c952f3968bf957
2019-05-26 19:46:38 +02:00
Simon Legner b23a32a413 Remove SVG checks
Bug: T223649
Change-Id: I252ca1cbba3e67921a4db82358d22bf02c20dc63
2019-05-18 17:46:20 +02:00
James D. Forrester c6008c7844 build: Be more aggressive in fixing old bad JS code style
Change-Id: I7f734f1440a4a3216e774d2bddbc39b34f4125d2
2019-02-20 19:28:25 +00:00
Ed Sanders 1ded292f83 Remove obsolete aliases from closures
Bug: T208951
Change-Id: Ice695dfb489974faa23ba19d74cf17b06e3f6075
2018-11-12 16:33:24 +00:00
Timo Tijhof 5c9faa580e Move files to their own directory per module
Bug: T193826
Change-Id: I925b1c7be2dbbb50994ed9f1ef12b5978ba175ff
2018-07-30 15:15:25 +02:00