MediaWiki talk:Gadget-ajaxrecentchanges.js
Request for update edit
Please replace:
addOnloadHook(function() {
addPortletLink( 'p-tb', '/wiki/Special:BlankPage?blankspecial=ajaxrc', arc_i18n['title'], 't-ajax-rc', arc_i18n['desc'] );
});
with
$(function() {
mw.util.addPortletLink( 'p-tb', '/wiki/Special:BlankPage?blankspecial=ajaxrc', arc_i18n['title'], 't-ajax-rc', arc_i18n['desc'] );
});
to accommodate addOnloadHook deprection. Thanks! Technical 13 (talk) 17:44, 15 December 2014 (UTC)
- "Update": Please also update MediaWiki:Gadgets-definition to use
ajaxrecentchanges[ResourceLoader]|ajaxrecentchanges.js
. Technical 13 (talk) 18:04, 15 December 2014 (UTC)- Done Jackmcbarn (talk) 02:17, 17 December 2014 (UTC)
- Thank you Jack. I went looking through the code, and there are a lot of wgVariables being called that need to be wrapped in mw.config.get('wgVar') as well as another addOnloadHook I saw and a few other things that need to be done by WMF1.26 or WMF1.27. If you have some time to poke at it and fix them that would be great, otherwise I'll come back around again in a month when I re-apply for Global Interface Editor so I can fix all these things. Technical 13 (talk) 02:32, 17 December 2014 (UTC)
- Done Jackmcbarn (talk) 02:17, 17 December 2014 (UTC)
Legacy JavaScript edit
Hello! This script has been detected as using deprecated parameters that need to be replaced with the updated version. Examples include addOnloadHook()
needs to be replaced with $()
; all wgGlobalVariables need to be properly gotten with mw.config.get( 'wgGlobalVariable' )
; and addPortletLink
needs to be called with mw.util.addPortletLink
. Please see MW:ResourceLoader/Legacy JavaScript for details. Thank you. Technical 13 (talk) 18:12, 18 January 2015 (UTC)
- Was fixed a while ago. * Pppery * it has begun 16:48, 16 September 2023 (UTC)
ajaxRcFormNamespacesCB is not defined edit
This gadget seems to create a link to https://www.mediawiki.org/wiki/Special:BlankPage?blankspecial=ajaxrc which throws a JavaScript error when I visit it. The global is not defined anywhere. I suspect you need to register ajaxRcFormNamespacesCB on window.ajaxRcFormNamespacesCB Jdlrobson (talk) 20:45, 23 June 2020 (UTC)