MediaWiki talk:Common.js/Archives/2015
Please do not post any new comments on this page. This is a discussion archive first created in 2015, although the comments contained were likely posted before and after this date. See current discussion or the archives index. |
Legacy JavaScript
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. {{U|Technical 13}} (e • t • c) 16:53, 18 January 2015 (UTC)
- Would have been helpful if the bot includes a verbose list of legacy JS found in this script page :-/ --Dschwen (talk) 15:42, 19 January 2015 (UTC)
- @Dschwen: You can use jsUpdater for something like that. Helder 19:01, 19 January 2015 (UTC)
- This is awesome, Helder! Thanks. --Dschwen (talk) 21:09, 19 January 2015 (UTC)
- @Dschwen: Be aware of a difference between
importScriptURI
andmw.loader.load
, though. Helder 22:00, 19 January 2015 (UTC)
- This is awesome, Helder! Thanks. --Dschwen (talk) 21:09, 19 January 2015 (UTC)
- @Dschwen: You can use jsUpdater for something like that. Helder 19:01, 19 January 2015 (UTC)
- @Dschwen: Be careful when changing code. The old code was accessing the parent element of
div[id=preferences]
, not the element itself. Your edit changed the logic to no longer access the parent element, which can have a very different effect. I've fixed it. –Krinkletalk 00:56, 21 January 2015 (UTC)- Whoops. I should have known better, the JSConfig code is actually my stuff... --Dschwen (talk) 15:53, 21 January 2015 (UTC)
- This section was archived on a request by: Izno (talk) 03:55, 13 March 2023 (UTC)