Last modified: 2012-03-19 09:09:06 UTC
Currently ext.narayam.core loads after wiki level javascripts. So local customization/hacks are not possible. Confirmed that Mediawiki:Common.js is loading before ext.narayam.core.
That's not how resource loader works. You need to specify you want to have something loaded before you start altering it.
mw.loader.using('ext.narayam.core', function () { /* customization here */ }); the above will work anywhere anytime, including in Mediawiki:Common.js
Thanks Krinkle, it helped
(In reply to comment #3) > Thanks Krinkle, it helped You're welcome. I found this (small) section on the Narayam extension documentation page: https://www.mediawiki.org/wiki/Extension:Narayam#User_level_customization Perhaps you can improve it based on the customizations you have've created.
(In reply to comment #2) > mw.loader.using('ext.narayam.core', function () { > > /* customization here */ > > }); > > the above will work anywhere anytime, including in Mediawiki:Common.js I tried various ways to make this work at http://sa.wikipedia.org/wiki/%E0%A4%AF%E0%A5%8B%E0%A4%9C%E0%A4%95%E0%A4%83:Siddhartha_Ghai/vector.js but couldn't get it to work. The unshift method as described at the documentation works when using the console but doesn't work as part of the userscript. Gives the error described at http://www.mediawiki.org/wiki/Extension_talk:Narayam#Formalization_of_rules Hope a way to do this can be found soon.
(In reply to comment #5) > I tried various ways to make this work at > http://sa.wikipedia.org/wiki/%E0%A4%AF%E0%A5%8B%E0%A4%9C%E0%A4%95%E0%A4%83:Siddhartha_Ghai/vector.js > but couldn't get it to work. I made it working and here is the code http://pastebin.com/defjdVU9 See the differences from your code. Also updated the documentation at http://www.mediawiki.org/wiki/Extension:Narayam#User_level_customization