Avoid creating of Title object to get the "fixed special name" (which is
the localized name) and compare that against the local name of the
current page, just use the SpecialPageFactory to get the canonical name
(which is the english internal name, not the english visible name) and
compare against the list of canonical allowed pages (adjust the existing
list to the canonical names, that are "old" names in different cases)
Change-Id: Ia6f6574bf6e65c75f8977ff016feda6ecdca3776
The use of "HookHandlers" attribute in extension.json makes it possible
to inject services into hook handler classes in a future patch.
Bug: T271019
Change-Id: I57dac8d590b5afa7524000d93c8477a10148c052
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
On certain special pages, like Special:Search, MMV is
intended to launch anyway. The existing check, however,
assumes that those pages will actually be called that,
but in non-English languages, it's often something
different (e.g. Recherche or Pesquisar).
This then results in MMV not being present on those
pages in those languages, even though it was intended to.
The fix is to simply make sure to case both titles to
the local form and then compare them.
Bug: T323650
Change-Id: Iec01ddf4c1ea4ec5d9c42de5a6a3140470ad5052
Tipsy was added in I993bf60909024453a14de85af6239bded02eb8a6 however
has since been deprecated and usage is discourage.
Falling back to standard HTML `title` attribute display seems fine. Some
buttons (such as previous/next arrow) have not had a tipsy tooltip.
To be done separately: TipsyDialog which is used for StatusInfo
Bug: T77402
Change-Id: I2f7ae189734ba6d6e67ca703a42ae899ec56729d
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
Remove using of User:getOption since this method
will be hard-deprecated. Now it is soft-deprecated.
Bug: T296083
Change-Id: Ic7d52a3be7bcfef8827d3fa33b663fbe05fef3f8
Remove using of User::getDefaultOptions since this method will be hard-deprecated. Now it is soft-deprecated
Bug: T276035
Change-Id: If2647bf24969a277a795e46b620cc81937c147c2
Document the compatibility problem between MobileFrontend
and Minerva.
Note that on Minerva when running in desktop mode, the code
in this extension runs (not MobileFrontend).
Bug: T235712
Change-Id: Iafe508cbd19b3f77f553219bf4c28f04ba147fe9
This patch also removes some & from function parameters that are not
meant to be passed "by reference". These & are from a time when PHP 4
passed objects by creating expensive copies. They are not needed any
more, but create the wrong impression the hook handler function would be
allowed to replace these objects with other ones.
Change-Id: If91c6d963150f909735f2c06f98a446ae1fb2047
Given case-sensitive search, the callback didn't show up
when searching for "MakeGlobalVariablesScript", unlike for
almost every other deployed extension.
Change-Id: Ib9138446a898802150a123e140a14bfba08709e6
We can't tell if there are images on the page, so just always
load. The code will likely be in the client cache anyway.
Bug: T62014
Change-Id: Idaec22c3fd7126c1818c5febbccd6a0cfac7b721
Use the new extension.json attribute instead.
Bug: T214211
Depends-On: I27ecebe27d7aaebe6d1317bc5eaea9cca368b45d
Change-Id: Iacb68ce9a7bab864720ef9a56f8702a4f02c129d
* Deletes the mmv.model.EmbedFileInfo class file and its test file
* Updates the extension.json and MultimediaViewerHooks.php files to reflect
these deletions (by removing entries from dependency lists)
* Refactors all instances of `new mmv.model.EmbedFileInfo()` to instead use a
POJO with appropriate properties. Conditional assignment is used for the
caption and alt properties if there is any chance they won't be available, to
keep from adding props with falsy values.
* Refactors JSDoc method annotations so that `@param` tags expecting an
EmbedFileInfo instance now expect an object; relevant properties of this
object and their types have been added to the method annotations as well.
Bug: T77320
Change-Id: Ie9f5f24136f4b73000259685474ce4d765a3ccd3
As best I can tell, adding the `ext.eventLogging` module as a dependency
for these three modules is unnecesary. One of those modules doesn't
even exist, and my greps across the entire extension show that
mmv.logging.Logger.js uses `mw.loader.using` to load the module, so a
server-side dependency isn't required.
As an aside, this extension should probably use the more abstract
`mw.track` interface instead.
Bug: T180192
Change-Id: If71277114be5a003d8f51040e52a601ace983c51