Wikipedia:User scripts/Requests

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
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 at Wikipedia:Bot requests instead.

All user script-related requests are welcome, whether they be 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 not already exist. For a list a user scripts, see this list.

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


2001 – 2019[edit]

Some ideas[edit]

Some ideas copied from User:Enterprisey/Dashboard. If you make one of these scripts, strike the entry and add a link to your script.

Still not done?
  • A user script to display the same info as PleaseStand's script, but in a very compact way so it doesn't cause reflow when the info shows up - also incrementally showing the data as API responses get back would be cool
  • A user script to expand a diff until it covers all contiguous edits made by that user (if a user made three consecutive edits and you view the diff of the middle, pressing a button should expand it to cover all three) (L235 suggestion)
    • User:Nardog/Consecudiff is close, which adds links to diffs of consecutive edits rather than expand the diff you're viewing. Nardog (talk) 20:14, 1 February 2021 (UTC)
  • A user script to give you a browser push notification when you get a Wikipedia notification
  • A user script so that whenever you go directly to a section, the section gets floated so that the header gets locked to the top of the screen. This will theoretically prevent the text from jumping around as the rest of the pages load. Now, the hard part is making sure that this script runs before the rest of the stuff making it jump around.
  • A user script to quickly switch between tabs, on pages that have tabs at the top (WikiProjects, village pumps, etc)
  • A user script to make stuff clickable in diffs. (Section headers, line numbers, etc.)
  • A user script to highlight which content (in the HTML) comes from which template (suggested by MusikAnimal over IRC 23:18, 7 January 2019 (UTC))
  • A user script to say where a given template is being used. How to do it: call the Extension:TemplateSandbox endpoint (the one that gets hit when you do the "Preview page with this template" text field on a template edit page) with the wikitext of that template (but with a yellow border), and previewing the current page.
  • A user script that provides a button to mark all reverts (i.e. pages displayed with an edit summary that includes the word "reverted") as "visited" in the watchlist (suggested by Natureium)
  • A user script to automatically add unsigned/undated templates
  • A user script to show a pop-up section preview when you hover over its TOC link
  • A user script to put the current AIV count in your toolbar, Stack Overflow mod style.
  • A user script to move discussions
    • Convenient Discussions allows this ―Qwerfjkltalk 06:22, 17 July 2021 (UTC)
  • A user script to hyperlink "per X" to the last comment X made
  • Edit just one section w/ "true" (no server-roundtrip) live preview
  • Minimap for big diffs
  • A user script that removes newsletters and other recurring messages while viewing a talk page
  • There should be a way to jump directly to a user's comment from the history page (or, more broadly, if a diff consists of just a few lines being added in one place, to jump directly to those new lines instead of just to the top of the section). Implementation notes: Parallel fetch diff (mw:Api:Compare) and current wikitext, then split the wikitext by lines, go from the line number (from the diff HTML) to a string index into the wikitext, add a sentinel marker at that point, run it through Parsoid, find the sentinel, go up in the MediaWiki DOM to highest "paragraph" (or list element, for discussions), obtain the start and end string indices of the added region in the paragraph, pack up the (section header, paragraph index, start idx, end idx), reload the page with that 4-tuple in window.location.hash, and do the jump.
  • Replace page titles in watchlist & user contribs pages w/ their shortcuts for readability


Done
  • Make a user script that is bound to a keyboard shortcut and pops up a modal where you can type a section header on the current page (auto-completed, of course) and jump to it User:TheTVExpert/searchForSection
  • A user script to unify the "Alerts" and "Notices" icons (might not even be possible, but it would be cool if it happened) (see screenshots for the old icon with no notifications and one notification) User:Enterprisey/simple-notifs
    • The API supports getting alerts and notification at once, completely possible.BrandonXLF (talk) 20:03, 18 December 2019 (UTC)
  • A script that puts a tab at the top of user script pages & user script documentation pages, to allow switching between them User:TheTVExpert/scriptDocumentationTabs
  • A user script that takes an oldid and takes you to the deleted revision (idea was L235's, I think) User:Enterprisey/link-deleted-revs
  • A user script so that whenever you click on a "hist" link in a user contribs page, the resulting page history highlights all contributions by that user (also has form on history page to perform such highlighting) (link)
  • A user script to make a single section edit, without reloading the whole page (shoutout to Gryllida for the idea)
  • A user script that redirects accidental navigation to 404's ending in a slash (say, Foo/) to the normal page (Foo)
  • In diffs, show previews for both the old and new versions (with anchors to allow jumping)
  • A link at the end of every comment to the diff in which it was added. Needs some thought about how to make this as efficient as possible.
  • Holding down CTRL lets you click into any template or link in the edit window

GUYWAN ( t · c ) 19:33, 5 December 2019 (UTC)

2020[edit]

Please Read the FAQ[edit]

I hope this doesn't seem bitey, but it would be so helpful to have a script that could let me answer/close a post with a kindly-worded "Please read the FAQ" message on articles that are getting huge numbers of redundant posts for days and weeks on end after a major incident. It's a major time-waster for editors. —valereee (talk) 18:42, 11 November 2020 (UTC)

Valereee, is this just a script to reply to a person on a talk page with that message, your signature, maybe a ping, and using the proper indent? Does the script need to add {{archivetop}}{{archivebottom}} around it? Any other requirements? –Novem Linguae (talk) 14:03, 10 December 2020 (UTC)
Novem Linguae, ideally it would be able to answer and close a discussion or semi-protected edit request, in the case of a semi-protected edit request also mark it answered, but not archive it. I usually don't archive early as I'm hoping other new editors coming in to make similar requests will see there are already ten on the page and maybe not ask after all. :) —valereee (talk) 15:32, 10 December 2020 (UTC)
Some sort of language like, "Hi, and welcome to Wikipedia. The edit you're requesting has been discussed multiple times. For more information, see the FAQ at the top of this page. Thank you!" —valereee (talk) 15:33, 10 December 2020 (UTC)
clock In progress User:Novem_Linguae/Scripts/edit-request-read-faq.jsNovem Linguae (talk) 17:37, 10 December 2020 (UTC)
Sorry. I haven't had as much time to work on this as I would like. I will try to finish this when I get some free time. Also, I ran across another tool that doesn't do exactly this, but might be helpful for quickly replying to edit requests: User:Jackmcbarn/editProtectedHelperNovem Linguae (talk) 07:32, 28 December 2020 (UTC)
@Novem Linguae, that .js -- is that safe to install and try, or were you saying it's not quite ready for prime time yet? —valereee (talk) 11:09, 12 June 2021 (UTC)
 Done. Valereee. Hello there! I'm happy to report that I spent a few hours on it this morning and got it working. Feel free to install and use. It probably has some bugs, please check carefully each time you use it, and please report any buggy diffs. Happy editing. –Novem Linguae (talk) 14:03, 12 June 2021 (UTC)
