Last modified: 2014-11-17 10:35:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T28328, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26328 - Add JS callback for diff page content load for use by gadgets
Add JS callback for diff page content load for use by gadgets
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
FlaggedRevs (Other open bugs)
unspecified
All All
: High enhancement with 1 vote (vote)
: ---
Assigned To: Priyanka Dhanda
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-13 21:56 UTC by Rob Lanphier
Modified: 2014-11-17 10:35 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Rob Lanphier 2010-12-13 21:56:21 UTC
In bug 26175, there was a suggestion to provide some sort of onContentLoad callback for use by gadgets, so that the gadget code can execute after the diff page loads.
Comment 1 Bergi 2010-12-14 20:01:17 UTC
I pondered about it, and came to the conclusion that it should not just be an onLoad-, but also an onChange-Event. For example, when I have changed some links I may inform other scripts (like popups) about the change.
Most of these may be new content, changed and/or rendered by the API, but it has not to.
We even could go so far providing these "event-Listeners" as new Hooks for the page load, so that scripts won't have to register twice.
In my opinion, we should pass some arguments to the trigger:
* distinguish between content and userinterface (sidebar, header). What about interwiki and categories?
* selectors for the loaded elements, e.g. an id
* identificator for the script and its function
Other scripts can handle the events and react specific to the passed data.
Comment 2 Rob Lanphier 2010-12-14 20:32:43 UTC
Feel free to file a separate issue with your feature request, but please don't expand the scope of this issue.  Thanks.
Comment 3 Priyanka Dhanda 2010-12-15 01:24:43 UTC
RobLa, Do you have an example of a gadget that was affected by bug 26175?
Comment 4 Rob Lanphier 2010-12-15 01:42:22 UTC
(In reply to comment #3)
> RobLa, Do you have an example of a gadget that was affected by bug 26175?

I don't.  Perhaps Andreas (andber93@web.de) does?
Comment 5 Bergi 2010-12-15 13:42:22 UTC
(In reply to comment #3)
Sorry, I thougt this bug was for a more general request.

(In reply to comment #3)
> Do you have an example of a gadget that was affected by bug 26175?
Oh, everything that wants to change the page view or add eventListeners to the page content. And thats a lot:
* Moving the [Edit]-Links right to the Headings (from monobook.js, common.js)
* The to-top-link-gadget has the same problem
* [[de:MediaWiki:Gadget-Einleitung-bearbeiten.js]] fails when there are no [edit]-links
* [[de:MediaWiki:Gadget-bkl-check.js]] has no links to analyze
* Lupin's popups can add event listeners only to links it knows about
* Wikiminiatlas sees no coordinate-links it can add a map to
...
In the official [[de:MediaWiki:Gadgets-definition]]-list also markadmins, screenreader-optimzing, ß -> ss (swiss spelling) and the timezone-converter are harmed.
Not listing any userscripts which have the problem, too.
Comment 6 Aaron Schulz 2011-05-23 14:13:42 UTC
Moot since r88639.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links