Jump to content

MediaWiki talk:Gadget-ImageAnnotator.js

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Synced, but commons depends on Common.js

[edit]

This gadget is designed to be run on Commons via commons:MediaWiki:Common.js (presumably so that users can't disable the gadget?). However, that definition excludes special pages and non view/submit wgActions, which we unfortunately aren't doing here. Xaosflux I'm curious what you think about this, but I think we should create a helper gadget to handle those checks here, and then load the gadget if appropriate. We could edit the local version, but I think it's probably better to make it easier to sync with the Commons version. ~ Amory (utc) 17:22, 22 November 2020 (UTC)[reply]

Secondary to this, is the reason we can't just import the Commons script because of the required libraries? Haven't looked too closely but an edit request on Commons could help with that, yeah. ~ Amory (utc) 17:22, 22 November 2020 (UTC)[reply]
@Amorymeltzer: Special:GadgetUsage says 22,000 users have this locally enabled, I'm presuming this is for dealing with local images and has nothing to do with things that are actually on commons? If this doesn't actually do anything here, we should just remove it. I recall someone asking to have the commons version synced in which is why I transwiki'd it. — xaosflux Talk 20:54, 22 November 2020 (UTC)[reply]
Also, no idea why it has to be slow loaded via common.js instead of just making it a default hidden gadget if commons wants to force it on everyone. — xaosflux Talk 21:13, 22 November 2020 (UTC)[reply]
As below, it's useful here. Not sure what you mean by this, though; commons' commons:MediaWiki:Common.js has no power here. I only meant that, if (as I suggest) we keep this synced with Commons' version and use a loader in our gadget, there may not be a need to actually maintain it here (barring libraries); cf MediaWiki:Gadget-HotCat.js. ~ Amory (utc) 21:29, 22 November 2020 (UTC)[reply]
@Xaosflux: The copy of it here displays annotations for images both here (of which there are only a few) and images from commons. --Pokechu22 (talk) 21:02, 22 November 2020 (UTC)[reply]
Yep definitely not worth maintaining this locally when it can be loaded from commons. The performance penalty of loading the unminified code should be negligible. It looks like commons is loading it via Common.js only to avoid having to create a separate loader gadget. (Forcing it on everyone isn't the reason, because an optout option is provided). – SD0001 (talk) 11:03, 17 April 2021 (UTC)[reply]
@Xaosflux, Amorymeltzer, and SD0001: Hey, are y'all still planning on maintaining this local fork? I spent a few hours chasing a bug in one of my scripts, which turned out to be caused by MediaWiki:LAPI.js (which AFAIK is imported only by imageAnnotator) replacing String.prototype.endsWith with its own broken version. Ugh. If you want to keep this around, I'll submit a patch against the local fork. Suffusion of Yellow (talk) 22:13, 18 November 2023 (UTC)[reply]
I certainly have to plans to "maintain" this myself; I will normally work interface-protected edit requests as they come up. — xaosflux Talk 11:25, 19 November 2023 (UTC)[reply]
I put in a minimal request at MediaWiki talk:LAPI.js. Not an ideal solution, since we're diverging even more from the commons version, but that's as much as want to do. If "someone else" wants to sync this up, or try to fix the commons version, be my guest. Suffusion of Yellow (talk) 21:12, 19 November 2023 (UTC)[reply]

Interface-protected edit request on 29 December 2023

[edit]

Please remove

  ATTENTION:
  This is in the Gadget- prefix but not actually registered nor loaded as a Gadget. It is
  loaded directly by [[MediaWiki:Common.js]], raw, unminified and in the global scope.

...because that is not true (i.e. this script is a gadget). Thanks! HouseBlastertalk 04:04, 29 December 2023 (UTC)[reply]

 Done * Pppery * it has begun... 04:10, 29 December 2023 (UTC)[reply]

 You are invited to join the discussion at Template talk:ImageNote § Protection. –Novem Linguae (talk) 10:19, 29 December 2023 (UTC)[reply]