Wikipedia talk:User scripts
Wikipedia Help NA‑class Low‑importance | ||||||||||
|
JavaScript NA‑class | |||||||
|
This page has archives. Sections older than 90 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
See here for a complete list of archives and other subpages from the deprecated WikiProject User scripts. |
Reusing this data in Toolhub
I have built a tool that parses the wikitext of Wikipedia:User scripts and generates a toolinfo.json document which can be used by Toolhub, Hay's Directory, and other toolinfo consumers. As a result, there are now almost 600 user scripts newly documented by the Toolhub demo server.
Thank you to Nardog for Template:User script table row and to everyone else who has used it to document their scripts at Wikipedia:User scripts/List. --BDavis (WMF) (talk) 15:47, 23 August 2021 (UTC)
Edit summary
Hi, my script (a simple fork of Writ Keeper's) doesn't seem to add an edit summary when editing pages, though it does when creating them (see here). ― Qwerfjkltalk 19:43, 1 September 2021 (UTC)
- @Qwerfjkl Hi. First of all, you may use beautifier.io (or other code beautifiers found by a google search) to beautify your code and make it more readable.
- I'm not an expert, but as i can see on mw:API:Edit, when you set
section
parameter together withsummary
parameter (as you did in requestData2 variable), the value passed tosummary
will be used as the section title (as seen in the diff you provided). you can useappendtext
instead and provide some text strings as its value. something likeappendtext" sectionTitle + [a variable containing the Talkback template and its parameter values]
is a good value for this parameter. So you have to replacesection: 'new'
withappendtext: talkBackMessage
wheretalkBackMessage
is what is going to be appended to the bottom of the user's talk page. As i am not a Javascript expert (just a fan, coding for fun), test it and let me know if it works. Jeeputer (talk) 11:00, 24 September 2021 (UTC)- I think that worked. ― Qwerfjkltalk 12:14, 26 September 2021 (UTC)
- @Qwerfjkl: Glad to hear that. :) Jeeputer (talk) 12:42, 26 September 2021 (UTC)
- I think that worked. ― Qwerfjkltalk 12:14, 26 September 2021 (UTC)
Documentation update
Hi. Looks like Wikipedia:User_scripts#How_do_you_add_new_scripts_to_the_scripts_list? needs to be updated based on the new list layout. Jeeputer (talk) 11:07, 24 September 2021 (UTC)
- Done. Thanks for noting this. Nardog (talk) 23:38, 26 September 2021 (UTC)
Should we recommend script-installer?
Right now all the installation instructions use the manual method. script-installer is pretty simple, though... maybe we should just point people towards that? Enterprisey (talk!) 06:42, 28 September 2021 (UTC)
- Yes. – SD0001 (talk) 11:32, 28 September 2021 (UTC)
- I've thought about removing the installation instructions from the list altogether. As much as I do prefer the new layout, the instructions stick out like a sore thumb (as did they in the old layout). While we're at it, I wish script-installer didn't rely on IDs (see User talk:Enterprisey/script-installer#id vs data-). Nardog (talk) 12:16, 28 September 2021 (UTC)
- Yes those "How to install" links are atrocious. It's better to generalize the installation instructions, rather than include it for every script. – SD0001 (talk) 15:46, 28 September 2021 (UTC)
- Absolutely. There's no reason for people to be mucking about editing js files by hand. The more standardized and automated you can make this, the better. -- RoySmith (talk) 16:04, 28 September 2021 (UTC)
- Yes those "How to install" links are atrocious. It's better to generalize the installation instructions, rather than include it for every script. – SD0001 (talk) 15:46, 28 September 2021 (UTC)
- @Enterprisey @Nardog @RoySmith @SD0001 I think script installer can been run from the documentation page with a link like https://en.wikipedia.org/wiki/Wikipedia_talk:User_scripts.js?withJS=MediaWiki:Gadget-script-installer.js[1], which doesn't require script installer to be installed. ― Qwerfjkltalk 18:33, 28 September 2021 (UTC)
- Very true; I think recommending that people actually install script-installer would still be helpful, because of course it allows them to easily uninstall and otherwise manage the scripts. Enterprisey (talk!) 07:24, 29 September 2021 (UTC)
References
- ^ The actual link is
https://en.wikipedia.org/wiki/{{FULLPAGENAMEE}}.js?withJS=MediaWiki:Gadget-script-installer.js
Done. Nardog (talk) 00:47, 29 September 2021 (UTC)
Should we remove the "total" or "active" column?
I don't think we need two columns saying how many people have this installed. Maybe we only need the "active" one? Enterprisey (talk!) 00:27, 30 September 2021 (UTC)
"Same as the above" style descriptions are not ideal
There are a number of descriptions written with some variation of "same as the above" / "see above" / "like the above" which presumes that the linear list organization of the current page is static (or at least consistently ordered) and that records will not be copied individually to other locations. The introduction of the toolinfo.json scraper for this data breaks that assumption. I would like to suggest that folks update their descriptions to be somehow less dependent on reading order. Each case will of course be slightly different, but one typical solution could be to replace the "above" mentions in descriptions with the names of the scripts being extended or adapted to new use cases. --BDavis (WMF) (talk) 17:36, 8 November 2021 (UTC)