MediaWiki talk:Gadget-NoUploadWizard.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search


Old discussions somewhere else:

It's enabled in my preferences, but...[edit]

...it doesn't work / MediaWiki:Upload-url still seems to "override" the link. Hurricanefan24 (talk) 22:00, 3 January 2013 (UTC)[reply]

Reduce default JS cost[edit]

Since 2013, UploadWizard has been the default method for uploading media files. However, the sidebar configuration does not point to Special:UploadWizard by default. Instead, the gadget that was once used for opting in, is now enabled by default.

This means that on every page load, for all users (including unregistered users), the gadget is downloaded, and its JavaScript code is scheduled, which then tries to find the link in the sidebar, and changes its destination.

Based on revision 64717925, I understand that the reasoning has to do with ensuring a graceful fallback to the old form. E.g. for users with Grade C browsers, or users that have disabled JS, or in the event that the JS code failed to initialise for other reasons. This makes sense. However, at least anno 2019, the upload wizard page itself already has this fallback. E.g. navigating to Special:UploadWizard results in the ability to upload regardless of web browser.

As such, I suggest two changes:

  • Update MediaWiki:Upload-url to point to Special:UploadWizard as default destination of the "Upload file" link in the sidebar.
  • Replace this gadget with a "NoUploadWizard" script that performs the inverse change for users preferring to have the link go to the classic form instead.

This means that the gadget will no longer be on by default and users no longer disable the gadget if they want to opt-out. Instead, the replacement gadget will be off by default and users can opt-out of UW by enabling this new gadget.

Users who currently have this gadget not-enabled will not need to find and enable the other gadget to keep UW disabled, because we can migrate the existing user preference. I can do this myself (in the WMF role of sysadmin), or can ask another sysadmin to do so for us. --Krinkle 01:50, 5 January 2020 (UTC)[reply]

Pinging some potentially interest parties: @Rillke, @Steinsplitter, @Multichill. --Krinkle 01:50, 5 January 2020 (UTC)[reply]
Sounds like a good plan to me. Go for it. Multichill (talk) 10:50, 5 January 2020 (UTC)[reply]
✓ Done. Gadget has been renamed and updated. And I've migrated the 1317 user preferences as well (migrated across and flipped the values from off to on). The sidebar link has also been updated in all languages with the exception of MediaWiki:Upload-url/de, which remains pointing to the classic form, just like the JavaScript code did until today. --Krinkle 02:14, 12 January 2020 (UTC)[reply]
One of the reasons for this script was that Upload Wizard was broken numerous times, sometimes only for some browsers or systems or users, sometimes for all of them while the upload form as stupid simple but worked and was easier to give support for in community forums. -- Rillke(q?) 23:06, 15 March 2020 (UTC)[reply]