mediawiki-skins-MinervaNeue/resources
Nicholas Ray 2179d08a8e Replace slow thumbnail init code with event delegation
Previously, page load executed code that iterated through each image on the
page, attached a click listener, and "attached" a Thumbnail object to the
element.

This execution took 90ms on my low-end phone and seems like it can be replaced
with event delegation instead. This will result in less work on the main thread
during page load and a more responsive user experience.

Additionally:

* Remove redundant check of the primary mouse button. Per the "click" event spec
[1], this click event "should only be fired for the primary pointer button
(i.e. when button value is 0)."

* Move initMediaViewer, initRedLinks, initRedLinksCta into same wikipage.content callback as the TOC mutation.

[1] https://w3c.github.io/uievents/#event-type-click

Depends-On: Ica3e0448e3d687e9c4cf563542dbe44432d196d5
Bug: T241139
Change-Id: Iebb18dfb225b474402c0d8ab5e39c5e9e71d3ad7
2023-04-19 21:13:55 +00:00
..
mediawiki.less Import Codex tokens into mediawiki.skin.variables.less 2023-03-17 20:21:33 +00:00
skins.minerva.amc.styles build: Updating npm dependencies 2023-03-31 21:50:36 +02:00
skins.minerva.base.styles build: Updating npm dependencies 2023-03-31 21:50:36 +02:00
skins.minerva.content.styles.images icons: Remove unnecessary code from SVG files 2023-04-01 12:07:12 +00:00
skins.minerva.icons.page.issues.default.color build: Upgrade 'svgo' to latest and re-crush SVGs 2021-04-20 17:45:18 +00:00
skins.minerva.icons.page.issues.medium.color build: Upgrade 'svgo' to latest and re-crush SVGs 2021-04-20 17:45:18 +00:00
skins.minerva.icons.page.issues.uncolored icons: Remove unnecessary code from SVG files 2023-04-01 12:07:12 +00:00
skins.minerva.loggedin.styles Echo icon should reflect seen status 2022-12-13 16:21:50 -08:00
skins.minerva.mainMenu.styles build: Updating npm dependencies 2023-03-31 21:50:36 +02:00
skins.minerva.mainPage.styles FIXME cleanup 2022-04-06 20:17:22 +00:00
skins.minerva.scripts Replace slow thumbnail init code with event delegation 2023-04-19 21:13:55 +00:00
skins.minerva.userpage.styles build: Updating npm dependencies 2023-03-31 21:50:36 +02:00
.eslintrc.json build: Convert resources/.eslintrc.js to json file 2023-04-11 19:06:04 +02:00
mobile.startup.stub.js Make MobileFrontend dependency a soft one 2020-01-17 14:02:23 -08:00