Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Wikipedia:User scripts/Requests

From Wikipedia, the free encyclopedia
<Wikipedia:User scripts
icon
User script requests

Post your user script-related request or idea for a new user script (or gadget) as a new section below. Discussion in each section is encouraged. Note that most gadgets started out as mere user scripts. This page is intended for new user scripts, which affect the appearance of the site and may add additional functionality. Fully automated bots should be requested atWikipedia:Bot requests instead.

All user script-related requests are welcome, whether they are for assistance writing an existing user script, desire for a new user script that does what you want, etc. Ideas for new user scripts are welcome too!

Before you request a script, please make sure it does notalready exist. For a list of user scripts, seethis list.

If you have been helped, pleaselet us know, so that we may archive the request.


More links to related pages
General
technical help
Special
page
-related
Wikitext
Links anddiffs
Media files: images,
videos and sounds
Other graphics
Templates and
Lua modules
Data structure
HTML andCSS
Customisation
and tools
Automated editing
Archives
Archive 1Archive 2Archive 3
Archive 4Archive 5Archive 6
Archive 7Archive 8Archive 9
Archive 10


This page has archives. Topics inactive for250 days are automatically archived1 or more at a time byLowercase sigmabot III if there are more than4.

Script for awardingWP:Four Awards

[edit]

Wikipedia:Four Awards are really nice to receive, but unbearably tedious to award, as the record-keeping involves carefully noting dates, adding them to a really annoying table in a very annoying format, and doing other miscellanous tweaks. @Novem Linguae was kind enough to walk me through creating a design document for the concept -User:Premeditated Chaos/4A script idea. They're not free for a few months, but suggested I post it here in case anyone is interested in taking a whack at it. Thank you to anyone who looks, and feel free to edit that document or add questions on the talk page. ♠PMC(talk)06:25, 11 December 2024 (UTC)[reply]

Won't all this focus on content distract us from our real goal: bickering and infighting?Polygnotus (talk)10:12, 12 December 2024 (UTC)[reply]
I could propose a script to automate that, so we could fit both in? ♠PMC(talk)12:16, 12 December 2024 (UTC)[reply]
Howdare you suggest a reasonable comprimise! That is not what we do here!Polygnotus (talk)12:57, 12 December 2024 (UTC)[reply]
I'm Canadian! It's instinctive! I'm sorry! ♠PMC(talk)13:55, 12 December 2024 (UTC)[reply]
I don't know if it will help, but{{GOCE award}} greatly simplified award delivery for the Guild of Copy Editors. The copy/paste samples are especially helpful. –Jonesey95 (talk)17:33, 12 December 2024 (UTC)[reply]
It's really the adding to the Records table with all the fiddly templates and dates that's the annoying part, which I'm not sure that template can really help with. ♠PMC(talk)01:00, 13 December 2024 (UTC)[reply]
Please link to an example edit. –Jonesey95 (talk)02:14, 14 December 2024 (UTC)[reply]
There are diffs for each step in the script idea that I linked. ♠PMC(talk)04:55, 14 December 2024 (UTC)[reply]
@Premeditated Chaos: Rather late to the party, but I've also run into this friction when handing out 4As. I think a feasible solution that wouldn't need a script would be to change the template used to create new nominations. The work of finding the dates for the promotions could be passed to the nominator (which is honestly not that much hunting if it's only for one article), who would enter them into template parameters. The template could then spit out blocks of wikitext (for example, the table markup needed for the records page). This wouldn't automate the entire process, but would take away most of the pain points for regular award distributors. What do we think?TechnoSquirrel69(sigh)03:46, 20 August 2025 (UTC)[reply]
I'm not opposed to anything that will make it less annoying, although I have roughly the technical capability of a potato (this may be insulting to the worthy potato), so I am not remotely qualified to try to do it. ♠PMC(talk)22:27, 20 August 2025 (UTC)[reply]
Despite the username, I'm no technical wizard either, but I've been working on my template markup recently, so let's see if I can't finagle something together. The best solution would still be a script, of course.TechnoSquirrel69(sigh)04:33, 22 August 2025 (UTC)[reply]

User:BilledMammal/MovePlus.js andUser:Frost/moveplus.js

[edit]

@Nurginformed me of an error which affects both the version of Move+ created by @BilledMammal and @Polygnotus's fork (hosted in @Frost's userspace).
When using the 'Notify WikiProjects' function, and when notifying WikiProject New Zealand, an error occurs when a comment is left in the move discussion. Move+ leaves the code[[Wikipedia:New Zealand Wikipedians' notice board|ealand Wikipedians' notice board]], effectively removing the "New Z" from "New Zealand" in the comment.
SeeSpecial:Diff/1285364289 for BilledMammal's version making the error andSpecial:Diff/1285372599 for Polygotus's version making the error.Is anyone able to fix the error and take on maintaining the script as BilledMammal hasn't edited in a number of months since the outcome ofWP:ARBPIA5.
Ps, if someone does take it on, forking from BilledMammal's version would be in my opinion preferable, as that version doesn't add pages to the watchlist.TarnishedPathtalk10:38, 13 April 2025 (UTC)[reply]