Wow, thanks! Will do! —valereee (talk) 14:05, 12 June 2021 (UTC)
@Valereee: I think this one is relevant and probably may be reused: User:Enterprisey/reply-link. You can configure it in your commons.js to point out to the FAQ like so: window.replyLinkPreloadPingTpl = "Please, READ [[Wikipedia:FAQ]]"; . AXONOV (talk) 09:46, 14 May 2021 (UTC)
An addition to DannyS712's User:DannyS712/DiscussionCloser.js ? Cabayi (talk) 10:31, 14 May 2021 (UTC)

GAN User script[edit]

Hi! I'll preface this and say my coding knowledge is very basic. I did make an effort to complete this myself, but I'm better at forking existing scripts than writing a new one. Some of this is quite personal to me, but easy enough to make this more useful to more editors. This would only be of help to serial nominators of GANs though! Here's what I've been looking to get:

When attempting to nominate an article for WP:GAN, you need to {{subst:GAN|subtopic=X}} on talk page. I'd like to add this, plus some additional actions in one go.

  1. {{subst:GAN|subtopic=X}} onto talk page of article being edited. Maybe a pop-up box for |subtopic, and |note.
  2. Adds page to User:Lee Vilenski/GANs or, substitute the user's page. Create if not already exists. I think this is [[{{{USERPAGE}}}/GANs]] - you'd know better than I.
  3. Potentially the most difficult, it watchlists /GA# page, such as Talk:2020 World Snooker Championship/GA1 or Talk:League of Legends/GA2 for example.

For future enhancement, most Wikiprojects have a nominations pane, it'd be nice for this to automatically add to these if possible (probably needs some sort of case-by-case addition.

In addition, something that closes GANs might also be good. To do:

  1. Close the discussion on the GAN page.
  2. Change {{GAN|subtopic=X|nominator=Y|page=Z|etc.}} to {{GA|subtopic=X|page=Z|~~~~~}} or {{failed GA|subtopic=X|page=Z|~~~~~}} on talk page of article dependent if GAN passes or fails.
  3. Change ratings on all WikiProjects to GA (or leave alone if failed).
  4. List article at WP:GA - this may need a drop down as to where it needs to go within the lists.

I think this is quite an ask, but if anyone wants to help me work on this, let me know. I'm happy to give some more specific steps if wanted :). Best Wishes, Lee Vilenski (talkcontribs) 09:56, 23 November 2020 (UTC)

@Lee Vilenski: Interesting. For creating nominations, I already have a DYK-helper.js and GAR-helper.js. Would love to complete the collection by bundling in GAN, FAC, FAR, etc. A GAN nomination script is pretty straightforward but the unusual thing is actually #2 since every person may have their personal GAN log formatted in a different way and we wouldn't know. One way to go about it is to make it an opt-in function which blindly appends * [[Article name]] to the page, leaving it upon the user to ensure that such an addition would fit into the formatting of the page.
As for a closure script, I think it also needs to handle options like WP:GAN/I#HOLD and WP:GAN/I#2O?
Also, since you say did make an effort to complete this myself is that code available so that i can take parts from it? – SD0001 (talk) 18:15, 23 November 2020 (UTC)
I didn't get it far enough into doing so. I spent a little bit of time, and panicked at the scripting that is far above my head! I suppose the thing about #2 is that it wouldn't be too difficult to change the place, and I would likely just set my nominations page to transcribe.Best Wishes, Lee Vilenski (talkcontribs) 18:38, 23 November 2020 (UTC)
@Lee Vilenski:  Done for first part. See User:SD0001/GAN-helper.js. For logging, you can specify page name and the log entry in the interface. – SD0001 (talk) 21:09, 23 November 2020 (UTC)
That is some quick fantastic work! I've asked some friends to also test this out as I don't have anything written to nominate now. The interface looks fantastic. Best Wishes, Lee Vilenski (talkcontribs) 21:17, 23 November 2020 (UTC)
Ha, I mostly just copied stuff from GAR-helper and changed things here and there ... – SD0001 (talk) 21:24, 23 November 2020 (UTC)

