⚓ T63007 Allow specifying when a gadget should load (action, namespace, content model)
Page Menu
Phabricator
Create Task
Maniphest
T63007
Allow specifying when a gadget should load (action, namespace, content model)
Closed, Resolved
Public
Actions
Edit Task
Edit Related Tasks...
Create Subtask
Edit Parent Tasks
Edit Subtasks
Merge Duplicates In
Close As Duplicate
Edit Related Objects...
Edit Commits
Edit Mocks
Mute Notifications
Protect as security issue
Assigned To
Krinkle
Authored By
bzimport
Feb 7 2014, 2:39 AM
2014-02-07 02:39:00 (UTC+0)
Tags
MediaWiki-extensions-Gadgets
(Backlog)
Wikimedia-Israel-Hackers
(Backlog)
Wikimedia-Performance-recommendation
MW-1.41-notes (1.41.0-wmf.28; 2023-09-26)
MW-1.42-notes (1.42.0-wmf.25; 2024-04-02)
User-notice-archive
(Backlog)
Patch-Needs-Improvement
Referenced Files
F37752811: Gadgets-generic-negation.zip
Sep 23 2023, 1:01 AM
2023-09-23 01:01:43 (UTC+0)
F37752179: Gadgets-orig.zip
Sep 22 2023, 10:07 PM
2023-09-22 22:07:20 (UTC+0)
F37752180: new-with-negation.zip
Sep 22 2023, 10:07 PM
2023-09-22 22:07:20 (UTC+0)
Subscribers
Aklapper
BrandonXLF
Candalua
Catrope
Ciencia_Al_Poder
DannyS712
Escargot_rouge
View All 42 Subscribers
Description
Gadgets, when enabled by a user, load on all pages in all namespaces. This doesn't cause any immediate functional problems, but is inefficient. In some cases, very unacceptably inefficient, to the point that a gadget may be removed from a wiki or disabled due to performance problems. This is usually worked around in one of two ways:
The gadget is split into two parts. A part that contains the actual gadget itself (hidden, disabled by default). And a (tiny)
second
part that is loaded always and checks whether the current page is the "right" one, and then loads the other.
Downside: Two definitions instead of one.
Downside: The page will first load without the gadget, and then later the gadget gets loaded (typically between 1-10s seconds later, depending on the connection and bandwidth).
The gadget is made hidden and is instead loaded by url parameter (e.g.
/wiki/Example?withModule=ext.gadget.foo
).
Downside: Cannot be enabled on a per-user base (url parameter applies to all users). It also means the gadget only loads when the user follows a specific link, e.g. not when visiting the page through other means.
Downside: The page will first load without the gadget, and then later the gadget
We should instead add an option directly in the Gadgets extension to specify when a gadget should load (by default still everywhere).
Eg. based on the namespace, or page title, or page action, or canonical special page name.
Original request:
Author:
gryllida
Description:
We should add an option to specify what pages a gadget is active on. Many probably just do this manually, but it looks reasonable as some gadgets would only be useful for contributors' talk pages for example. This could be a namespace name, or sometimes even a glob mask (Wikipedia talk:Articles for Creation/*).
See Also
T8883: Allow page-specific inclusion of
US