Extension talk:WikiEditor/Toolbar customization/Library

From mediawiki.org

Extended Extra Buttons Example Scripts[edit]

I would point to a script with a complete collection of buttons: User:Schnark/js/wikieditor (from de: with multi-part description). --Perhelion 20:57, 12 July 2010 (UTC)Reply


Not Loading up on the Toolbar[edit]

so I added the script into MediaWiki:Common.js and it does not seem to be loading... I have tried to flush the cache out and even tried on different machine, no luck.. Any Clue?

Best way for a gadget/user script to replace an existing button[edit]

I'm working on a toolbar button for a gadget (ProveIt). For ease of testing, I prefer that this also works as a user script. I want to replace the existing reference button with a new one. I have code to do this the simple way, by removing the old button then adding a new one (not using the below code). However, I think I ran into a race condition.

Can someone confirm whether the approach given here:

                        mw.loader.using( 'ext.wikiEditor.toolbar', function () {
                                $(document).ready( customizeToolbar );
                        } );

should work without race conditions? In the actual code, customizeToolbar would be a function that calls removeToolbar on the old button then addToToolbar on mine.

I don't know if this will behave correctly if the ready inside ext.wikiEditor.toolbar fires after mine (is this possible?). I'm not clear if ready is sure to be over when my using callback fires. I tried to dig through the loader code (particularly the parts about async and ready) but it takes getting used to. Superm401 - Talk 05:51, 20 March 2012 (UTC)Reply

I'm battling with very strange race conditions just to add a simple button. See Extension talk:WikiEditor/Toolbar customization#Unpredictable behavior due to the broken resource loader design. I consider the resource loader design broken due to this. --TMg 12:57, 27 November 2012 (UTC)Reply

Why are the "snippets" on this page not part of the Toolbar to begin with?[edit]

I wonder why these four particular snippets are external to the Toolbar rather than simply part of the extension?

To a user trying to sort through references to various files that have to be set up and customized, this doesn't make any sense.

--Bikerbudmatt (talk) 17:17, 7 September 2019 (UTC)Reply