Hi SD0001 - I've been using your script a lot, it's been super helpful. I wonder if you'd be interested in something for closing GANs. Here's the list that I would want it to do:

  1. Close the discussion on the GAN page, either pass or fail.
  2. Change {{GAN|subtopic=X|nominator=Y|page=Z|etc.}} to {{GA|subtopic=X|page=Z|~~~~~}} or {{failed GA|subtopic=X|page=Z|~~~~~}} on talk page of article dependent if GAN passes or fails.
  3. Change ratings on all WikiProjects to GA (or leave alone if failed).
  4. List article at WP:GA - this may need a drop down as to where it needs to go within the lists. I think this is the hardest bit, but let me know what you think.

Currently, I think this is the most strenuous part of the review process, as you generally have to edit at least three pages at the bare minimum just to close the GAN. When I close, I currently use discussion closer and rater to do the work, but I think this could be a lot more convenient. Is this something we could automate? There's a lot of people who do hundreds of reviews, and this might just make it a little bit more streamlined. Best Wishes, Lee Vilenski (talkcontribs) 19:39, 23 July 2021 (UTC)

2021 Q1[edit]

FUR[edit]

I want a script that adds FURs of the user's choice, similar to WP:FURME. --Kailash29792 (talk) 17:44, 13 February 2021 (UTC)

+1 this would be amazingly useful. Just a simple script to fill in the parameters of {{logo fur}} would even be useful. — Berrely • TalkContribs 18:54, 1 July 2021 (UTC)

Mass rollback selected contributions[edit]

This is more of a nice to have than anything that will be super widely used, but I figured I might as well propose it anyway. There are currently two scripts enabling rollbackers to mass-revert edits by a given user from Special:Contributions with a summary: Writ Keeper's massRollback just reverts all edits, and Kangaroopower's Mass Rollback reverts either the last 50 or the last X edits. Both of those are very useful, but don't work in some edge cases where a large number of edits needs to be reverted, but indiscriminate reversion would be inappropriate. I'm mostly thinking of good-faith but erroneous mass-edits that are discovered after the user in question has already made further edits, which makes rolling back the last X contributions infeasible, or block-evasion reverts where many edits need to go, but the reversion of some of them would e.g. reinstate vandalism or remove unblock requests. What I'd be looking for is a script that allows both "indiscriminate" mass-reversion and reversion of edits selected with a tickbox (with a summary), similar to the revision deletion feature in mediawiki or Enterprisey's cv-revdel – coupled with Navpopups, this would speed up bulk reversions significantly. Blablubbs|talk 12:26, 25 March 2021 (UTC)

Might be easy enough for @Writ Keeper to incorporate in the existing script? – SD0001 (talk) 12:57, 28 May 2021 (UTC)
@SD0001 (and Blablubbs, if you're still around): I went ahead and did this. You should see a column of checkboxes, along with a new button called "rollback selected"; the interface should be straightforward. Of note if you're an admin: just for this script I tried to keep the UI as simple as possible, but it hooks into the same interface that my massRevdel script uses, and the revdel script will give you a few more controls (select all/select none/invert selection). As always, let me know how it works if y'all use it. Writ Keeper  21:02, 28 May 2021 (UTC)
Awesome! Thank you. :) --Blablubbs|talk 21:17, 28 May 2021 (UTC)
@Writ Keeper: I was just about to try this, but I'm missing the checkboxes – does the script rely on the default mediawiki checkboxes that are used to change visibility and tags? If so, then I think this feature may currently be limited to sysops. --Blablubbs|talk 07:47, 30 May 2021 (UTC)
@Blablubbs: Oh dang! You're quite right, thanks for letting me know. Sometimes I forget to check how the interface might be different for non-admins. Should be fixed now! Writ Keeper  15:10, 30 May 2021 (UTC)
@Writ Keeper, thanks, they're showing up now. Sorry to ping you again about this, but I just tried to run a mass-rollback on a /64 and the script refused; not sure if this is reproducible, but could it be related to your recent changes to the script? --Blablubbs|talk 20:24, 31 May 2021 (UTC)
@Blablubbs: Honestly, my vague memory is that that behavior is not new, and there are technical issues that prevent it from working on IP ranges. Not sure though; I'll take a look. Do you remember it working for IP ranges previously?
EDIT: No, I see that I have code specifically for handling the case of an IP range, so not sure what that's about. Looking into it. Writ Keeper  21:02, 31 May 2021 (UTC)
DOUBLE EDIT: Aha! Bug found and squashed. Should be working for IP ranges now. Thanks for the bug report! Writ Keeper  21:30, 31 May 2021 (UTC)

2021 Q2[edit]

Scripts Request[edit]

I need a Scripts with which to replace the main page by removing the redirected page in any namespace. Ex- [[বাংলাদেশ|Bangladesh]] →[[Bangladesh|Bangladesh]]. If there is already a Scripts to do this, please provide a link or not can anyone work to make it. Please ping me to reply -Shakil Hosen Talk 18:04, 16 April 2021 (UTC)

Hey Shakil Hosen, you might want to take a look at AWB. EpicPupper (talk) 16:25, 31 May 2021 (UTC)

Thank links in talk pages[edit]

Is there, or could there be, a script that puts thanks links on talk pages? Evad37's excellent TimestampDiffs already puts the diff link on each comment date; I'd imagine picking the oldid from that to put on a (thanks) link would be a breeze, no? — 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚 (talk) 06:03, 12 May 2021 (UTC)

@Guarapiranga Aren't there a couple of tools around that do this already? One I know is c:User:Jack who built the house/Convenient Discussions. – SD0001 (talk) 12:55, 28 May 2021 (UTC)
Just now I've disabled Discussion Tools to try this, @SD0001. So far: Wow! — Guarapiranga  06:24, 21 July 2021 (UTC)