@TarnishedPath: The difference betweenUser:BilledMammal/Move+ andUser:Frost/moveplus.js is that I added 4 lines of code to watchlist the relevant pages upon Frost's request.
TryUser:Polygnotus/Scripts/Tarnished.js.Polygnotus (talk)10:50, 13 April 2025 (UTC)[reply]
@Polygnotus perSpecial:Diff/1285377884 that seems to have done the trick.TarnishedPathtalk10:56, 13 April 2025 (UTC)[reply]
@TarnishedPath I addedconst WATCHLISTPAGES = false; to the top. If you set it to true it watchlists pages. The original script just strips 15 characters which assumes the prefix is "Wikipedia talk:".Polygnotus (talk)11:02, 13 April 2025 (UTC)[reply]
Mate I haven't coded in almost 20 years, when I was at university. It's all Greek to me.TarnishedPathtalk11:06, 13 April 2025 (UTC)[reply]
If@Frost: updates their copy of the script they should setconst WATCHLISTPAGES to true and then it will watchlist the pages for them.Polygnotus (talk)11:10, 13 April 2025 (UTC)[reply]
I don't want that feature anymore. Is it okay if I import User:Polygnotus/Scripts/Tarnished.js directly?Frost11:15, 13 April 2025 (UTC)[reply]
@Frost Yup.Polygnotus (talk)11:16, 13 April 2025 (UTC)[reply]
Yep, I found that feature was crowding out my watchlist at a rapid rate.
Bigger question though, is anyone able to maintain this script? I've made a copy in my userspace, but it really needs a maintainer.
Pinging @Aaron Liu, @JJPMaster and @TheTechie from discussions above.TarnishedPathtalk11:20, 13 April 2025 (UTC)[reply]
BilledMammal wrote:I hope to return later this year or early 2026 so hopefully they will be back soon. Which means that being a maintainer will not be a commitment for the rest of your life.Polygnotus (talk)11:39, 13 April 2025 (UTC)[reply]
@Polygnotus, I don't know if you're able to help or not, but the last couple of days the script has been providing me an error ("Failed. Please implement manually and report this error to the script maintainer.") whenever I've been attempting to perform moves or post toWP:RM/TR requesting a technical move. The version I've been operating off is atUser:TarnishedPath/MovePlus.js.TarnishedPathtalk04:33, 21 July 2025 (UTC)[reply]
@TarnishedPath That error can be caused by a bunch of different things, including things outside of the control of the script itself like connection issues, so if the error is reproducable and you wanna investigate it then you need far more information. It sucks that@BilledMammal: isn't here. You may be able to convince someone to become a script maintainer. You could askSohom Datta (talk ·contribs) andNovem Linguae (talk ·contribs); they are geniuses and unlike me they actually like JavaScript.Polygnotus (talk)00:15, 22 July 2025 (UTC)[reply]
I don't think I have time to debug this or maintain this, but a good first step might be to fork it, and then put a more detailed error message. For example, changingprogressBox.textContent = 'Failed. Please implement manually and report this error to the script maintainer.'; toprogressBox.textContent = 'Failed. Please implement manually and report this error to the script maintainer. ' + error; (or similar). Then report back here with the more detailed error message and a steps to reproduce. –Novem Linguae(talk)02:42, 22 July 2025 (UTC)[reply]
The error comes when closing a discussion and then implementing a move or requesting a technical move. I've updated the code as you suggest and when I next attempt to close a discussion I'll provide further detail.TarnishedPathtalk03:37, 22 July 2025 (UTC)[reply]
@Novem Linguae, I just performed a close atSpecial:Diff/1301873019. During the process I attempted to submit a technical request (I'm not a page mover) and the following error came up

Error message: Failed. Please implement manually and report this error to the script maintainer. TypeError: invalid assignment to const 'config'

I've noticed another editor submitting a technical request atWP:RM/TR, so I'm thinking this may be a conflict with other scripts I have installed. To make sure it wasn't my version, I unstalled it and installed BilledMammal's and I got the same error without the type error bit.
I then tried to move the page outside of closing the discussion using the following steps, which failed:
  1. Open Move+
  2. Specify target
  3. Add move reason
  4. Select “Submit”
  5. Select “Submit technical request”
  6. Error message:Failed. Please implement manually and report this error to the script maintainer. TypeError: invalid assignment to const 'config'
TarnishedPathtalk05:27, 22 July 2025 (UTC)[reply]
Ps, I've manually submitted the request for the page move atWP:RM/TRTarnishedPathtalk05:27, 22 July 2025 (UTC)[reply]
@TarnishedPath TryUser:Polygnotus/tmp/whatevenisjavascript.js, please copy it to your userspace.Polygnotus (talk)05:50, 22 July 2025 (UTC)[reply]
I'll let you know if that has fixed it soon.TarnishedPathtalk05:59, 22 July 2025 (UTC)[reply]
@TarnishedPath: This seems like it's caused by trying to assign a value to a global constant `config` created by another script you import:User:Qwerfjkl/scripts/massXFD.js. Making this change toUser:TarnishedPath/MovePlus.js should fix the error:
function addButton(container, curr, dest, type, admin = false) {let operation;
+
function addButton(container, curr, dest, type, admin = false) {letconfig;letoperation;
Also, you need to revert the recent attempt at fix:Special:Diff/1301880481 which only partially fixes it. Regards, —DVRTed (Talk)06:19, 22 July 2025 (UTC)[reply]
@DVRTed, thanks for that. I'll give the script a go moving something in my userspace.TarnishedPathtalk06:27, 22 July 2025 (UTC)[reply]
@DVRTed, the error is fixed. I just used Move+ to perform a move atSpecial:Diff/1301884871. Thanks for your help.TarnishedPathtalk06:29, 22 July 2025 (UTC)[reply]
Nice catch. I've also requested that massXFD.js make a small code change to hopefully prevent this kind of interaction in the future. SeeUser talk:Qwerfjkl/scripts/massXFD.js#Wrap in IIFE?. –Novem Linguae(talk)09:22, 22 July 2025 (UTC)[reply]
Ps, I've just noticed your DuplicateReferences script. Looks handy.TarnishedPathtalk11:09, 13 April 2025 (UTC)[reply]
Yeah its great for lazy people like myself. When you have many references in an article it becomes near impossible to figure out which are duplicates without a script to help you.Polygnotus (talk)11:10, 13 April 2025 (UTC)[reply]
Pinging @DVRTed, @Novem Linguae and @Polygnotus. A while ago @Robertsky reported that the BilledMammal's script is removing{{not a vote}} on closure, which would mean that theversion I'm hosting would likely do the same. Does anyone have any advice on what changes would need to be made to stop it doing that?.TarnishedPathtalk23:09, 18 October 2025 (UTC)[reply]
@TarnishedPath:User:TarnishedPath/MovePlus.js#L-802: Change the line 802 to
text = text.replace(/{{[Rr]equested move\/dated\|.*\n?[^\[{]*}}/, "{{subst:RM top|'''" + result + ".'''" + closingComment + userGroupText +"}}");
so it stops matching and consuming content as part of the header when it encounters a '{'—previously it only stopped at the first '['. I briefly skimmed through the script, and this change shouldn't cause any issues. If you want to test and/or play around with the regex yourself:https://regex101.com/r/FbRt0F/1. —DVRTed (Talk)23:59, 18 October 2025 (UTC)[reply]
@DVRTed cheers.TarnishedPathtalk05:19, 19 October 2025 (UTC)[reply]

Reflist Warning

[edit]

Hello, I'm an NPP reviewer and I notice that some pages have been sneaky and have no{{reflist}} and<reference/> in the reference section. So, May I request a script where there will be warning either in the Page Curation Tool or in the top if a page does not have{{reflist}} or<reference/> in them. ThanksWarm Regards,Miminity (Talk?) (me contribs)08:13, 16 April 2025 (UTC)[reply]

Hi, sorry no one got to your request in so long but I made a user script to show an alert if that is the case. It is atUser:Macaw*/noRefListAlert.jsMacaw*13:07, 5 May 2025 (UTC)[reply]
Thank you so muchWarm Regards,Miminity (Talk?) (me contribs)13:11, 5 May 2025 (UTC)[reply]
@Macaw*: I tested some of there is something I would like to change (maybe a bug). It shows up even when I'm just editing a section of a page, on redirect page and deleted pages. Much appreciated your work!!Warm Regards,Miminity (Talk?) (me contribs)13:22, 5 May 2025 (UTC)[reply]
Fixed! if you have any other tweaks you would like me to make just let me know.Macaw*14:11, 5 May 2025 (UTC)[reply]
@Macaw*: Now it no longer detects pages without reflist. 😅. SeeBattle of Multan (1475)Warm Regards,Miminity (Talk?) (me contribs)14:27, 5 May 2025 (UTC)[reply]
OK I’ve fixed that. Sorry about that issue.Macaw*14:32, 5 May 2025 (UTC)[reply]
@Miminity: TheAutomatic Referencing Assistant will, along with many other referencing errors,in edit mode detect a missing{{reflist}} and insert one with a simple click.SamSailor14:21, 18 June 2025 (UTC)[reply]

Title Case Convertor

[edit]

OK this is not real. But at the very least we need a user tool for selective citation (not all citations) conversion that doesn't require a lot of copy pasting and navigation. Countless times I have googled"Title Case Converter", copy paste a string, press a button, marvel at result, copy paste a string. This should be easier. If you write the actual conversion function with AI it will get the edge cases, such as dealing with : and other things, and generate a suite of test cases.

There is also 'Sentence case converter'. --GreenC06:54, 1 May 2025 (UTC)[reply]

WP:WIKED has a case conversion feature. ~Kvng (talk)12:52, 5 May 2025 (UTC)[reply]
There'sUser:ZKang123/TitleCaseConverter listed atWP:US/L for just title case but not sentence case.Aaron Liu (talk)17:03, 31 July 2025 (UTC)[reply]

Request: Button or link to fix double redirects at creation

[edit]

Copied fromWikipedia:Village pump (technical)#Gadget request: Button or link to fix double redirects at creation:

When you attempt to create a double redirect you are shown a warning that includes a suggested fix (i.e. ifFoo is a redirect toBar and you attempt to create a redirect to Foo, MediaWiki shows a warning recommending you change the target of your new redirect to beBar).In response toWikipedia:Village pump (proposals)#Double redirect creation I openedphab:T393825 requesting a link or button to automatically implement the suggested fix. Comments on that task by the developer who implemented the warning suggest that this might be complex to implement as part of MediaWiki but that "This could definitely be implemented on-wiki via a JavaScript gadget though."Thryduulf (talk)11:48, 13 May 2025 (UTC)

WP:GADGET#Proposals directed me to VPT, butBugghost commented there directing me here. I have no idea which is the better location for this, but to keep comments in one location please pick one and close the other with a pointer.Thryduulf (talk)22:44, 14 May 2025 (UTC)[reply]

Many redirect user scripts such asUser:Eejit43/scripts/redirect-helper include this feature.Aaron Liu (talk)17:04, 31 July 2025 (UTC)[reply]

Script that automatically displays a floating template:ref info

[edit]

Currently, you need to preview{{Ref info|style=float:right}} on the article, or place{{Ref info|style=float:right}} on the article's talk page, to gain any insight and display the citation statistics, e.g. forquark

reference info forQuark
unnamed refs69
named refs35
self closed18
Refn templates1
cs1 refs118
cs1 templates115
use xxx datesdmy
cs1|2 dmy dates5
cs1|2 dmy access dates3
cs1|2 ymd access dates18
cs1|2 dmy archive dates2
cs1|2 ymd archive dates3
cs1|2 author106
List of cs1 templates

  • cite arXiv (1)
  • cite book (59)
  • cite encyclopedia (4)
  • cite journal (33)
  • cite news (1)
  • cite press release (1)
  • cite report (1)
  • cite web (15)
explanations

I'd like a script that automatically displays it on all articles/drafts (perhaps with a toggle to hide it / enable it on other namespaces). Or, more likely, a customizable default that can be toggled in-article.Headbomb {t ·c ·p ·b}09:30, 21 May 2025 (UTC)[reply]

@Headbomb: I didn’t make it show up floating on pages by default because I wasn’t sure where to place it; so, instead, it shows up as a dialog popup when you click the "show ref info" option. LMK if this is sort of what you wanted:User:DVRTed/refInfo.js. Regards, —DVRTed (Talk)16:12, 27 June 2025 (UTC)[reply]
No, that works!Headbomb {t ·c ·p ·b}16:59, 27 June 2025 (UTC)[reply]
@David Eppstein,Trappist the monk,SandyGeorgia, andAManWithNoPlan: you might be interested in this script.Headbomb {t ·c ·p ·b}16:59, 27 June 2025 (UTC)[reply]
Thx!SandyGeorgia (Talk)23:38, 27 June 2025 (UTC)[reply]

Random page without short description

[edit]

Hello! Looking for a script that lets me press the keys <Control>+<Shift>+<R> to go to a random page without a short description of any type including auto created ones from templates like info boxes or from the short description template.Best wishes,Macaw*!16:30, 28 May 2025 (UTC)[reply]

@Macaw* It's pretty straightforward to make such a script (using the search results from-hastemplate:"Short description"), but I don't think there's an easy way to filter out pages with auto-generated short descriptions. @ me if that'd work for you. —DVRTed (Talk)20:05, 24 June 2025 (UTC)[reply]
Could it exclude all pages that transclude templates inCategory:Templates that generate short descriptions, perhaps? I'm not sure how technically complicated that would be. Alternatively, manually excluding the top few templates atWikipedia:WikiProject_Short_descriptions#Auto-generated_and_bot-generated_descriptions would go a long way.Rusalkii (talk)20:10, 24 June 2025 (UTC)[reply]
I see those templates that auto-generate short descriptions use{{Has short description}} to check if an article has a short description, and sometimes just{{Short description}}. If we filter both of them out, it seems like we get what we're looking for; i.e.-hastemplate:"Has short description" -hastemplate:"Short description". There might be some edge cases, but I've yet to find any. —DVRTed (Talk)20:57, 24 June 2025 (UTC)[reply]

Convenient Links

[edit]

The only part of Convenient Discussions that I found to be very useful was the ability to get all sorts of links to a comment on the Talk page. You could get a permanent link, special link, a link within that discussion, I think there were six different kinds of links one could get for a single comment. Is there a script that adds that kind of button to comments on the vanilla Wikipedia interface? Just that and nothing else.TurboSuperA+(connect)11:06, 11 July 2025 (UTC)[reply]

DiscussionTools gives a URL link if you click on the person's signature. Also, there's multiple user scripts for getting heading links. Not perfect, but those may be some workarounds. Feel free to check over the list atWP:US/L if you think it might exist already. –Novem Linguae(talk)11:38, 11 July 2025 (UTC)[reply]
You mean link to the person's user page? I know you can get a link to the comment by clicking on the date. What I'm looking for is the same feature as Convenient Discussions has when you get links to a particular comment.
Feel free to check over the list at WP:US/L if you think it might exist already.
I tried searching for a userscript regarding comments and linking, but I couldn't find it.TurboSuperA+(connect)12:43, 11 July 2025 (UTC)[reply]
You mean link to the person's user page? All the items I mentioned are same page links. To elaborate on "user scripts for getting heading links", I useUser:andrybak/Scripts/copy-section-link.js. Which puts a little paragraph symbol next to each heading when you hover over a certain spot. When you click on it, it displays a little panel with a couple of useful section links. –Novem Linguae(talk)12:51, 11 July 2025 (UTC)[reply]
That script is to headings, but I'm looking for a script that fetches the oldid of a single comment.TurboSuperA+(connect)13:09, 11 July 2025 (UTC)[reply]
Anything that does that would need to index all comments, so the only scripts that do that would be heavy discussions scripts like CD as it would be wasteful to not e.g. add replying features when you have an index of all comments. Is there a reason you can't stand CD's additional features?Aaron Liu (talk)14:36, 11 July 2025 (UTC)[reply]
It messes up replies. It inserts various Wiki and HTML tags that I didn't request. I think that's the biggest problem, it doing things it wasn't asked to do. I prefer just writing it myself. I didn't use any of CD's features except the various links to a post.TurboSuperA+[talk]17:33, 31 July 2025 (UTC)[reply]

Single point contribs page for all users in a sockpuppet category

[edit]

There's a sockpuppet that doesnot target the same article again and again, instead they choose different articles but the vandalism type is similar. I also suspect that they may have a history of frivolous AFDs, but that is difficult to check for each sock one-by-one. A single contribs page listing edits of all these socks, filterable by namespace, "show only page creations", etc. will be pretty helpful in checking this. Thanks!CX Zoom[he/him](let's talk • {CX})15:37, 13 July 2025 (UTC)[reply]

@CX Zoom:Coding...on the testwiki. Just to make sure, when you sayall users in a sockpuppet category do you mean users inside theSuspected sockpuppets section on "Wikipedia:Sockpuppet investigations/X" or do you mean the actual categories i.e., "Category:Wikipedia sockpuppets ofX"? Considering there are ~thousands of users on those categories, I don't think the latter would be feasible. Also, LMK if you'd like to test the work-in-progress script. —DVRTed (Talk)20:01, 13 July 2025 (UTC)[reply]
I think categories are more exhaustive, so nothing will slip through. But if it is too unwieldy, we could select/deselect some 10 or 20 socks at a time from the category and compare them. Otherwise, comparing just those mentioned at the main SPI page may also work. And, sure, I'd like to test it.CX Zoom[he/him](let's talk • {CX})23:33, 13 July 2025 (UTC)[reply]
@CX Zoom: Selecting multiple users from category pages sounds OK, but I'll think about it some more. You can install the script:User:DVRTed/multiContribs.js. Visit any SPI page and you should see "Tools:multiContribs" under "Suspected sockpuppets." It's also directly accessible atSpecial:BlankPage/MultiContribs (after you install the script, of course). Regards, —DVRTed (Talk)01:42, 14 July 2025 (UTC)[reply]
Looks good. Is it possible to filter by tags? (Specifically Twinkle in my case.)CX Zoom[he/him](let's talk • {CX})12:18, 14 July 2025 (UTC)[reply]
Done. I've added some popular tags fromSpecial:Tags to the filter option. —DVRTed (Talk)15:29, 14 July 2025 (UTC)[reply]
Thanks, looks great!CX Zoom[he/him](let's talk • {CX})17:58, 14 July 2025 (UTC)[reply]

Improve WikiTextExpander so that the user can choose when expansions are made

[edit]

@GreenC: posted agood idea: It would be nice if theWikiTextExpander script would allow the user to choose when to do the expanding. Currently you have to select the text and then press a configurable button combination, but it would be cool if you could just type and it would expand when you hit the Spacebar, likeAutoKey does. Ideally configurable of course.Polygnotus (talk)02:14, 1 August 2025 (UTC)[reply]

Assisted addition of author links to citations

[edit]

Hey scripting people, I'm often in the situation where I want to check if I can add the|author-link= parameters to any citations in an article. Manually searching for whether articles exist for each author is very tedious, and it would be great if I could have a script do that scan on request and give me a list of possible matches that I can link. Bonus points if it can select which of those to use and then actually add the links. Thanks in advance if anyone's interested in working on this, and let me know if you have any questions!TechnoSquirrel69(sigh)03:57, 20 August 2025 (UTC)[reply]

FYI
 –Merged two identical requests

Most citations have a named author. Rarely do they have an|author-link=. One needs to go through and manually copy-paste the author name into the Wikipedia search bar, maybe find a match, then add the field back into the citation. It's a lot of work and takes forever. Rarely done systematically. This should be semi-automatable some way, presenting a list of candidates that users can choose from. It might require a Toolforge tool, not sure on the backend with searching. --GreenC16:04, 9 September 2025 (UTC)[reply]

@TechnoSquirrel69:,@GreenC: Here's a work-in-progress userscript that I've started working on:User:DVRTed/author-link.js. Feel free to test it out and see if it works the way you'd like. To use it: install the script, go to an article -> source edit -> tool/more -> Author links. Regards, —DVRTed (Talk)10:33, 21 September 2025 (UTC)[reply]
User:DVRTed, this is amazing, what you accomplished in a relatively svelte 200 lines (not counting the CSS). Wasn't sure it was possible at all. Been waiting years for this. I just didSpecial:Diff/1310518268/1312597063 and it worked fine, this page would have take a long time to manually check 24 references. The tool method took 5 minutes, and it was easy and fun.
Feedback:1 Most citations have a preview but a few did not show the citation. If none can be displayed, recommend a box anyway that says something like "unable to display citation" or "no display", because in a long list of cites it's easy to get lost in the list when the names merge together without a clear break. It could also make it easier to track your location in the list if the cites were numbered like "5 of 25".2 When a citation has been successfully marked there could an indication of status like a small green checkmark.3 I think in almost every case of a successful match it was the first one on the list, that's excellent and intuitive.4 I ran into a few dab pages and wasn't sure how to proceed, if possible there could be a way to manually enter the solution without having to navigate to the article entering it that way. The last item in the list might be "Other" clicking that brings up an entry box, or however.5 At the end of the list there could be a button "done", which serves the same purpose as "X" (top right), but is more clean because I wasn't sure what to do once I got to the end.6 Finally the edit summary could (probably should) attribute the tool being deployed, example edit summaries from other script assisting tools:Special:Diff/1310518217/1310518268,Special:Diff/1310375095/1310375351
Whatever the case, even if you did nothing more, this is an amazing tool, and I will be going back through the articles I care enough about maintaining to a high standard and running it. The Feature/Good article/list community will probably be all over this also. --GreenC16:48, 21 September 2025 (UTC)[reply]
Thank you so much,DVRTed! This is already going to be a huge improvement to my workflow. I agree with the feedbackGreenC provided above, and I ran into a few things myself that could be ironed out. Inmy sandbox, the script didn't realize that the first citation already had an|author-link1= provided and added another link for Jonathan Clements, causing a cite error. It also didn't give any options to link Helen McCarthy — not sure if that's working as intended or if the script didn't notice there was a second author. I also had this clipping/overlapping issue in the preview pane:
I'm using Firefox 142.0.1, and encountered it on all the skins that I checked (Monobook and both Vectors).TechnoSquirrel69(sigh)18:17, 21 September 2025 (UTC)[reply]
A couple more things as I use the script a bit more: the search results will sometimes return the article that's currently being edited, which the script then provides as a suggestion — I can't see a situation where this is going to be needed, so it can be excluded from the lists. Also, if I'm reading the regex correctly, the script doesn't check for the presence of the deprecated parameter variants|authorlink= or|authorlinkn= and will add duplicate parameters over them. These are still used in a few articles, so it might be worth including a case for them.TechnoSquirrel69(sigh)19:18, 21 September 2025 (UTC)[reply]

@TechnoSquirrel69:,@GreenC: Thanks for the feedback! I've made some changes to the script to address them (in no particular order):

  • Added numbering to the list of citations and a progress counter (total/modified/skipped) in the title bar. The missing citations preview is definitely a bug and it shouldn't normally happen. I noticed the list seemed like it was missing a citation preview (due to suboptimal separation) if there were multiple authors; I've added numbering to authors as well, so if a citation has multiple authors, it goes X (author 1) <list>, Y (author 2) <list>
  • The current page is now filtered out from the results.
  • The script now considers|authorlink[n]= as valid author link. It seems like both|author-link= and|author-link1= are widely used to link the first author, but the script wasn't handling that well--it does now. (All pages with source code containing ""author-link1="")
  • There's now a close button with a message when the list is emptied.
  • You can also type the article name manually now.
  • The script doesn't modify anything (styling or otherwise) outside of its own panel except the article text box, so I don't think your reflist clipping is related to it. In any case, I've "scoped" the script's CSS to ensure it's not affecting anything outside.
  • BONUS: The panel is moveable now!

LMK if I've missed anything. Todo: edit summary and a documentation page atUser:DVRTed/author-link. —DVRTed (Talk)01:48, 22 September 2025 (UTC)[reply]

Excellent work,DVRTed! Just tried it out onHayao Miyazaki and things are working smoothly. I did encounter the issue of the current article being suggested, but everything else has been fixed as far as I can tell. I think you should add this to theScripts++ newsletter; like GreenC said, I'm sure there are a lot of editors out there who would find this useful. Thanks again for your work!TechnoSquirrel69(sigh)02:50, 22 September 2025 (UTC)[reply]
special:diff/1312691813:Now it's definitely fixed! Adding it to S++ newsletter sounds like a nice idea but probably after properly documenting it. —DVRTed (Talk)03:05, 22 September 2025 (UTC)[reply]
To say thank you and to help out I made a rough draft documentation start atUser:GreenC/sandbox. Feel free to use some, all, or none. --GreenC04:14, 22 September 2025 (UTC)[reply]
@GreenC: You beat me to it! Hope you don't mind that I've made some tweaks and additions. :)TechnoSquirrel69(sigh)04:30, 22 September 2025 (UTC)[reply]
Much improved! --GreenC04:59, 22 September 2025 (UTC)[reply]
Thank you. I've copied it over toUser:DVRTed/author-link with some minor changes. —DVRTed (Talk)06:55, 22 September 2025 (UTC)[reply]
I haven't used this script and probably won't; this sort of editing isn't in my bailiwick. But, I should have you note that|authornlink= and|authorn-link= are also (alas) valid aliases of the canonical|author-link= /|author-linkn=. We tried to deprecate the unhyphenated forms but that attempt was not successful.
Further, there are these; you know that you'll be asked for them...:
  • |contributor-linkn= and|contributorn-link=
  • |editor-linkn= and|editorn-link=
  • |interviewer-linkn= and|interviewern-link=
  • |subject-linkn= and|subjectn-link=
  • |translator-linkn= and|translatorn-link=
None of these have unhyphenated forms.
Trappist the monk (talk)14:01, 22 September 2025 (UTC)[reply]
authorN[-]link isnow recognized as valid author link. I don't plan on adding support for the other the X-link parameters listed above anytime soon, unless they conflict with the script (assuming they can coexist with the author-link parameter). —DVRTed (Talk)14:17, 24 September 2025 (UTC)[reply]

Requested changes for DYK-helper

[edit]

There are several changes that have been requested forDYK-helper, and I need an experienced user to implement them, having beendirected to post here. Please note that the maintainer hasoffered their permission to let anyone do these changes and their hand in reviewing them, since they're busy with other things and the changes are relatively complex. This is the list so far:

ミラP@Miraclepine19:34, 18 September 2025 (UTC)[reply]

Now I thought of another proposed change: block submissions if one of the nominated articles does not exist; just ran into this error after forgetting the exclamation point inStop Saving the Planet!.ミラP@Miraclepine00:09, 25 September 2025 (UTC)[reply]

Track event dates of new pages

[edit]

Just wanted to make a request for a script to help out with Wikinews users with these things:

  • Specify an event date for a page without having to edit a JSON or table.
  • Generate a list of pages with an event date specified and a comment.
  • Ability to remove the date tag when no longer needed.

Petarkco (talk)22:51, 14 October 2025 (UTC)[reply]

T407051.Polygnotus (talk)22:17, 13 November 2025 (UTC)[reply]

Spam-only account tagging and reporting

[edit]

I've seen that often while dealing with spam only accounts, I have to tag their pages for CSD G11 with Twinkle and then report them to AIV. It might be nice to have a script that enables you to choose pages created by a certain account to tag with CSD G11, notifies the user of the CSDs and reports them to AIV all at the same time for convenience purposes. I was thinking something like a dropdown menu with options of whether to tag each page created by a user for CSD G11, warn the user and/or report to AIV (like Twinkle) would be pretty useful in such a script.~deltasock(talkcont)12:53, 29 October 2025 (UTC)[reply]

@~deltasock: Is it really necessary to{{db-spamuser}}/{{db-spam}} all (or even multiple) pages created by an obviously spam-only account if you're reporting them to AIV anyway? The reviewing admin will handle them regardless. —DVRTed (Talk)12:28, 30 October 2025 (UTC)[reply]

Move section script for teahouse/refdesk/helpdesk/various noticeboards

[edit]

It would be cool to have a script that allows one to move a section to the appropriate page, leaving behind a{{moved discussion to}} template and optionally notifying OP on their talkpage that the discussion has been moved.

E.g. I ask something on the helpdesk that can be answered on a refdesk.Polygnotus (talk)17:11, 12 November 2025 (UTC)[reply]

The person who makes this earns the eternal gratitude of my brotherColinFine.Polygnotus (talk)17:18, 12 November 2025 (UTC)[reply]
Missed thison my radar because you replied to the thread yourself, but this sounds fun; I'll try coding something to test on thetest wiki. —DVRTed (Talk)17:34, 13 November 2025 (UTC)[reply]
@Polygnotus: is there a "Your thread has been moved" template? —DVRTed (Talk)19:06, 13 November 2025 (UTC)[reply]
@DVRTed I think what we got isTemplate:Moved_discussion_to#See_alsoPolygnotus (talk)20:11, 13 November 2025 (UTC)[reply]
Ah, in that case: it'll have to be something like this:testwiki:User talk:DVRTed#Discussion moved. —DVRTed (Talk)21:01, 13 November 2025 (UTC)[reply]
Exactly, looks good.Polygnotus (talk)22:23, 13 November 2025 (UTC)[reply]
It's a thing now:User:DVRTed/move-talk-section. —DVRTed (Talk)09:59, 14 November 2025 (UTC)[reply]
@DVRTed Woah! That is very cool! Please add it toWikipedia:User scripts/List andWikipedia:Scripts++!Polygnotus (talk)18:30, 15 November 2025 (UTC)[reply]

Script for adding a References section

[edit]

I have tried to make a script for inserting a References section when editing. But it doesn't work. According to the console log, the text is inserted, but the textarea has no visible changes. Can anyone please explain what is going wrong with the script?

mw.loader.using('mediawiki.util',function(){mw.hook('wikipage.content').add(function(){vartextarea=document.getElementById('wpTextbox1');if(!textarea){// This isn't an edit pagereturn;}// Don't make the link more than onceif(document.getElementById('pt-insert-refsection')){return;}// Insert a link in the tool menuvarlink=mw.util.addPortletLink('p-tb','#','Insert References','pt-insert-refsection','Insert a References section at the cursor');// Listen for clickslink.addEventListener('click',function(e){console.log('Link clicked');e.preventDefault();vartextarea=document.getElementById('wpTextbox1');if(!textarea){console.error("wpTextbox1 not found, can't insert text.");return;}vartextToInsert='\n\n== References ==\n{{Reflist}}\n';// Fetch the cursor's start and end positionconststartPos=textarea.selectionStart;constendPos=textarea.selectionEnd;console.log(startPos,endPos);console.log(textarea.value);// Make new value for textareaconsttextBefore=textarea.value.substring(0,startPos);consttextAfter=textarea.value.substring(endPos,textarea.value.length);// Set the new valuetextarea.value=textBefore+textToInsert+textAfter;// Move the cursor to the end of the inserted textconstnewCursorPos=startPos+textToInsert.length;textarea.selectionStart=newCursorPos;textarea.selectionEnd=newCursorPos;// Set focustextarea.focus();});});});

Thanks,Dipsacus fullonum (talk)13:44, 21 November 2025 (UTC)[reply]

@Dipsacus fullonum: You've probably enabled the beta feature "Improved Syntax Highlighting" that hides the #wpTextbox1 textarea and creates its own editable DOM element; seemw:Extension:CodeMirror#JavaScript. A simple fix to make it work both with and without CM would be, starting from line 34:
vartextToInsert='\n\n== References ==\n{{Reflist}}\n';$(textarea).textSelection("encapsulateSelection",{pre:textToInsert,});// Set focustextarea.focus();
Regards, —DVRTed (Talk)14:45, 21 November 2025 (UTC)[reply]
@DVRTed: Thank you very much. That solved the problem for me.Dipsacus fullonum (talk)15:04, 21 November 2025 (UTC)[reply]

Script forWikipedia:WikiProject AI Cleanup/Noticeboard

[edit]

Hi, would it be possible to combine the process outlinedhere byfifteen thousand two hundred twenty four into a single script for ease of use and to make it accessible for other users? This is for creating tracking tables for each report (ie. user), like atWikipedia:WikiProject AI Cleanup/Noticeboard/2025-11-23 HyenaInTheSyntax forthis report. ThanksKowal2701 (talk)20:58, 26 November 2025 (UTC)[reply]

Copied the comment here:

Done, contributions were retrieved via CCI'scontribution surveyor(uncheck minor edits, set a large negative bytes value like -999999), then formatted using regex and previewed in the editor. Diffs are quickly checked usingnavigation popups,wikiEdDiff is used for more in-depth checks,Who Wrote That? is used to investigate partial cleanups,andthreescripts are used to make diff links more accessible. A final regex pass formats diffs added to notes and marks entries with them as completed. Can be done faster if the optional notes and completed entries are left out.​ fifteen thousand two hundred twenty four (talk) 05:10, 20 November 2025 (UTC)

Kowal2701 (talk)21:02, 26 November 2025 (UTC)[reply]
Few things:
  • should it only run onWikipedia:WikiProject AI Cleanup/Noticeboard in sections that have{{AIC status}}? If so, the template needs to be modified to include the relevant username;
  • should there be a limit to how many contributions to fetch, or should it allow uploading the output file fromcontribution surveyor?
  • we cannot useWho Wrote That?, so there's no reliable way to automate excluding partially cleaned up diffs;
  • I suppose it should also help in updating the subpage's table; if so, "Tagged" / "Addressed in X" should be its own column instead of being appended to Notes (as it currently is);
  • If you mean clusters of edits by this single user, those would be best kept to the current subpage and could use separate sections each with their own{{AIC article list}}. The formatting isn't strict at all This should not be the case; the subpage formatting needs to be ironed out and bestrict. Regards, —DVRTed (Talk)22:27, 26 November 2025 (UTC)[reply]
Thanks, pingingChaotic Enby who made the template and might know what some of that meansKowal2701 (talk)22:42, 26 November 2025 (UTC)[reply]
Thanks for the ping!
  • That could be easy to do (but usernames would need to be retroactively added manually), although the end goal is to use it on all sections that need non-trivial cleanup
  • I don't think there should be a numerical limit, although a time limit from December 2022 (public release of ChatGPT) onwards would make sense
  • Not sure about how to deal with this one, sorry!
  • Easy to add another optional column to the table
  • Less than you'd think! If there are several tables, the indicator hatnote can correctly parse the total number of open cases in all of them
ChaoticEnby (talk ·contribs)23:55, 26 November 2025 (UTC)[reply]
  1. No, it would be best if the script could work with arbitrary usernames independent of any reports.
  2. Ideally it should be able to fetch the same information contribution surveyor does, no limit to the number of contributions, and constrainable to date ranges. If this is infeasible (seems like API work to me) then allowing the contribution survey to be uploaded would still be an improvement.
  3. Expected.
  4. The three templates created for LLMN,{{AIC status}},{{AIC article list}} and{{AIC article row}} were designed to be as easy to understand, update, and use as possible, so adding more parameters is undesirable. Any notes, while useful, are genuinely optional.
  5. {{AIC article list}} and{{AIC article row}} are strictly defined, but the subpage itself is not and can have multiple article lists or sections.{{AIC status}} handles this by parsing lines starting with{{AIC article row|..., seeModule:AIC_status#L-103. Any userscript would not be expected to be able to generate multiple article lists, only a monolithic one.
The main help would be in assisting editors in creating an initial raw article list. A bonus would be then assisting in the process of refining that list such as by helping review diffs, remove nonviable entries, change statuses, and add notes.
Additional info: the only essential entries when creating a new list are articles which are "requested" or "ongoing". "completed" entries are optional when first creating a list.fifteen thousand two hundred twenty four (talk)23:57, 26 November 2025 (UTC)[reply]
I trust your answers for 1 and 4, while you're less comfortable with adding new parameters than I am, it definitely makes sense from a UX point of view, especially since you're the one who's been working with the large-scale pipeline.ChaoticEnby (talk ·contribs)00:01, 27 November 2025 (UTC)[reply]
I'm personally willing to suffer the burden of indicating tagging status via notes for lists I'm compiling myself, but have little desire to indicate to others that adding or updating tagging status is necessary or expected by adding it as a parameter.
My thoughts are that even without any announcements or guidance, there's been a surprising amount of engagement from editors uninvolved in the templates creation, and their simplicity and low burden to use is likely an important factor in this.fifteen thousand two hundred twenty four (talk)00:35, 27 November 2025 (UTC)[reply]
Does this output look OK:testwiki:Wikipedia:WikiProject AI Cleanup/Noticeboard/2025-11-27 DVRTed? (edit source) —DVRTed (Talk)11:48, 27 November 2025 (UTC)[reply]
In any case, it's a thing now:User:DVRTed/AINB-helper; feel free to test it out. —DVRTed (Talk)14:10, 27 November 2025 (UTC)[reply]
Looks good! One detail, could it be helpful to make the parameter names explicit, for readability?ChaoticEnby (talk ·contribs)15:05, 27 November 2025 (UTC)[reply]
I agree.➕Added named parameters. —DVRTed (Talk)17:43, 27 November 2025 (UTC)[reply]
This looks really good, way better than I would have imagined, thank you DVRTed!
Could you make a change online 395:
let wikitext = `Relevant report and discussionare viewable on the talk page.\n\n== Tracking list ==\n{{AIC article list\n`;
+
let wikitext = `Relevant report and discussionmaybe viewable on the talk page.\n\n== Tracking list ==\n{{AIC article list\n`;
All reports currently on talk pages are part of a process I'm experimenting with to make cases less fragile when archived, and while I hope something permanent can be worked out, they're not currently guaranteed to exist.fifteen thousand two hundred twenty four (talk)22:36, 27 November 2025 (UTC)[reply]
 Donehere. —DVRTed (Talk)02:02, 28 November 2025 (UTC)[reply]
I used this script to createWikipedia:WikiProject AI Cleanup/Noticeboard/2025-11-28 ForayHistory, some feedback:
  • The script generated separate parameters for each row which I had to fix withSpecial:Diff/1324595647
  • It used named instead of anonymous parameters which seem incompatible with the auto count feature of{{AIC status}}, which reported 0 pages needing review
  • Some elements of the "Select diffs to include" page have light-on-light or dark-on-dark text in dark mode
EvenTwist41 (talk)16:24, 28 November 2025 (UTC)[reply]
Just fixed the second point by making the auto count work with named parameters.ChaoticEnby (talk ·contribs)16:40, 28 November 2025 (UTC)[reply]
Fixed the template with:Special:Diff/1324642409. I couldn't reproduce the dark mode issue withWikipedia:Dark mode (gadget); are you using something else? —DVRTed (Talk)21:11, 28 November 2025 (UTC)[reply]
I'm using the dark mode optionin the appearance menu.EvenTwist41 (talk)21:20, 28 November 2025 (UTC)[reply]
 Done It should look a lot better now in dark mode. —DVRTed (Talk)22:23, 28 November 2025 (UTC)[reply]
Thanks, just one more thing: In order for automatic mode to work, youneed to duplicate the.skin-theme-clientpref-night styles for.skin-theme-clientpref-os inside a(prefers-color-scheme: dark) media query.EvenTwist41 (talk)00:34, 30 November 2025 (UTC)[reply]
I intentionally avoided that because I didn't want the "OS" preference to affect the script. I find it more comfortable to use Wikipedia on light mode even though my device (and browser) are set to dark mode. LMK if I've missed something that would prevent the script dialog from switching to dark mode when dark mode is enabledon Wikipedia. —DVRTed (Talk)14:36, 2 December 2025 (UTC)[reply]
I think you misunderstood, the automatic mode I'm referring to is an option in the appearance menu and it already changes many of the colors in the script dialog if the system is set to dark mode, but it has the same problem the Wikipedia dark mode option had before you added the.skin-theme-clientpref-night styles. Note the.skin-theme-clientpref-os selector inthe example, this prevents the styles from applying to the light mode option which is the default and doesn't set this class.EvenTwist41 (talk)00:50, 4 December 2025 (UTC)[reply]
Update: It's now possible to edit theaic-rows in place; feel free to try it out here:User:DVRTed/sandbox2 (see the Action table header). PS: it breaks if you have templates inside|notes=. —DVRTed (Talk)10:29, 3 December 2025 (UTC)[reply]
Good addition. Two issues:
  • Cannot parse rows without parameter names:{{AIC article row|Example|requested|foo}} returnsCould not find row data for this article.
  • Cannot parse rows with empty or absent notes parameter (notes are optional):{{AIC article row|article=Example|status=requested|notes=}} and{{AIC article row|article=Example|status=requested}} returnCould not find row data for this article.
Observations:
  • Cannot parse alternate status names liker orto do, not really an issue since it still allows updating the status.
  • Can be confused if there are multiple entries with the same article name, but this isn't valid in practice and would be a user issue.
fifteen thousand two hundred twenty four (talk)01:46, 4 December 2025 (UTC)[reply]
 Done, except for the last point--notrealistically possible to handle multiple entries with the same article name, because article names are treated as unique IDs to identify the rows. —DVRTed (Talk)03:51, 4 December 2025 (UTC)[reply]
Checked again, found no more actual issues, thank you.fifteen thousand two hundred twenty four (talk)06:47, 4 December 2025 (UTC)[reply]

Upload fair use book covers

[edit]

I (with a few others like @Iljhgtn) am involved with a task for adding cover pages of books that don't have any in their articles.

The process is completely repetitive. We find an image, most often on Google Books or Amazon; upload it as a non-free file filling out the form with the same fields everytime except the file name, article name, and image source link; then include this new image in the article infobox; then remove the image-needed tag from the article's talk page.


I want to automate this. If someone can write the script for this, cool. I have not written any script on wiki yet so if I could be guided to writing this, I would prefer that as well.Wikipedia:User scripts/Guide felt useless to me.

Kingsacrificer (talk)17:30, 29 November 2025 (UTC)[reply]

Thanks. For some reason I did not see the ping, but thanks for letting me know separately @Kingsacrificer. This would be useful for improving our methods to improve Wikipedia with book cover images added.Iljhgtn (talk)02:27, 30 November 2025 (UTC)[reply]
I’m not entirely sure if doing this in an automated way (ripping a website) is entirely legal. One image, is one copyright infringement with a fair use get-out-of-jail card. But automating an entire collection likely violates the terms of service of that website, and might be seen as a repeated offense, which might create more trouble in case you need to defend the collective use of those images. Please consult your own lawyer. —TheDJ (talkcontribs)11:40, 30 November 2025 (UTC)[reply]
I think what @Kingsacrificer is asking about is how to also streamline the entire process for properly using a non-free file with the Wikipedia file/image upload wizard. It is a tedious process, but one that is highly repetitive. This is normally the sort of situation where a script might be of use. I agree though that care and discretion should be advised, and though I am not a lawyer. I don't see how a human doing this 3,000 times is fine, but a script would not be. I have easily uploaded thousands of non-free book cover images within the proper rights and disclosures required by our use of these images on Wikipedia.Iljhgtn (talk)15:46, 30 November 2025 (UTC)[reply]
I am confused what you mean. There is no question here of ripping a website @TheDJ. The aim is to simply automate as many of the steps as possible.
We can download the images from the source, and provide a script modal with the article title, the image, and the source link.
As @Iljhgtn stated, there's no reason why a human doing this repetitively is acceptable but won't be acceptable for a script.
The script is only meant to automate steps ON WIKIPEDIA, not on the other websites whose sources we are using for the images.Kingsacrificer (talk)18:12, 30 November 2025 (UTC)[reply]
Correct. As @Kingsacrificer said.Iljhgtn (talk)18:24, 30 November 2025 (UTC)[reply]
cc: @Novem LinguaeKingsacrificer (talk)15:35, 2 December 2025 (UTC)[reply]
To better share my point (as I did in Discord)
1. Find a cover of the book on a website and download it locally.
2. Open the upload file wizard on wikipedia, and choose 'upload a fair-use file'
3. Upload the downloaded file to the wizard. Enter the SAME REPETITIVE DETAILS EVERYTIME (the only thing that changes is the file name and the web source URL of the file).
4. Once file is uploaded, go to the book article. Add an Infobox book template, if not present on the page.
5. Paste the new file's address in the Image parameter of the template. Publish changes.
6. Go to the talk page. There, the WikiProject Books template will have a parameter 'needs-infobox-cover'. Set this to false. Publish changes.
The aim is to automate as much as possible from here. Any help is appreciated.
CC: @Iljhgtn @TheDJ @Novem LinguaeKingsacrificer (talk)14:23, 5 December 2025 (UTC)[reply]
Question for techies: is there an action API for file uploading?
If so, then here is a possible engineering specification: Have the user fill out a one page custom form that the user script generates with some basic information such as the file to upload, user clicks run, and then it would do a bunch of API calls:
  • 1 API call for file upload
  • 1 API call to get book article wikitext
  • 1 API call to edit book article wikitext
  • 1 API call to get book talk page wikitext
  • 1 API call to edit book talk page wikitext
This would still require the user to manually download then manually pick the file, but would automate away everything after that. –Novem Linguae(talk)23:18, 5 December 2025 (UTC)[reply]
Special:ApiHelp/upload.Anomie02:27, 6 December 2025 (UTC)[reply]
This has a lot of helpful fields. But even here, the information we have to fill in to upload a 'non-free' file (type of file which in my case is a book cover, author of the file, source of the file, how the file use will stay minimal, etc.) are not present in the parameters. What do we do to tackle this? Apologies if this is a really noob question.Kingsacrificer (talk)10:02, 6 December 2025 (UTC)[reply]
In my idea above, all information would be collected in one custom form/one page rather than multiple pages. It'd have a "browse" button to pick the file location on your computer, and you could add text boxes there to collect anything else that's needed, such as fair use information that varies between files. You'd press submit when you're done and it would run the script. If that fair use information is the same for every file, even better, because then you can just hard-code those parts into the script, or pre-fill a text box. –Novem Linguae(talk)10:13, 6 December 2025 (UTC)[reply]
Yes, I agree. Most fields would be hard-coded. I'm not debating the one page front-end.
My concern is that the API does not mention the fields where I enter the fair use information when manually uploading the image file.Kingsacrificer (talk)13:31, 6 December 2025 (UTC)[reply]
As far as the API goes, all the wikitext that you would put into the File page goes in thetext parameter. The script would take your more specific inputs to build the wikitext with the proper templates and such, e.g. what you see if you go toSpecial:EditPage/File:The Cambridge History of Southeast Asia.jpg (with the source editor, not VE). If you're used toWikipedia:File upload wizard, it's doing the same behind the scenes.P.S. Don't get excited about aurl parameter existing. That requires theupload_by_url right, which no group here on the English Wikipedia has.Anomie15:22, 6 December 2025 (UTC)[reply]
Oh that is interesting. So, will I have to include the entire page's source code in the `text` paramter?
In other words, is this what my `text` parameter should like for this file?
==Summary=={{Non-free use rationale 2|Description= Official cover of the book[[The Cambridge History of Southeast Asia]]|Source= https://www.cambridge.org/in/universitypress/subjects/history/regional-and-world-history-general-interest/cambridge-history-southeast-asia-volume-1-part-2?format=PB&isbn=9780521663700|Date= 2000|Author= Cambridge University Press|Article= The Cambridge History of Southeast Asia|Purpose= to serve as the primary means of visual identification at the top of the article dedicated to the work in question.|Replaceability= Any derivative work based upon the cover art would be a copyright violation, so creation of a free image is not possible.|Minimality= Single use in the infobox|Commercial= The use of a low resolution image of a work's cover will not impact the commercial viability of the work.}}==Licensing=={{Non-free book cover}}
P.S. I did get excited about the `url` parameter, haha. Thanks for the clarification.Kingsacrificer (talk)16:43, 6 December 2025 (UTC)[reply]
Other than a typo or two (which I fixed for you while wrapping it in<syntaxhighlight>...</syntaxhighlight>), yes.Anomie17:39, 6 December 2025 (UTC)[reply]
Thank you very much, this is a great starting point for me.Kingsacrificer (talk)18:04, 6 December 2025 (UTC)[reply]
@Anomie
I want to recreate a similar flow, but this time for files to be uploaded to commons. I am not sure if the flow should be pretty much similar or should I make some changes that I might miss?
Example file:https://commons.wikimedia.org/wiki/File:A_Treatise_on_the_Circle_and_the_Sphere_(title_page).jpgKingsacrificer (talk)20:50, 23 December 2025 (UTC)[reply]
The API call would be the same, but the wikitext you need to use may differ. I'm not terribly familiar with Commons to say how.Anomie20:54, 23 December 2025 (UTC)[reply]
Let me try this. THanks!Kingsacrificer (talk)18:51, 24 December 2025 (UTC)[reply]
Looking forward to what you build here!Iljhgtn (talk)18:52, 24 December 2025 (UTC)[reply]
That would be ideal indeed.Kingsacrificer (talk)09:42, 6 December 2025 (UTC)[reply]

Request: Adding "Show piped links" to Special:WhatLinksHere

[edit]

Can someone write a script for it? Show piped links would be a very helpful feature forSpecial:WhatLinksHere because it would make the cleanup process much much easier. For example, 1000 items link to article X and 10 of those 1000 items are unnecessary piped links. Using Show piped links would help finding those 10 items very fast and dealing with them perMOS:NOPIPE,WP:NOTBROKEN, andWP:NOPIPEDLINK. --Mann Mann (talk)03:16, 2 December 2025 (UTC)[reply]

@Mann Mann: This istechnically doable with a userscript but not really practical.mw:API:Linkshere doesn't have any information on whether the incoming links are piped. That means we'd have to query the wikitext ofevery article on the list and check if it's a piped link. That'd be an enormous amount of API requests for a target with thousands of backlinks.
Update: while writing this reply I realized we could make use of the regex search instead. For example,insource:/\[\[Julian Casablancas\|/i returns articles with piped link(s) toJulian Casablancas. (Can somebody tell me how resource-intensive/expensive these regex searches are? Maybe@Polygnotus:?) —DVRTed (Talk)13:34, 8 December 2025 (UTC)[reply]
@DVRTed People far smarter than I am said "Don't worry about performance" and that they will tell us when we do need to worry about it.
@Mann Mann You could tryUser:Polygnotus/Scripts/Piped.js. It adds a link called "Piped links" next to the "External links"-section of the What links here page.Polygnotus (talk)14:19, 8 December 2025 (UTC)[reply]
@Polygnotus Nice! I assumed the target audience of that page was regular editors and not people who play around with APIs, etc. I was writing a script myself that would list the results on the same page, but I guess that's not really needed now. Maybe changeUser:Polygnotus/Scripts/Piped.js#L-45 from
var escapedPage = targetPage.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
to
var escapedPage = mw.util.escapeRegExp(targetPage); because regex is scary. —DVRTed (Talk)14:35, 8 December 2025 (UTC)[reply]
@DVRTed Good point, thanks.
And yeah, that would probably be more elegant. But this is quicker.Polygnotus (talk)14:41, 8 December 2025 (UTC)[reply]
Your assumption is correct. For API usersmw:API:Etiquette applies.Nardog (talk)14:43, 8 December 2025 (UTC)[reply]
For anyone who might stumble upon this thread in the future: I foundHelp:Searching/Regex § Use regexes responsibly to be a helpful reference page. Apparently,[o]veruse of slow regex searches might cause temporary throttling of the feature for yourself and/or everyone on Wikipedia.DVRTed (Talk)18:37, 9 December 2025 (UTC)[reply]
@DVRTed If I go to the Whatlinkshere ofA&E and then click "Piped Links" it saysA warning has occurred while searching: The regex search timed out, so only partial results are available. Try simplifying your regular expression to get complete results. but yeah there are 7 million articles on which this works fine.Polygnotus (talk)14:58, 8 December 2025 (UTC)[reply]
@Polygnotus: I wrote a patch atUser:DVRTed/sandbox/temp.js (diff). Instead ofinsource:/\[\[Julian Casablancas\|/i, it doesinsource:"Julian Casablancas" insource:/\[\[Julian Casablancas\|/i. It's a noticeable performance improvement and, I assume, less likely to fail. —DVRTed (Talk)15:19, 8 December 2025 (UTC)[reply]
Updated. Probably not many articles with an ampersand in the title.Polygnotus (talk)19:06, 8 December 2025 (UTC)[reply]

The script works like a charm. Many thanks --Mann Mann (talk)18:26, 8 December 2025 (UTC)[reply]

@Mann Mann I added both options so you can now choose either piped or unpiped links.Polygnotus (talk)23:41, 8 December 2025 (UTC)[reply]
Perfecto! --Mann Mann (talk)05:19, 9 December 2025 (UTC)[reply]

Add a banner to all articles

[edit]

All articles in this categoryCategory:Books with missing cover should haveTemplate:WikiProject Books banner in their talk page. If not present, the script should add it. It should also add the 'needs-infobox-cover=yes' flag to this banner either way.

It will be a (rather harmless) bot command acting on around 1700 articles.

idk what the guidelines are around this.Kingsacrificer (talk)09:27, 11 December 2025 (UTC)[reply]

@KingsacrificerWP:BOTREQ? —DVRTed (Talk)09:33, 11 December 2025 (UTC)[reply]
Thank you for directing me to the right place.hKingsacrificer (talk)09:35, 11 December 2025 (UTC)[reply]
Seems much more suitable to a AWB task if I'm honest, rather than building a bot. Would be a simple enough regex.Lee Vilenski(talkcontribs)16:09, 11 December 2025 (UTC)[reply]
I don't know what AWB is.Kingsacrificer (talk)17:21, 11 December 2025 (UTC)[reply]

Word limit counter for PIA discussions

[edit]

Re:Clarification request: Palestine-Israel articles 5 and because it was queriedover here, is it possible to get a user script which indicates to editors theirword count for formal PIA discussions, usingSpecial:AbuseFilter/1339 to filter it appearing on talk pages?

As a reference there have been quite a few discussions with editors going over limits so far, hence to some degree it's ended up at ARCA, thus prevention is always better than cure when possible. I believe there would also be demand for such a script at present.

There is alreadyUser:GoldenRing/wordcount.js as a framework, as well asTemplate:Arbitration Committee word status, but ideally we'd have a user-end script for this. I'm thinking something similar toUser:Novem Linguae/Scripts/VoteCounter.js in the way it presents on talkpages (at the top of formal discussions), combining 1339 filtered pages with VoteCounter-style filtering of formal discussions. Pinging creators of script/templates referenced. Regards,CNC (talk)09:54, 23 December 2025 (UTC)[reply]

There is alsoUser:L235/wordAndLinkCounter.js, for some attempt at this from an admin's perspective. Best,KevinL (akaL235·t·c)20:00, 28 December 2025 (UTC)[reply]

Outdenting tool

[edit]

FromWikipedia:Village pump (technical)/Archive 226#Outdent tool:

The [Reply] tool makes it very easy for editors to continually reply without ever outdenting the thread. That makes it difficult to read, especially on a smartphone/narrow screen.

I've been fixing these by hand, but I'd like a less error prone method. The ideal might look something like this:

  • One-click button/very easy to operate on a single ==Section== of a long talk page.
  • The targeted level might be a configurable number between, say, 8 and 16, but defaults to 10.
  • The script only does something if there is at least one line in the section that starts withn+3 colons. (This will prevent overuse/outdenting just one or two lines.)
  • Replacesn colons with:{{outdent}} on the first line withn colons.
  • On all subsequentconsecutive lines withn (or more) colons, the firstn colons are replaced with:.
  • If more than one heavily indented sub-thread exists, then:{{outdent}} is added to the first line of each group.
  • A diff of all changes is automatically displayed (no automated posting).
  • A sensible edit summary is pre-loaded.

Does this seem feasible for a user script?WhatamIdoing (talk)00:34, 29 December 2025 (UTC)[reply]

While feasible, as written (and as you've done by hand) this will lead to confusion like howSpecial:Diff/1329950687 madethis comment appear to be a reply tothis one when itwas actually indented as a reply toa completely different comment, orthis as a reply tothis rather thanthis asas originally, or odd indentation onthis which at least makes it more obvious thatthis is probably not really a reply tothis (itwas actually a reply tothis) even though the indenting (and these comment links) makes it look that way. A better script would avoid doing things like that.Anomie13:26, 29 December 2025 (UTC)[reply]
Would the approach you have in mind still be useful in discussions that don't happen in chronological order? The main problem seems to be situations that start off as:
Alice
:Bob
:Chris
:David
and then Eve replies underneath Bob's comment, and they argue with each other for the next 20 comments.WhatamIdoing (talk)17:26, 29 December 2025 (UTC)[reply]
Whether in chronological order or not, multiple sub-threads are fairly common. The key would be to not outdent a subthread to the point where a different subthread gets confusingly imported into it. To take your example,
Alice: Bob:: Eve::: Bob:::: Eve::::: Bob:::::: Eve::::::: Bob:: Chris:: David
getting turned into
Alice: Bob:: Eve::: Bob:{{outdent}}: Eve:: Bob::: Eve:::: Bob:: Chris:: David
gets confusing, where
Alice: Bob:: Eve::: Bob:::: Eve::::: Bob:::{{outdent}}::: Eve:::: Bob:: Chris:: David
doesn't. This may mean that sometimes there's no outdenting that could be reasonably done, but IMO that's better than the alternative. What we probably really need is for CSS or MediaWiki to do the visual outdenting for us, in a way that indicates where the outdented block ends as well as where it begins and without changing the wikitext.Anomie18:16, 29 December 2025 (UTC)[reply]
When I'm doing that manually, and the last outdented comment is at/near the indentation level of the next comment, I sometimes add an extra outdent tag to the next comment or a ===Subsection=== break.
I don't think there are any ideal solutions for this. Do you think you could code something that's an improvement, even if it's not perfect?WhatamIdoing (talk)21:49, 29 December 2025 (UTC)[reply]
FWIW, among other things a similar thing is done onyour replies only byc:User:Jack who built the house/Convenient Discussions when you use its reply tool; it doesn't do the "convert everything" thing you mentioned.Aaron Liu (talk)16:28, 31 December 2025 (UTC)[reply]
Came to say this!FaviFake (talk)16:26, 18 January 2026 (UTC)[reply]

Syntax highlighting

[edit]

Apologies if this exists, but I couldn't find it. The closest mention wasthis.

When using the source editor it can be hard to discern text from references, especially if there is less text than references.

I would like a script that colours anything between <ref></ref> tags a different colour than the text. They can be the same colour, or even better a different (random) colour for each reference while the text stays unchanged.

To my layman mind this seems like a trivial thing to implement for someone who knows JavaScript, but I could be wrong. If a script or gadget like this already exists—even better!

Thanks.TurboSuperA+[talk]07:39, 8 January 2026 (UTC)[reply]

@TurboSuperA+ Have you triedPreferences →Beta features →TickImproved Syntax Highlighting? —DVRTed (Talk)07:50, 8 January 2026 (UTC)[reply]
Now I have. Thanks. Although it doesn't work on mobile.
Colours seem "muted", if that makes sense. Is there a way to change colours and colour scheme? I'd like the colours to be brighter and there to be stronger contrast between the article text and code/markup.TurboSuperA+[talk]07:59, 8 January 2026 (UTC)[reply]
I've not personally tested it, but it seems like you can write your own CSS overrides for its classes:mw:Help:Extension:CodeMirror#Color and style customization.
For example, to change the color of the template name:
.cm-mw-template-name{color:red;}
That preferably goes into yourSpecial:MyPage/common.css. —DVRTed (Talk)08:14, 8 January 2026 (UTC)[reply]
Woah. That isexactly what I need! Thanks a lot. Btw, it looks like syntax highlighting works on mobile in this comment box. I'll try refreshing and see if it then works on article source editing.TurboSuperA+[talk]08:19, 8 January 2026 (UTC)[reply]
Nope. Which is strange, no? That I have syntax highlighting in this box but not in the source editor.TurboSuperA+[talk]08:21, 8 January 2026 (UTC)[reply]
@TurboSuperA+ It seems like CM is not enabled on mobile; the "comment box" is likely fromDiscussionTools or something similar. I wrote a little script to enable it while source-editing a page on mobile; LMK if it works for you:User:DVRTed/minerva-enableCM.js. —DVRTed (Talk)09:56, 8 January 2026 (UTC)[reply]
Where do I put the script? In global or my userscripts?TurboSuperA+[talk]10:48, 8 January 2026 (UTC)[reply]
Add{{subst:iusc|User:DVRTed/minerva-enableCM.js}} toyour common.js file. —DVRTed (Talk)11:00, 8 January 2026 (UTC)[reply]
It works! Great job!
And to confirm, common.css still applies, right?TurboSuperA+[talk]11:49, 8 January 2026 (UTC)[reply]
Yep! —DVRTed (Talk)12:18, 8 January 2026 (UTC)[reply]

Merge proposals

[edit]

Are there any scripts available which start merge proposals discussions, tag the appropriate pages and notify appropriate WikiProjects?TarnishedPathtalk09:58, 6 July 2025 (UTC)[reply]

None come to mind off the top of my head. You can always checkWP:US/L if you haven't already. –Novem Linguae(talk)11:39, 11 July 2025 (UTC)[reply]
Tools to help with the actual merge process, including adding merge from templates to talk and setting up redirects, but nothing to start merge discussions and automate adding notices to the top of affected pages.TarnishedPathtalk12:04, 11 July 2025 (UTC)[reply]
I'd love this too! Merge proposals are much less complicated than XfDs but for some reason there still isn't anything that can nominate two pages for merging. I can imagine a sidebar link that, when clicked while on the target page, asks for a list of pages to merge, applies the same tag to all of them, and sends me to the talk page so I can write my rationale.FaviFake (talk)16:36, 18 January 2026 (UTC)[reply]
I think I'd like to take a stab at it if such a script doesn't exist yet. I'd appreciate if someone could review the rough specs atUser:DVRTed/sandbox/merge-helper-specs, as I'm not very familiar with the merge process. —DVRTed (Talk)01:07, 19 January 2026 (UTC)[reply]
@DVRTed, the specs look about what you'd expect. The only feedback I'd give is that on occaion an editor might wish to propse a merge of two or more pages into a page that doesn't exist as yet. E.g., MergeGoat andSheep toGoat and Sheep. I wouldn't expect any logic to stop the process, only to confirm with the editor making the proposal that the destination doesn't yet exist.
A feature you might want to consider adding is notifying any Wikiprojects which are listed in the Wikiproject banners at the top of the source and destination pages.TarnishedPathtalk02:29, 19 January 2026 (UTC)[reply]
That looks great, thank you so much! I had a slightly different user experience flow in mind, I'm starting to work on it. I'll publish it in a few hours when I'm doneFaviFake (talk)17:00, 19 January 2026 (UTC)[reply]
DVRTed I've made a few changes to the flow atUser talk:DVRTed/sandbox/merge-helper-specs, what do you think? I hope my version isn't too complex?FaviFake (talk)20:41, 19 January 2026 (UTC)[reply]
@FaviFake Thanks! I briefly skimmed through it. Comparatively, it seems simpler than what I had planned. That said, I think a large input field that accepts a raw list of articles is less intuitive than asource page input field with a + button next to it to add more source pages. Everything else seems like an improvement. I'll update my specs to try and come up with something that merges (hehehe) both of our ideas—probably not until the weekend. —DVRTed (Talk)22:11, 19 January 2026 (UTC)[reply]
@DVRTed Thanks! Personally, I'm kinda a merge power user, so it would be useful to me to have a blank big input field, but I agree yours is much more user-friendly! (If you had a ton of time to waste, you could even do both and let users toggle between the two states. But don't worry about it!)
I've updated mine with both options and a better visual representation of the UI for the version with a plus button!FaviFake (talk)22:36, 19 January 2026 (UTC)[reply]

Update merge notices after closing a merge proposal

[edit]

After a merge discussion has been closed, theWP:MERGE process currently requires a lot of steps:

To close a merge discussion, use the{{Discussion top}} and{{Discussion bottom}} templates. Then:

  • If the discussion isclosed with consensus to merge, change the{{Merge to}} tag to{{Being merged to}} in the source page, and change{{Merge from}} to{{Being merged from}} in the destination page. They should remained tagged until the merge is performed, so that they are added tothe relevant backlog.
  • If the discussion isclosed with consensus against merging or no consensus, remove all the{{Merge}} templates from the destination and source pages. Optionally, you can also place{{Old merge}} on the corresponding talk pages.

So when I close a merge discussion I have to:

  1. Usethis script to close the discussion
  2. Open the pages involved.
  3. On the first page, click edit
  4. Change "merge to/from" to "being merged to/from"
  5. In the edit summary, note that the discussion was closed
  6. Publish
  7. Repeat steps #3 to #6 on the second page

This is very repetitive and it shouldn't be too hard to automate. I'm thinking there could be a link in Tools that asks you to input the page names, asks if you want to

  • remove the merge tags
    • (It would also be amazing if it could add a simple{{Old merge|otherpage= NameOfOtherPage}} to both talk pages when choosing toremove the tags:)
      iconThis was nominated formerging withNameOfOtherPage in the past. The result ofthe discussion wasto not merge.
  • or change the merge tags from Merge to being merged or vice versa, in case it's reopened

and then it finds them and automatically does it.

There are a lot of redirects to{{merge}},{{merge to}},{{merge from}} and their "Being merged ..." counterparts, so a simple search for the exact string{{Merge to| would fail often, but I'm sure there's a way to identify them somehow. Is this easy to do?FaviFake (talk)15:43, 18 January 2026 (UTC)[reply]

Are you aware ofUser:SD0001/easy-merge? ~Kvng (talk)17:40, 24 January 2026 (UTC)[reply]
Of course, I use it daily. It can do none of the things I described here.FaviFake (talk)20:15, 24 January 2026 (UTC)[reply]

Notify when block target registered other accounts

[edit]

Some vandals have taken to creating one account, then registering multiple accounts from that account, such asin this case. It would be useful inSpecial:Block for a script to note if the account registered other accounts, recursively, and possibly a button to apply the same block to the rest of the accounts.DatGuyTalkContribs11:57, 31 January 2026 (UTC)[reply]

Hi @DatGuy,
I'm not an admin, but could you give me a screenshot of how this form looks?TheTechie[she/they] |talk?03:56, 9 February 2026 (UTC)[reply]
@TheTechie: you can request admin perms ontestwiki, which you'll likely need if you want to develop it regardless.DatGuyTalkContribs14:52, 9 February 2026 (UTC)[reply]

Script to toggle font of editing area

[edit]

I would greatly appreciate if someone could throw together a script that adds a button (ideally to the left-hand navigation bar) that, when clicked, switches the font of the main source-mode editing area (i.e.#wpEextbox1) to a serif font. This is very useful for editing on Wikisource, where it can be annoying to proofread long blocks of monospace text in monospace but equally annoying to edit templates and tables in serif: thus, font-switching would be a great help. Thanks!Cremastra (talk ·contribs)02:05, 4 February 2026 (UTC)[reply]

Hi @Cremastra,
Do you mind if it only activates serif or allows the user to choose?TheTechie[she/they] |talk?03:57, 9 February 2026 (UTC)[reply]
Only serif is good. If it's possible to switch back and forth multiple times, that would be good.Cremastra (talk ·contribs)03:59, 9 February 2026 (UTC)[reply]
@Cremastra one more thing. Do you want it to reset on every new edit? That's what I'm currently working on implementing.TheTechie[she/they] |talk?04:07, 9 February 2026 (UTC)[reply]
Hi @Cremastra,
I've now implemented what I think you want in my user scriptTTUT. To use it, install the script, then open up the source editor, then in the page menu, selectTTUT, thenToggle serif font (source editor).TheTechie[she/they] |talk?04:18, 9 February 2026 (UTC)[reply]
Sorry for the back to back pinging @Cremastra, but here's what I found. This behaviour is apparently already in Wikipedia. Go to Preferences, then changeEdit area font style toSerif font. Are you sure you still need it in a user script? If not, I might remove it from TTUT as the TTUT version is quite hacky and buggy (especially on the 2017 wikitext editor).TheTechie[she/they] |talk?16:07, 9 February 2026 (UTC)[reply]
No, this is splendid and perfect. Thank you! The key is to be able to switch back and forth in one editing session, which Preferences doesn't allow. Thank you again!Cremastra (talk ·contribs)21:41, 9 February 2026 (UTC)[reply]
@TheTechie FYI— not a huge deal, but the dropdown doesn't activate during page creation: possibly because despite containing "&action=edit", the URL actually ends with "&action=edit&redlink=1". No hurry, but It'd be useful if this could be sorted out.
Feel free to remove it from TTUT whenever you need to; I can fork the relevant code over to Wikisource. Thanks!Cremastra (talk ·contribs)18:22, 13 February 2026 (UTC)[reply]
@Cremastra, yeah it's quite hacky, you can fork it over if you want. Let me know if you do, then I'll remove it (it seems quite hacky and is utterly broken in the 2017 editor).TheTechie[she/they] |talk?19:46, 13 February 2026 (UTC)[reply]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Wikipedia:User_scripts/Requests&oldid=1338200894"

[8]ページ先頭

©2009-2026 Movatter.jp