On 22-04-2014 05:35, Justin Folvarcik wrote:
I've tried setting the callback to 'removeDuplicateLinks', removeDuplicateLinks, and I've even tried turning it into an anonymous function bound to a variable, which I then tried to pass as the callback. Am I misusing syntax, here?
I have tried finding where mw.toolbar.addButton is defined, and closest I got is .../mediawiki.action.edit.js. It does not have a callback parameter, so I'm not even sure I have the right one. I may be woefully wrong... please point me to the right source file and doc page... This is truly frustrating!
What I *suspect* you are doing wrong is... using the 'callback:' parameter. I think this is the addButton's function callback. It stands to reason that it would be executed once the addButton function has done its work.
From what I have been able to discern from the badly organized documentation (again, I may be totally misguided), is that you want to use the 'action:' parameter instead.
Regards, -- Erwin Dokter _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l