Warn about syntax & template errors when saving[edit]

When I click "Save" the script should warn me about syntax errors or template errors I created --Distelfinck (talk) 16:47, 23 May 2021 (UTC)

CCI[edit]

A tool to sort through the edits made by a contributor. Heart (talk) 21:23, 31 May 2021 (UTC)

Hi, HeartGlow30797! Answering here in my capacity as both CCI editor and userscript developer. "sort through" here is quite difficult to interpret. You mean sort the diffs by something else than size? Or navigate through each diff sequentially? Or something else? In any case, each diff by a contributor is sorted through manually and checked by the CCI editor using a set of tools or using their set of skills. There's no way to automatically check for copyright violations, as in most cases the tools are not enough to detect copyright violations. For example: Earwig's Copyvio Tool can detect violations of live webpages, but can't detect violations from pages which are already 404'd from existence. Likewise, it can't handle book violations and violations from other offline sources. So there's no easy way to simply "sort through" edits, especially when some cases are complex and have large pages of thousands of edits. Chlod (say hi!) 21:45, 31 May 2021 (UTC)

PINOFF (Pages In Need Of Fixing Finder)[edit]

A script which searches the wiki for articles with lots of templates like {{Citation Needed}} and adds the top ten to a table in my userspace, than sorts the table in order of most templates. Template pages, talk pages, and documentation pages will be ignored. I will try to develop a script, but I would like if someone helped me by providing some basic code. 'Ridge(Conversation|Fascination|Imagination) 13:16, 2 June 2021 (UTC)

Unoriginally Named Editor. Might need a bot for this one. WP:BOTREQ might be worth investigating, if others agree that this is a good task for a bot. As for how to implement... I wonder if there is a way to query the replica database and see how many times a template is transcluded on a specific page? –Novem Linguae (talk) 13:31, 2 June 2021 (UTC)
My words say 'OK. I'll check with others.' but my thoughts say 'Welcome to the world, lil' Unoriginally Named Bot.' 'Ridge(Conversation|Fascination|Imagination) 13:45, 2 June 2021 (UTC)

Wikilink News Citations[edit]

The idea would be to identify a list common sources in the publication= field of a news citation, and use the script to wikilink them to the relevant page.

For example, Reuters to Reuters or New York Times to The New York Times. — Preceding unsigned comment added by RoanokeVirginia (talkcontribs) 10:28, 7 June 2021 (UTC)

There is no |publication= parameter in cs1|2. When Reuters or AP or AFP or other news agencies are directly referenced, their name goes in |work=. When The New York Times or San Francisco Chronicle or other news papers are referenced, their names (without italic markup) go in |newspaper= (or optionally, |work=). When citing a news source that is using work from a news agency (Reuters, AP, AFP, etc), the agency name goes in |agency= and the news source name goes in the appropriate 'work' parameter. None of these types of names belong in |publisher=.
I would otherwise object to this script because, in general, wikilinking every news source name just because it is a news source name seems to me to be sea-of-blue-like clutter. Wikilink news sources that are not familiar so that readers can easily evaluate that source's reliability; common sources, like the two you mentioned, do not need to be wikilinked to establish their reliability.
Trappist the monk (talk) 15:08, 14 June 2021 (UTC)

External to internal links[edit]

A script for changing external links to internal links if applicable. ― Qwerfjkl | 𝕋𝔸𝕃𝕂  (please use {{reply to|Qwerfjkl}} on reply) 20:32, 23 June 2021 (UTC)

meta:User:TMg/autoFormatter claims to fix this problem. You can find a list of pages at CheckWiki error 90. – Jonesey95 (talk) 21:46, 23 June 2021 (UTC)

Previous warnings[edit]

It would be a timesaver for me to have a script that would show me previous "month year" sections heads on user talks, which is commonly how warnings are sectioned, maybe allowing me to limit to just the past year or two. I usually scan the section heads in the history, but I'm sure I miss things, and others probably do too: Special:Permalink/1030562622#User:Ulises142 - When a user receives three final warnings, and yet continues vandalizing. It would be good if this caught section heads that were later changed. —valereee (talk) 18:31, 26 June 2021 (UTC)

Script for coordinates[edit]

Using {{coords}} is a painful template, especially when you are trying to add coordinates en masse. A script that allows you to quickly edit and add coordinates would be greatly useful. — Berrely • TalkContribs 17:28, 28 June 2021 (UTC)

Hi, Berrely! "Add" is a bit of a broad term: a userscript won't really know where to add a {{coord}} template unless it's been pointed to. I'm assuming you mean right above category links (or replacing {{coord missing}}) per WP:ORDER? Chlod (say hi!) 09:46, 9 November 2021 (UTC)
Chlod yep, that's it. Ideally there would also be an option to put it in the Infobox, but that would probably be a bit too complex. — Berrely • TalkContribs 13:25, 9 November 2021 (UTC)
@Berrely:  Done! See User:Chlod/Scripts/Coordinator for the userscript. If you have any concerns, bug reports, or additional requests, feel free to give me a ping. Face-smile.svg Chlod (say hi!) 08:14, 12 January 2022 (UTC)

2021 Q3[edit]

Mass-patrolling at Special:NewPages[edit]

I'd like a script that allows a user to select multiple unpatrolled pages at Special:NewPages and mark them as patrolled, without leaving the page. This would be useful in patrolling, for example, talk namespaces, where the vast majority of creations are good and can be quickly patrolled without going to the page itself. Elli (talk | contribs) 20:01, 6 July 2021 (UTC)

