Template talk:Userscript

Comments by Mr. Great Cow
This needs to be permanently protected. 18:12, 20 November 2015 (UTC)

Special:MyPage/skin.js?
any reason not to use Special:MyPage/skin.js instead? &#32; Headbomb {t · c · p · b} 04:18, 2 May 2019 (UTC)
 * what do you mean? Instead of common.js? Usually, user scripts are installed in common.js so that they are accessible from all skins. --DannyS712 (talk) 04:22, 2 May 2019 (UTC)
 * Yeah. I suppose it's a bit weird for me to use put my stuff in User:Headbomb/monobook.js instead of User:Headbomb/common.js? &#32; Headbomb {t · c · p · b} 04:25, 2 May 2019 (UTC)
 * yeah, generally. What specifically are you asking? --DannyS712 (talk) 04:26, 2 May 2019 (UTC)
 * I just thought it would be a better/more reliable target since it would direct people to the actual skin they used. I didn't know common.js was meant to affect all skins. &#32; Headbomb {t · c · p · b} 04:28, 2 May 2019 (UTC)
 * Well, you learn something new every day :) --DannyS712 (talk) 04:34, 2 May 2019 (UTC)

Global installation
It would be useful to have a setting to allow the installation to happen over at meta:Special:MyPage/global.js instead. ~ ★ nmaia d 01:10, 15 August 2020 (UTC)

Extra pipe character for ifeq
@Nardog Hi. I'm updating the corresponding template on another wiki and i need help to understand something. I made a more readable copy of the code at Template:Userscript/sandbox2 so i can explain the problem i saw: At the "generation of ref tag" part, the "tag" function is closed at line 13 and the second "ifeq" function closed at line 14. The first "ifeq" should be closed at 15 but there's an extra pipe at 15 and the function is closed at 16 instead. As the first "ifeq" has both results defined at 9 and 10, the extra pipe should be for "if", and lines 15 and 16 can be swapped. Am i right?

It makes no difference (tested here), but i am confused how it works here on enwiki and doesn't hide the ref as it does on fawiki! can you please help me? Jeeputer (talk) 07:44, 25 May 2021 (UTC)
 * You're right. I'm not sure if we need all the  that appear right before   though. The third parameter in   or   and the fourth in   are completely optional, so I would just remove line 15 rather than swap it. Nardog (talk) 08:03, 25 May 2021 (UTC)
 * Thank you. :) —Jeeputer (talk) 08:25, 25 May 2021 (UTC)

Template returns the string "no"
@SD0001 that added  to the template seems to be outputting the literal string "no" when no value is provided for noref. For example  produces. – Brandon XLF  (talk) 23:16, 14 January 2022 (UTC)


 * @BrandonXLF I've undone those changes for now. Yesno usage looks more complicated that I thought. BTW while you're here, can you address the minor issues in the namespace-specific gadgets patch? It's likely to be merged as soon as the issues are fixed, as there's been a lot of activity with this extension of late. – SD0001  (talk) 08:11, 15 January 2022 (UTC)
 * Sure, I've addressed the issues in the patch. I meant to do that earlier, but other things got in the way. – Brandon XLF  (talk) 08:52, 15 January 2022 (UTC)

Template-protected edit request on 26 March 2024
"Click here" links are bad for accessibility (see Links section of MOS:Accessibility and Mystery meat navigation. 2NumForIce  (speak  &#124; edits) 01:02, 27 March 2024 (UTC)
 * ✅ I've also changed the link to point to Special:EditPage/Special:MyPage/common.js, which is the equivalent link. SWinxy (talk) 04:36, 27 March 2024 (UTC)