User talk:Plastikspork/massmove.js

From WikiProjectMed
Jump to navigation Jump to search

@Plastikspork: There were some changes to skins and things over the summer, and apparently, bodyContent no longer works for modern. You can see what I did here and here to make things a little more explicit and cover the bases, figured you'd want to do the same here. There are two instances. Also, you've got a couple uses near the end where you're using the deprecated bare global variables rather than mw.config.get or what you've already stored in config. I can clean this up if you'd prefer! ~ Amory (utc) 16:04, 4 February 2021 (UTC)[reply]

@Amorymeltzer: yes, please go ahead and fix it for me! Thanks again for all your help! Plastikspork ―Œ(talk) 16:13, 4 February 2021 (UTC)[reply]
 Done ~ Amory (utc) 17:50, 4 February 2021 (UTC)[reply]

Page name check

@Plastikspork The conditional

if(mw.config.get('wgNamespaceNumber') === -1 
		&& (mw.config.get('wgPageName') === "Special:Massmove" || 
		mw.config.get('wgPageName') === "Special:MassMove" ||
		mw.config.get('wgPageName') === "Especial:Massmove" ||
		mw.config.get('wgPageName') === "Especial:MassMove")
	)

looks quite artifical to me. I'm not sure why you would check for the namespace number if that is contained in the page name already, but as you seem to have attempted an internationalisation for one language already, I recommend using the following, which will be independent of the language the namespace prefix is in:

if(mw.config.get('wgNamespaceNumber') === -1 
		&& (mw.config.get('wgTitle') === "Massmove" || 
		mw.config.get('wgTitle') === "MassMove")
	)

~~~~
User:1234qwer1234qwer4 (talk)
16:39, 19 September 2021 (UTC)[reply]

Thanks! I have been requesting a change like this for a number of the "mass" tools, as this helps using the scripts globally. ~~~~
User:1234qwer1234qwer4 (talk)
17:16, 19 September 2021 (UTC)[reply]