Script requests[edit]

Copied from User talk:DannyS712#Script requests
Please can you make these scripts (ordered by prority):

  1. A copy-vio check for AfC (similar to User:DannyS712/copyvio-check)
  2. A one-click undo button(User:BrandonXLF/AJAXUndo)
  3. (If possible) A script which replaces alert notifications and input boxes with text boxes (because alert notifications don't appear for me)

Thanks! ―Qwerfjkltalk 18:45, 11 July 2021 (UTC)

Also move articles and sub-categories when moving a category[edit]

Do you guys have any scripts that combine Cat-a-lot and SpecialːMove?
UnnamedUser 20:43, 17 July 2021 (UTC)

Timestamp anchors in talk pages[edit]

I've been using Evad37's excellent TimestampDiffs script to effectively link comments in talk pages, but what would be most useful, instead of sending the reader to a diff page, is simply put anchors in the timestamps, and be able to link them in the comment. Is there a script already that does that? I couldn't find any at either WP:USLIST or WP:USRANK. Incidentally, it seems to me that this would be an easier job than what Evad37 did in TimestampDiffs, as the script wouldn't have to parse the history page at all. If it could jig the css to shade the linked comment, that'd be a bonus! — Guarapiranga  23:51, 20 July 2021 (UTC)

That makes little sense. Such links won't work unless everyone installs the same script. Nardog (talk) 23:54, 20 July 2021 (UTC)
Could the anchor links perhaps be made accessible to anyone by putting a templatestyle on the page? — Guarapiranga  01:54, 21 July 2021 (UTC)
No, anchors cannot be added via CSS. Nardog (talk) 02:22, 21 July 2021 (UTC)
Right! Pity timestamps aren't anchored already. — Guarapiranga  05:56, 21 July 2021 (UTC)
... like that. — Guarapiranga  06:09, 21 July 2021 (UTC)
That would result in invalid HTML if multiple comments were made within the same minute on the same page. You may give them unique IDs with serial numbers, but then that would result in links pointing to different comments than intended after they are archived. Besides, it's hardly useful to jump to a signature, which is at the very bottom of the comment. But on the flip side, it's often not easy to determine with certainty where a comment begins. Talk pages are in such chaos that I've come to feel any attempt to improve the experience client-side is a fool's errand... Nardog (talk) 17:58, 21 July 2021 (UTC)
I just realised c:Convenient Discussions already does that! So there, TWIMC, that answers my question: Is there a script already that does that? There is: c:Convenient Discussions. — Guarapiranga  06:30, 21 July 2021 (UTC)
c:User:Jack who built the house/Convenient DiscussionsQwerfjkltalk 20:05, 23 July 2021 (UTC)
@Guarapiranga Hi, it appears the reply tool subscribe function gives a link like this (from the notification panel): https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)?markasread=226456919&markasreadwiki=enwiki#c-Rummskartoffel-2021-08-28T11:53:00.000Z-Shushugah-2021-08-27T22:10:00.000Zto
Not sure if this helps. ― Qwerfjkltalk 12:01, 28 August 2021 (UTC)

Contraction fixer[edit]

I'd like a user script that turns contractions into proper phrasing per MOS:CONTRACTION. Should be easy to code. WIKINIGHTS talk 16:11, 9 August 2021 (UTC)

Taking up the mantle of an almost completed peer review javascript bot[edit]

Hi all. Hope that you're well during these crazy times. I know this is technically a bot request but owing to the use of Javascript User:GreenC pointed me here. I was wondering if someone could take over a JavaScript bot request from a user who's now retired? (Wikipedia:Bots/Requests for approval/AWMBot 2)

Short summary of the problem is - old peer reviews are linked using CURRENTPAGENAME/ArchiveX. That means though when a page gets renamed, the link is lost. We have now about 680 broken reviews in this manner and a user created an almost complete javascript bot to fix it (code available via the bot request). There was only one slight problem which was that sometimes duplicate parameters got inserted into the fixed up peer review template. If you had time I'd be very very grateful to have this fixed up. Once this is done I plan to insert the peer review links into all the outstanding old peer reviews but can't do this until the broken ones are fixed up.

Fingers crossed! Tom (LT) (talk) 07:16, 19 August 2021 (UTC)

Help request[edit]

Hey there! I'm pretty sure this is not the best place for this request so I do apologize beforehand. In SqWiki we have this extra CS1 error tracking category for citations missing the language parameter. (I'm an admin there.) It has around 11.500 entries. It would be good if we could decrease that number (solve that error) in any way possible. We don't have an active technical community in SqWiki, me being the only user that deals with that aspect. In this situations, I thought asking for help here. Is there any kind of bot that could help me with this? Or maybe even user scripts that could semi-automatize the process of finding the language of the citation and inserting it in the templates. Of course, I'm mostly talking about citations coming from webpages because I don't believe bots and scripts could be much of help in book citations and other of the sort. Any idea that helps decrease that number even partially is much appreciated. - Klein Muçi (talk) 21:24, 4 September 2021 (UTC)

Idea:: action=languagesearch API, which returns language codes based on the characters used in the input string, can be used to detect the language, but i have no idea how can we get a string from those citations and pass it to search parameter. Jeeputer (talk) 13:14, 25 September 2021 (UTC)
@Jeeputer, sorry for not replying for so long. Only now I'm seeing this. Unfortunately I can't progress your idea any further either. But thank you for trying to help! :) - Klein Muçi (talk) 20:40, 11 October 2021 (UTC)

restore the Wikipedia Citation Tool for Google Books[edit]

  • The Wikipedia Citation Tool for Google Books (which was at https://reftag.appspot.com/) seems to be permanently broken. That tool was absolutely invaluable to me. I do not remember who wrote it. If anyone could rewrite it, or get a copy of it and host it, it would be a tremendous service... ♦ Lingzhi.Random (talk) 06:09, 22 September 2021 (UTC)
    The source code is available under GPLv3 at https://github.com/Apoc2400/Reftag. Somebody recently said they would pick it up, but I don't know what has become of that. – Rummskartoffel 16:31, 24 September 2021 (UTC)
    • @Scarpy:, @Shushugah: Thoughts? Comments? ♦ Lingzhi.Random (talk) 17:59, 24 September 2021 (UTC)
      @Lingzhi.Random: Have been trying to carve out some time fork the code and debug. I will pledge to spend two hours on it this weekend. Not sure what happened to the original author. (P.S. is it Random like Random from The Chronicles of Amber? Or just a random Random?) - Scarpy (talk) 21:28, 24 September 2021 (UTC)

() I freaking love The Chronicles of Amber. Much better than Game of Thrones. But no, my Random is just.. there was a Ling.Nut, a Ling.Nut2, a Ling.Nut3, then a Lingzhi, a Lingzhi2, and... the numbers became overwhelming... Thanks!! ♦ Lingzhi.Random (talk) 23:00, 24 September 2021 (UTC)

2021 Q4[edit]

A user script to make formatted edit requests[edit]

See this request. If there were a script that somehow made it easier to submit requests formatted like that, I'm sure people would like it. Enterprisey (talk!) 06:47, 1 October 2021 (UTC)

@Enterprisey Since edits are usually done in a sandbox, it's easy to generate a Special:ComparePages link that shows the diff – a while ago, I created Template:Sandboxed edit request to facilitate doing this easily. Not sure how a script can help. – SD0001 (talk) 07:43, 1 October 2021 (UTC)
Yeah, the idea is to show the diff table itself, to avoid having to click on a link. Enterprisey (talk!) 01:51, 2 October 2021 (UTC)
It would be nice if, for simple edit requests (not just template requests), You could use the script to "edit" the articles, but instead of saving the edit, it would post a formatted edit request. ― Qwerfjkltalk 07:20, 2 October 2021 (UTC)
That sounds like quite an idea. Parallely, it would be good to have a tool for responders to apply the suggested edit in two clicks (one for generating the edit, another for confirming it). – SD0001 (talk) 09:01, 4 October 2021 (UTC)
@SD0001 Hopefully, that could be implemented in the.main edit request script, User:Jackmcbarn/editProtectedHelper. ― Qwerfjkltalk 17:57, 25 October 2021 (UTC)

Vector/Timeless background color customizer script[edit]

So i want to change my background colors from the basic grey and white and due to my limited knowledge of javascript, i cannot figure out any of that stuff. I want a script that adds a button to the menu (pop-down on Timeless) and allows you to change 4 of the colors, 1 for The top bar. 1 for the secondary background (the grey portion), 1 for the main background (the thing where the text stands) and 1 for the text itself. MoonlightVectorTalk page 17:47, 6 October 2021 (UTC)

Rotating through lists[edit]

I just create the Go portal. In it, I created a box showing the top international title holders. The code for that is: {{#lst:List of top title holders in Go|titleholders}}. To make this work I added a section "titleholders" to part of the article List of top title holders in Go. This seems to work fine. Now, what I'd like to do, and I can't seem to figure out how to make it work, is to rotate through the various lists of title holders in the article List of top title holders in Go. For example, the next list in the article is for "Continental" title holders. I know how to display that list with appropriate code, i.e., {{#lst:List of top title holders in Go|Continental titleholders}} with an appropriate section label for that list. The problem is how to make a template or other script in the portal that will allow switching form one list to the next. It would be a bit like a slide show, as with {{Transclude linked excerpts as random slideshow}} except I need it to be clear when you select one list or another. Ideally, I would create a horizontal list of links for "International", "Continental", "China", etc., and the reader could click on the type and the list would automatically update. Alternatively, there could be a left/right arrow above the list and the reader could simply click to advance through each list with an appropriate label appearing above the list. I would appreciate any help understanding how this can be done. Coastside (talk) 06:39, 9 October 2021 (UTC)

Autohighlighting specific characters. (Greek)[edit]

I'd like to know if there is a tool (js, I guess) that if turned on, will highlight specific characters in an article. At this point I'm looking at articles that my search has said have a latin alphabet character next to a greek one, and I'd like to easily see in the article where that is. So for example, if both ΦΒΚ and ΦBK are in an article, I'd like to have all of the first one highlighted and only the Phi highlighted in the second (the first has Beta and Kappa, the second has B and K). I'd like it to be a little flexible, since I'd like to be able to add the accented greek letters as well as the Lunate Sigma (the version of Sigma that looks like a C. Naraht (talk) 15:10, 10 October 2021 (UTC)

Add WikiProject templates to subcategories[edit]

I would like to add {{WikiProject Go}} to the talk pages of all subcategories of category Go (game). Needless to say, I would only want to add it to the talk page if it isn't already added. Is there a bot or script that can do this? Coastside (talk) 06:25, 11 October 2021 (UTC)

I think EarwigBot Task 14 may be what you are looking for. – Rummskartoffel 11:32, 11 October 2021 (UTC)

GUI for voting[edit]

Hello! I was trying to find a way to make participation in voting easier for my homewiki (SqWiki) by introducing some kind of graphical user interface for adding templates like pro/against/neutral (preferably with a text box that asks for a rationale behind that vote) in "elections"/discussions. I asked around and found this script and my intention was to localize it into a gadget but unfortunately the script makes use of hard-coded EnWiki pages which made it hard for me to modify it. I tried contacting the creator for help but he wasn't available so... Is there any other script/gadget which is "more malleable" that I can use for my case? Maybe someone with extra free time can help me create one from scratch? - Klein Muçi (talk) 20:47, 11 October 2021 (UTC)

PS: Please ping in case of answers. - Klein Muçi (talk) 20:53, 11 October 2021 (UTC)

Cross wiki POTD[edit]

Hey, Hope you are doing well. Since small wiki's don't have enough contributors to help in Featured picture section, I was wondering if someone can come up with an idea to get En.wikis POTD featured on these wiki's. Actually this was a suggestion from another user at Ks.wiki. Thankyou signed, Iflaq (talk) 17:21, 26 October 2021 (UTC)

@Iflaq: This might be better implemented as a bot that automatically pulls in the {{POTD}} subpage of the current day and saves it to a page on ks.wiki. This could be implemented in the wiki's MediaWiki:Common.js but I advise against it due to performance issues (besides the fact that it won't show up for any user who doesn't use JavaScript). Chlod (say hi!) 09:39, 9 November 2021 (UTC)

External Link to internal link[edit]

Hi, how about a user script that could turn external links into internal in some sort of way? It would look better. Thanks. ― ItcouldbepossibleTalk 07:16, 26 December 2021 (UTC)

@Itcouldbepossible: See m:User:TMg/autoFormatter#Internal links. ― Qwerfjkltalk 13:01, 26 December 2021 (UTC)
@Qwerfjkl Ok thanks. ― ItcouldbepossibleTalk 14:53, 26 December 2021 (UTC)
@Qwerfjkl But does it have anything to do with turning external links into internal? Can you tell me which part you are telling me to read? ― ItcouldbepossibleTalk 14:56, 26 December 2021 (UTC)
@Itcouldbepossible: Under Internal links, it says it can [r]eplace weblinks to other projects and languages with prefixed internal links if possible. ― Qwerfjkltalk 16:45, 26 December 2021 (UTC)
@Qwerfjkl Thanks for the user script. I have installed it to my global.js page. ― ItcouldbepossibleTalk 07:12, 27 December 2021 (UTC)
Can you give some example inputs and outputs? Would only be able to do this for links like [https://en.wikipedia.org/wiki/Test Test2] -> [[Test|Test2]] (internal domains). –Novem Linguae (talk) 17:31, 26 December 2021 (UTC)
I don't think so (you can test it yourself). Sorry for the late reply! ― Qwerfjkltalk 21:06, 12 January 2022 (UTC)

2022 Q1[edit]

Opening pages in new tab with modifier key[edit]

I would usually write my own scripts, but this one is a little more not straightforward so I thought I'd ask for help with it and it can be a learning experience :)

Anyway, let me describe my issue. When I'm editing wikipedia, I often want to open other pages to read them, get info from them, clarify a rule, etc. The easiest way to do this is to go to the search in the top right and type the page I want. For example, if I wanted to grab a quick deletion template, I would type wp:csd, and then down arrow, then the enter key. The issue with this is that the link will open on the current page, and there is no way to open it in a new tab. I currently take my hand off of the keyboard off of the keyboard and onto the mouse and then press the command key, which when clicking on pages opens them in a new tab. This is annoying for me as I use computers mainly with key combos and mostly using the keyboard.

With this in mind, I would like to make a script to fix this. My thoughts were modifying the search bar to open in a new tab when I have the command key held down (on mac; dunno what it is on windows). My first thoughts would be to just have a listener for onkeydown and onkeyup in the script and then setting target="_blank" when that's the case. I'm not familiar with the mediawiki javascript api in wikipedia so I don't know if this is the best way to to do things, or if using keydown listeners are something you can do in wikipedia scripts or if there is some more official api that you can use. Thanks a lot, ― Levi_OPTalk 17:08, 7 January 2022 (UTC)

Sounds like a good plan to me. .mw-searchSuggest-link appears to be the class you need to add target="_blank" to. Maybe do a DOMNodeInserted listener at first, just to get everything working. (This listener would add _blank all the time, even without a keypress.) Then once you confirm that it works, you can add the complexity of a keypress listener, whether to only add _blank while pressing, whether to remove _blank once keypress is done, etc. –Novem Linguae (talk) 18:27, 7 January 2022 (UTC)
Not only is DOMNodeInserted deprecated (and event delegation is your friend), that solution won't work because when you select an autocomplete with arrow keys and hit Enter, you're not opening the link but changing the textbox and submitting the form. Each autocomplete item is already a link, so Ctrl+click or middle click already works. Nardog (talk) 15:04, 8 January 2022 (UTC)
I have this issue as well. This sounds like a useful script. If you can't make it work, my workaround is to Cmd-click on something near the search box, like "View history" or "Sandbox", then go to that new tab and do my search. When I remember to do it, it works well. – Jonesey95 (talk) 14:08, 8 January 2022 (UTC)
Hacky but works:
$(document.body).on('keydown', '#searchInput', function (e) {
	if ((e.ctrlKey || e.metaKey) && e.which === 13) {
		$('#searchform').attr('target', '_blank');
	}
}).on('blur', '#searchform', function () {
	this.removeAttribute('target');
});
Nardog (talk) 14:48, 8 January 2022 (UTC)
Thanks for the help. This is kind of what I was looking for, and led me in the right direction. I wanted it more like the way that clicking works, where as long as cmd is held down it opens in a new tab, and it doesn't if it isn't, not if the input no longer focused. The issue is that when you have command held down, which is supposed to make it open in a new tab, pressing enter no longer does anything, because cmd+enter isn't supposed to work. To get around that I just added a listener for command enter and then made it click the search button, which will open it. Here's the code I ended up using:
$(document.body).on('keydown', '#searchInput', function (e) {
	if (e.metaKey) {
		$('#searchform').attr('target', '_blank');
        if (e.which === 13) {
            $("#searchButton").click()
        }
	}
}).on('keyup', '#searchform', function (e) {
    if (!e.metaKey) {
        this.removeAttribute('target');
    }
});
Thanks! ― Levi_OPTalk 13:55, 10 January 2022 (UTC)
I don't really know what you mean, but I used the blur event only because I had to figure out a way to remove the target attribute after a new tab was opened. keyup of course works too and is perhaps more obvious, but I figured that would get fired too often. Nardog (talk) 21:06, 10 January 2022 (UTC)

Script for reporting people on WP:AIV?[edit]

Often while reverting people's vandalism I see accounts that have done enough to be reported to WP:AIV, which I do often. The process currently involves copying their username, opening WP:AIV, editing the "User reported" section, pasting their username at the bottom, then copying the template, then pasting it at the bottom, then cutting the username from where I put it, then putting it where the default name was. This is very annoying. I find it hard to believe that no one else has had this problem and made this script, I just cannot find one in the list with a name or description that says it might fix this. I'm looking for a script with a button on the page or something where I can just put their username / ip and a reason without fussing with copying the template to the bottom as well. Thanks, ― Levi_OPTalk 14:15, 10 January 2022 (UTC)

WP:TWINKLE has this. The menu item is TW -> ARV -> AIV. –Novem Linguae (talk) 15:03, 10 January 2022 (UTC)
I knew that twinkle could do something like this; the edit summaries on aiv said they were twinkle. The issue is that now I have twinkle installed. I don't really want twinkle. I've experimented with both and I prefer redwarn over it, and now having it installed just adds more load time to other stuff, and, well, now I have lots of other twinkle stuff on my page. Does redwarn have anything like this? Is there any way to turn off all of twinkle besides just the menu? Thanks, ― Levi_OPTalk 16:13, 10 January 2022 (UTC)
You can turn of all modules apart from ARV at the Twinkle preferences page. ― Qwerfjkltalk 16:20, 10 January 2022 (UTC)
Ah. I didn't realize that you could just disable all modules besides the one. Thanks! ― Levi_OPTalk 16:23, 10 January 2022 (UTC)
@Levi OP: I'm fairly sure RedWarn can also do this, if you click on the 3 horizontal dots, then Report [user] to AIV. ― Qwerfjkltalk 18:13, 10 January 2022 (UTC)
Ah, thanks so much. Forgot that this menu existed. ― Levi_OPTalk 18:16, 10 January 2022 (UTC)

script that removes the languages on the sidebar[edit]

hello, can someone make a script that removes the languages on the sidebar? i only speak english, and it makes me irritated whenever there is a small page with a lot of languages, cause it makes the footer not really the footer anymore. look at this page, Wikipedia:General disclaimer, and scroll down and you will see what i mean. thanks! Desktop.INI 17:42, 11 January 2022 (UTC)

You can just hide it in your CSS:
#p-lang {
	display: none;
}
Nardog (talk) 17:46, 11 January 2022 (UTC)
oh. thanks for telling me! Desktop.INI 17:55, 11 January 2022 (UTC)

Script for WP:NOTBROKEN and MOS:SECTLINK[edit]

Hi. I need a script for converting unnecessary "article#section" links and piped links to available redirects per WP:NOTBROKEN and MOS:SECTLINK. A script capable of finding correct/relevant redirects. For example, if there is a "article #Section XYZ" link and there is a "redirect XYZ" to that specific section, then the script should be able to find and suggest the available redirect(s). Same for the piped links. Mann Mann (talk) 21:00, 12 January 2022 (UTC)

A script that does nothing beneficial[edit]

Hello, I wasn't sure if this was the proper place to request this kind of stuff but the community portal says "specialized script that doesn't exist yet", and I think it falls under that line. I say that because it doesn't do anything "beneficial" to make something cool for my user talk page. I had a couple of ideas for funny "notices" to put at the top of my talk page, but putting too many would make things cluttered. Instead, I came up with the idea for a script that cycles through a large selection of notices and other things; it chooses one from a list (I'm using my sandbox) of these templates and puts uses it on the talk page. Whenever the page is refreshed or purged, a new one from that list is put there (in the same spot). Is that possible? Or is this some sort of thing that can be done without using a script? Panini!🥪 14:52, 13 January 2022 (UTC)

User scripts only do things for you, not for other people. Sounds like you want this to occur whenever anyone loads a page. You'd probably want a template/module. Might want to cut and paste this over to WP:RT. –Novem Linguae (talk) 15:01, 13 January 2022 (UTC)
The code in {{Randomquote}} would probably work fine for Panini!. – Jonesey95 (talk) 15:29, 13 January 2022 (UTC)
Jonesey95, Ie been getting the results I want (still at User:Panini!/sandbox5) but it's only been showing the first six of my list (I have about fifteen). Is there something wrong with the code after I removed some of it? Panini!🥪 15:51, 13 January 2022 (UTC)
I just purged the page a few times and got items 12 (slippery), 16 (empty variable), and 17 (cat gibberish), among others. I think it's working. – Jonesey95 (talk) 19:01, 13 January 2022 (UTC)