Wikipedia:User scripts/Requests/Archive 3

Archive 1 Archive 2 Archive 3 Archive 4 Archive 5 Archive 9

Wanted: Add article onto a 'To Do' list for further action

A script or gadget to automate the addition of article titles (perhaps to a user-defined sub-page) for future monitoring and follow-up action. Effectively, this would be a 'To Do' list. Serving a completely different purpose from a Watch List, it would need to be just as easy to use. As a New Page Patroller and spell-checker, I encounter innumerable articles that need following up in some way. I desire to create a separate list of these pages to work through at some future point - possibly putting forward for deletion, or checking that pages tagged with templates have been actioned. Or I may wish simply to add pages to my 'To Do' list so I can edit them myself later. Because some of these pages rarely get edited again, using a Watch List does not help, and it would weaken the way the Watch List works for monitoring pages of real interest. I have no way of knowing whether such a tool already exists, but having a parallel Watch list for direct editorial action would, I believe, be immensely helpful to many editors. Nick Moyes (talk) 00:23, 16 June 2017 (UTC)

@Nick Moyes: See Wikipedia:User scripts/List § Todo lists. That page is good page to check for "knowing whether such a tool already exists" - Evad37 [talk] 01:56, 16 June 2017 (UTC)
Thanks so much. I had already tried looking, but must have missed the link to that section. But I've now found what I was looking for. I appreciate your assistance. Nick Moyes (talk) 10:39, 16 June 2017 (UTC)

Request for someone to take over User:Kephir/gadgets/rater

The rater tool seems to have been abandoned some years ago, but is an amazing and incredibly useful tool that is used by a lot of New Page Patrollers and other editors that frequently rate articles. Suggestions for improvement on the gadget's talk page go unnoticed by its creator and that is a big shame. Although the tool is amazing, an editor actively improving it could do some tremendous good by taking over maintenance of the tool.

  1. I also know of some wikiprojects that are not currently on its list (I have added some), but I suspect there are a ton more, which makes rating unlisted wikiprojects very difficult for those that are used to using the tool extensively (i.e. the wikiproject list needs updating to add new wikiprojects and remove dead wikiprojects).
  2. The biography wikiproject 'List as' parameter could definitely use autofill based on the most common name format (i.e. strip off any parentheses, then autofill as last, first middle+).

These are just some of the improvements that could be made to the tool. Thanks to whoever decides to help here! — InsertCleverPhraseHere 09:09, 16 July 2017 (UTC)

See User:Evad37/rater. The Transhumanist 13:33, 13 January 2018 (UTC)

Request for page blocking script

HI! I'm facing significant problems because there are many pages that I don't want to see and can cause family problems. A long discussion is taking place at Teahouse regarding this (see Blocking page view). There, it has been asked me to request a user script here which will enable me to block those pages. I request a script by which I can block articles. that I feel are not safe for me. User:Nazim Hussain Pak Sinner (talk) 14:32, 9 August 2017 (UTC)

@Nazim Hussain Pak: How would you like the script to determine what should be blocked? Hiding the content of pages from a list of pages should be fairly easy to create. Going by other criteria would be progressively more difficult, the more subjective the criteria. The Transhumanist 00:21, 5 January 2018 (UTC)

Soccerbase Script

Struway2 has made this Template:Soccerbase season page, however, this will take a lot of time to use the copy and paste and changing the ID and year parameter to every football article with the longer code version to display the references. A script would get things done easier and quicker to do. For example, changing the content from this {{Cite web| title = Games played by Matthew Lowton in 2011/2012| url = http://www.soccerbase.com/players/player.sd?player_id=53439&season_id=141| publisher = Soccerbase| accessdate = 23 June 2015}} to this {{Soccerbase season|id=53439|season=2011|name=Matthew Lowton|accessdate=23 June 2015}} would take a long time for the same user to do for every page. Iggy (talk) 11:11, 16 September 2017 (UTC)

@Iggy the Swan: is this still needed? I'm not saying, that I will do this, but... --Edgars2007 (talk/contribs) 06:41, 6 March 2018 (UTC)
@Edgars2007: - a bot has already converted the work so this is no longer needed. I'd forgotten I posted this, Iggy (Swan) 18:03, 6 March 2018 (UTC)

Tabber Script

I wish to have something like this. Artix (Message wall) 23:55, 14 October 2017 (UTC)

also, how to highlight own name in history? Artix Kreiger (talk) 21:17, 26 October 2017 (UTC)
Use Template:Page tabs --Danski454 (talk) 16:34, 3 August 2018 (UTC)

Request for Hyperlinks to other articles to show an article preview when hovering over them

I think it'd be great if, when you hover over a hyperlink to another Wikipedia article, a small box pops up giving you the first few lines and maybe the lead picture of that article. It'd sort of look like when you hover over a citation number now. I have no idea how to do this, but I think it'd be awesome if there was just a term or something that someone didn't know, that they could just hover over the link instead of having to open a new tab. — Preceding unsigned comment added by BenJenkins (talkcontribs)

@BenJenkins: Go to your preferences, select the appearances tab, and choose the "page previews" option; that should do what you want. There's also navigation popups in the gadgets section, but that's for more advanced editing features. ~ Amory (utc) 00:49, 26 March 2018 (UTC)
For a more advanced alternative to Amorymeltzer's suggestion that shows previews for non-article pages, try the Navigation Popups gadget. It's under the gadgets tab in Preferences. — pythoncoder  (talk | contribs) 22:44, 27 April 2018 (UTC)

Resource limit?

I have a simple script on meta:User:Bdijkstra/global.js to do some text replacement for visual aesthetics. On short pages it works fine, but on longer pages it seems that the script stops running after a certain point. Is there some sort of resource limit that I am hitting? --bdijkstra (talk) 16:11, 18 June 2018 (UTC)

Never mind. It turns out that the jQuery selector doesn't wait for the page to finish loading, so the script often finished execution before all content was loaded. --bdijkstra (talk) 11:53, 21 June 2018 (UTC)

Automatic Pagelinks for Categories

Is there a script that turns all links in a category to something you might see with {{pagelinks}}? For example, instead of seeing

in a category, you would see

Does such a script exist? (Similar to User:Equazcion/CatListMainTalkLinks.) If not, I'd be happy to write it up, I just wanted to check beforehand. Cheers. -- AlexTW 02:28, 15 August 2018 (UTC)

 Done Did it myself. -- AlexTW 11:39, 28 August 2018 (UTC)

Hotcat-like searchable stub sorting/stub tagging script, with hierarchy searching

There isn't currently a great script for stub sorting and stub tagging, the best I have found is User:Ais523/stubtagtab2.js, ideally we would have a hotcat-like searchable field for stub tagging. This would be useful to both New Page Reviewers, as well as to Wikipedia:WikiProject Stub sorting.

Ideally it would work as a hierarchy system somehow, using the hierarchy system at Wikipedia:WikiProject_Stub_sorting/Stub_types. For example; you would put 'school' into the field, then when you select School stubs, it would populate a scroll-able list suggesting the next level of hierarchy down (e.g. African school stubs, Asian school stubs, etc), then when you select African school stubs, it would populate a scroll-able list suggesting the next level of hierarchy down (e.g. Algerian school stubs, Kenyan school stubs, etc), and so on until you reach the bottom of the hierarchy tree. You should also be able to use the search tree to search for any stub tag, (e.g. jump directly to Kenyan school stubs).

At minimum a hotcat-like search field that you can just search in would be great, but a hierarchy system would be way better at minimising generic stub choices (a hierarchy sytem for Hotcat would also be really awesome, but that is another job entirely.

Please ping me if responding to this post. Cheers! — Insertcleverphrasehere (or here) 10:39, 16 October 2018 (UTC)

Working on it --Danski454 (talk) 14:06, 24 October 2018 (UTC)
@Insertcleverphrasehere: done: User:Danski454/stubsearch.js (doc) --Danski454 (talk) 09:49, 25 October 2018 (UTC)
Amazing! Thanks very much. — Insertcleverphrasehere (or here) 10:02, 25 October 2018 (UTC)

This script is great for adding stub categories, thanks both to @Insertcleverphrasehere: and @Danski454:! Any chance the script could make it easy to remove stub templates that are currently on the page? A common task is to remove a more general stub template and apply a more specific one. -Furicorn (talk) 19:18, 26 October 2018 (UTC)

@Furicorn: I've added a button which replaces all stub tags on the page with the selected tag, then loads the diff. --Danski454 (talk) 21:09, 26 October 2018 (UTC)
@Danski454: wow, thanks for the incredibly quick turnaround. I noticed something weird - I was trying to test it on Roman Catholic Diocese of Qinzhou by adding {{PRChina-RC-diocese-stub}} and searched "roman catholic diocese stubs". I then selected Asian Roman Catholic diocese stubs, which has two subcategories, Chinese Roman Catholic diocese stubs and Indian Roman Catholic diocese stubs. However, only Indian Roman Catholic diocese stubs shows up in the script search results, and I also get no results when I directly search for Chinese Roman Catholic diocese stubs. Any thoughts? -Furicorn (talk) 03:45, 27 October 2018 (UTC)
@Furicorn: for some reason, Chinese Roman Catholic diocese stubs was not listed on Wikipedia:WikiProject_Stub_sorting/Stub_types, (Permalink), I am adding it now. --Danski454 (talk) 09:32, 27 October 2018 (UTC)
@Danski454: thanks, I'll make sure to check that next time. -Furicorn (talk) 10:21, 27 October 2018 (UTC)

Contribs and user groups

  • I would like a script that add a link to someone's contribs and user groups in their signature. The script itself would be displayed as (C
  • G). Hddty. (talk) 23:55, 24 October 2018 (UTC)
Hddty., would WP:POPUPS work? That way, you can hover over their signature and see both of these things. Enterprisey (talk!) 09:50, 18 November 2018 (UTC)
@Enterprisey: Thanks, I didn't know that. Hddty. (talk) 02:37, 19 November 2018 (UTC)

Minimise sections

This is needed for desktop mode, since it is already there in mobile mode. This way, I can hide the plot section to avoid unintentionally reading spoilers. --Kailash29792 (talk) 09:23, 27 April 2018 (UTC)

@Kailash29792: does User:BethNaught/hideSectionDesktop.js help? It does not auto-collapse the sections (although it could be so modified) but you can use it to hide a plot section. BethNaught (talk) 11:06, 12 July 2018 (UTC)
So I just copy it onto my skin.js page and that's it? Because that's just what I've done now. --Kailash29792 (talk) 11:11, 12 July 2018 (UTC)
Now I put it on my common.js page, and voila! Thank you very much BethNaught. It now doesn't have to be on the skin page, does it? --Kailash29792 (talk) 11:20, 12 July 2018 (UTC)
No, it doesn't. BethNaught (talk) 11:34, 12 July 2018 (UTC)

AutoRollbacker

A script that would rollback automatically a persistent vandal until an admin blocks him. To prevent abuse, maybe the script would work only if the user is reported to AIV. L293D ( • ) 18:35, 6 May 2018 (UTC)

I've always wanted a script that puts the number of new edits made by a user at the beginning of the tab title (in the browser window), so that I can look over new ones as they come in. Maybe this is a more general solution. Enterprisey (talk!) 09:51, 18 November 2018 (UTC)
L293D, User:Bellezzasolo/Scripts/meganuke.js might do the trick. Flooded with them hundreds 10:46, 24 November 2018 (UTC)

Auto Copyvio check for unreviewed pages (for new page reviewers)

A script that automatically pops up a small box whenever you navigate to an unreviewed main-space page (ideally pinned to the bottom right side of the window and scrolls with the page to stay out of the way of the reviewer, similar to the Page Curation tools), in which it runs a search in Earwig's copyvio detector. This box would be grey at first (while the search is running), but would then display the confidence % result of the copyvio report and change colour to Green/Yellow/Red (depending on the confidence %). Clicking on the box would either A) 'expand' it in a window without navigating away from the page, allowing the reviewer to click on the box to expand the copyvio report, or click it again to minimise it and display only the colour coded confidence% result (ideally), or B) link to the full copyvio report page and open it in a new tab (probably much easier, but it would be better not to have to navigate away form the page).

Option to have it be not automatic would be nice (instead only launching it manually like most other scripts). It should also be able to be launched manually on articles that are already marked as 'reviewed', but this should be by default not automatic. And it should also be configurable for manual or automatic use on AfC drafts (probably default as automatic). — Insertcleverphrasehere (or here) 22:41, 19 October 2018 (UTC)

Please ping me if responding to this request. Cheers! — Insertcleverphrasehere (or here) 11:39, 16 October 2018 (UTC)

Insertcleverphrasehere, I created a script at User:FR30799386/copyvio-check.js which basically displays the cpvio percentage within the info menu of the NPP toolset. — fr 09:52, 2 January 2019 (UTC)
I like it! This will be really useful, thanks. Any chance yu could put together a brief info page for the script? It would be good to know; Does it start calculating when the page is opened, or only after you click the info button? (it seems from testing to be when the page opens, which is great). — Insertcleverphrasehere (or here)(click me!) 10:04, 2 January 2019 (UTC)
Just created a info page. The search starts when the menu of icons get fully loaded. — fr 11:03, 2 January 2019 (UTC)

Wanted:Show WikiData Q number on Wiki Articles

I'd like to see the WikiData Q number for a given article (I know its available by clicking on the Wiki link in the sidebar.) The primary reason is to speed up using the WikiData Mix-n-Match process. I often end up using an external search engine to identify the correct Wiki article, but then I have to click again to get the Q number that I need to make the association. (It would be extra nice if it worked on more than 1 language Wiki ;-) Thanks. Dcheney (talk) 05:29, 3 December 2018 (UTC)

@Dcheney: I've written something that adds the Q number to the title (similar to those on wikidata). To install on all wikis add mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Danski454/wikidata_Qnum.js&action=raw&ctype=text/javascript' ); to your global.js. Danski454 (talk) 18:20, 3 December 2018 (UTC)
Perfect! Thank you, especially for the fast response! --Dcheney (talk) 22:51, 3 December 2018 (UTC)

Undo move

Clicking the Undo button for a move on a history page goes to "The edit appears to have already been undone. You may have attempted to undo a page move, protection action or import action; these cannot be undone this way." I need a script that could make the Undo button on a history page work like the Revert button in the Move log (clicking it goes to the Special:MovePage to undo the move.) Flooded with them hundreds 14:41, 19 December 2018 (UTC)

@Flooded with them hundreds: I've written this. Danski454 (talk) 18:16, 19 December 2018 (UTC)
Incredible! Great work, it works smoothly. Thanks! Flooded with them hundreds 11:18, 20 December 2018 (UTC)

"RCpage" user script

I would like a user script that when used, creates a subpage of the user's page called RCpage (like User:Username/RCpage) and pastes the contents of User:PorkchopGMX/RCpage default onto that page. If it were a gadget I would want to call it RCpage but i'm not wanting this to be a gadget. An example of a customized version would be this. Thanks! PorkchopGMX 17:32, 24 October 2018 (UTC)

@PorkchopGMX: could you not just use {{subst:User:PorkchopGMX/RCpage default}}? --Danski454 (talk) 09:56, 25 October 2018 (UTC)

User:Bility/convert24hourtime.js

Would anyone be able to revise User:Bility/convert24hourtime.js? It hasn’t been updated in seven years and it’s quite buggy. The thanks button shows up differently, conflicts with the blocked template in Contributions page, and doesn’t work when looking at diff. -- 1989 (talk) 00:51, 10 January 2019 (UTC)

 – --DannyS712 (talk) 23:55, 31 January 2019 (UTC)

Auto-classifying bot

There is a huge backlog within most Wikipedia Projects of unclassified articles. I've been recently assessing a number of these for the Politics Project, and have noticed a few patterns that I believe could be automated to heavily reduce this backlog.

  • At the moment I believe there is a bot that goes around and updates quality tags if another tag on the project has had it's quality increased. However, it appears to only do this if there is currently a quality tag for the project. I believe this can and should be updated to do this regardless of whether there is such a tag for a project. If, for instance, it finds a page like this Talk:1842 New York gubernatorial election it should update the Politics and Election & Referendum templates for that article with the stub class tag, in the process removing that article from the list of articles that the Politics Project needs to work on - and this is not an isolated occurrence. I don't have the numbers, but I have seen this sort of thing numerous times.
  • It is also sometimes possible to discern the importance of a article with excellent accuracy from the assessment of surrounding projects. For instance, in this article Talk:1844 United States presidential election in New York it would be reasonable to take the assessment from the US/Government/PresElections taskforce, if such an assessment is low, and apply it to the politics one, because the Politics project is never going to consider an article that said taskforce considers low importance any higher than that. As such, a bot that projects could instruct to duplicate the tag of certain other taskforces or sub-taskforces, up to a certain tag, to their own taskforce is what I am proposing. Alongside the above proposal, this should drastically reduce the backlog across numerous projects that are willing to set up the instruction page for it.

And of course, if we can heavily reduce the backlog like this, we will make attempting the remaining tasks that must be classified by hand less daunting, and thus more likely to be done. It is true that the second part of this proposal will sometimes result in incorrect classification, but the criteria will be up for each taskforce to determine and so I don't believe that risk should prevent this bot being created - and even if they are incorrectly assessed, a few incorrect assessments are better than numerous unassessed articles.

If no one is interested in taking this up then I do intend to get around to it at some point - unless someone is able to explain why it is stupid/unnecessary, though I think the first part of this proposal would be better as a modification to the existing tag-update bot.

-- NoCOBOL (talk) 07:12, 25 January 2019 (UTC)

@NoCOBOL: This page is for user scripts, not bots. Your request would be best handled at WP:BOTREQ Danski454 (talk) 07:23, 25 January 2019 (UTC)
Oops. Created there. Feel free to delete from here if that would be appropriate. -- NoCOBOL (talk) 07:51, 25 January 2019 (UTC)

A bot to find links in articles that go to pages that redirect back to them

I just found and fixed an article with two Wikipedia links to two articles that were nothing but redirects back to it, and apparently that's all they had ever been. [1] Can you make a bot to check all Wikipedia links that point to pages that are redirects, then checks to see if that redirect points back to the page its coming from, and then remove the brackets around it so it doesn't link there anymore? If the link has a | in it, then keep what's after that and ditch the rest. Dream Focus 15:49, 26 January 2019 (UTC)

@Dream Focus: If you want a bot to make fully automated edits, you need to ask at WP:BOTREQ. If you just want a tool to help you during editing, or to make semi-automated edits to a particular page when you tell it to, that would be possible with a userscript. - Evad37 [talk] 16:11, 26 January 2019 (UTC)
Whoops! At Wikipedia:Bots it links to here at the top. I'll go post in the proper area. Dream Focus 16:28, 26 January 2019 (UTC)

Wanted:Categorization

I'd like to be able to add a new "drop-down" menu in the upper-right corner (in vector) (like the "More" and "TW" menus) to be able to quickly:

  1. Tag, or untag, the article as uncategorized
  2. Tag, or untag, the article as needing improved categorization
  3. Tag, or untag, the article as a stub
  4. Jump to the bottom, to add categories with hot-cat

Please ping me when responding,

--DannyS712 (talk) 03:33, 18 November 2018 (UTC)

@DannyS712:
1 checkY User:Abelmoschus Esculentus/TagHelper without untag option
2 checkY User:Abelmoschus Esculentus/TagHelper without untag option
3 checkY User:Ais523/stubtagtab2.js without untag option
4 checkY User:Abelmoschus Esculentus/Skiptobottom and install Hotcat
Abelmoschus Esculentus talk / contribs 03:40, 25 November 2018 (UTC)
@Abelmoschus Esculentus: Thanks. The 4th suggestion was really helpful, but my goal was more to be able to create a new menu than to have this specific functionality. --DannyS712 (talk) 04:01, 25 November 2018 (UTC)
@DannyS712: #1 and #2 and in general untagging of any article maintenance tag, is soon coming to Twinkle. Install User:SD0001/friendlytag.js if you want to start using it before it gets incorporated into the Twinkle standard installation. SD0001 (talk) 03:57, 1 January 2019 (UTC)
@SD0001: I'll try it out when I have the chance. Thanks for the suggestion --DannyS712 (talk) 04:34, 1 January 2019 (UTC)

Help with script for Galician wiki

Hi! I'm an admin from gl.wiki and we need your help to create an script because we don't know how implement that.

We need an script or tool that add a new option to the left menu tools, that option should add a template to the article and automatically it should send a message to the user who created the article. The idea is to add templates to very short articles and notice the users who created it at same time.

I know that at Wikimedia Commons the tool copyvio make a similar work (and other things), add the template to the file and after that it writes a comments at the uploader's page. I searched for a tool or script with similar work here at en.wiki, but I don't found nothing.

Could somebody help me with that? Bye, --Elisardojm (talk) 15:33, 31 July 2017 (UTC)

@Elisardojm: are you looking for something similar to WP:Twinkle. You can add a maintenance/deletion template on an article using it and notify the editor simultaneously. I am not sure if it is available for your wiki, but you should get to know that at WT:TW 119.82.82.228 (talk) 22:27, 18 March 2019 (UTC)
@Elisardojm: I might be able to help out - can you send me any more information about this? Specifically, is this for adding a specific template, or for a menu to choose a template to add? Thanks, --DannyS712 (talk) 23:33, 18 March 2019 (UTC)

2nd chance

See User_talk:Enterprisey#Just_wanted_to_put_out_feelers for context. I'm wondering if a script to handle the more mechanical things listed at Template:2nd chance would be possible? Thanks!! Kevin (aka L235 · t · c) 23:59, 1 January 2019 (UTC)

@L235: this seems like a pretty big request, but I'll start trying to work on it. I already have a function (User:DannyS712 test/append.js) to append content, and some of the rest seems pretty simple, albeit tedious. --DannyS712 (talk) 00:16, 2 January 2019 (UTC)
@L235: Take a look at User:DannyS712 test/chance.js. Its still VERY MUCH IN BETA, but it should trim out categories, images, infoboxes, galleries, etc. --DannyS712 (talk) 06:00, 14 January 2019 (UTC)
@L235 and DannyS712: I've written a Scribunto module, which also removes the content listed at the template (as well as the notes, references, external links sections), but does not require gadget or script installation. However, it cannot fully automate the process, only reduce it to copy page name into template and summary and save. Danski454 (talk) 19:38, 15 January 2019 (UTC)
Thank you both!! Let me take a look over the next few days Kevin (aka L235 · t · c) 20:02, 15 January 2019 (UTC)

A script to help with underscores

Please have a look here: Wikipedia:Help desk#Links without https and without underscores and see if a script is the right idea. Many, many thanks. Anna Frodesiak (talk) 22:50, 22 March 2019 (UTC)

@Anna Frodesiak: A script to do this should be pretty straightforward to create (its a small matter of programming). I few questions: do you want a textbox to paste content into, and then have it apply the change; a button to replace the content of your current clipboard (what you copied) with a non_underscored version; or something else? Thanks, --DannyS712 (talk) 22:59, 22 March 2019 (UTC)
That's wonderful news, DannyS712. Maybe the simplest is to have an item in that left "tools" list called "something-or-other". When clicked, it would use the url "https://en.wikipedia.org/wiki/Wikipedia:User_scripts/Requests#A_script_to_help_with_underscores" and put into your clipboard [[Wikipedia:User scripts/Requests#A script to help with underscores]]. Does that sound right? Actually, I think you or User:WelpThatWorked just suggested that same thing. My apologies. I'm not that smart with this sort of thing. Anyhow, I'd avoid popup boxes and all that sort of thing. Just a single click and you get what you want in your clipboard. Best, Anna Frodesiak (talk) 23:09, 22 March 2019 (UTC)
@Anna Frodesiak: sorry, just investigated it - its pretty hard to make a script that can read the clipboard, though writing to it is easier. What about creating a text box, and when you hit convert it reads the text, converts it, writes it to your clipboard, and closes? --DannyS712 (talk) 23:18, 22 March 2019 (UTC)
Hi DannyS712. Read the clipboard? I thought it just needs to read the url and then write to the clipboard. Anna Frodesiak (talk) 23:21, 22 March 2019 (UTC)
@Anna Frodesiak: oh, you want to copy the current url? Not convert a url you already copied? Thats easier --DannyS712 (talk) 23:23, 22 March 2019 (UTC)
Hi DannyS712. Yes, that's it. Whatever the url is at the top of the browser, grab that and make it like [[Wikipedia:User scripts/Requests#A script to help with underscores]], stripping of the https.... and replacing underscores with spaces and adding the open and closed brackets. Doable? Best, Anna Frodesiak (talk) 23:27, 22 March 2019 (UTC)
@Anna Frodesiak: See User:DannyS712/Easy-link.js - I still need to write the documentation. I didn't see your note about brackets until after I finished it, and I need to leave in a minute, but when I get back I'll think about it. I'm not sure the closed brackets are always needed, since piped links can be used, and just having open brackets would be odd. --DannyS712 (talk) 23:38, 22 March 2019 (UTC)
Open brackets? Anna Frodesiak (talk) 04:53, 23 March 2019 (UTC)
@Anna Frodesiak: Are you sure you want them? --DannyS712 (talk) 04:57, 23 March 2019 (UTC)
Ideally it would look like [[Wikipedia:User scripts/Requests#A script to help with underscores]]. That can then be pasted in other posts. It is easy to stick in a pipe later if one wants. Does this sound sensible? Anna Frodesiak (talk) 05:07, 23 March 2019 (UTC)
I had to manually made this one. Anna Frodesiak (talk) 05:08, 23 March 2019 (UTC)
@Anna Frodesiak:  Done --DannyS712 (talk) 05:15, 23 March 2019 (UTC)
Done? Holy moly. That's fast. :) How do I make it appear in my tools list? Anna Frodesiak (talk) 05:19, 23 March 2019 (UTC)
@Anna Frodesiak: See Wikipedia:User scripts#How do you install user scripts? --DannyS712 (talk) 05:23, 23 March 2019 (UTC)
Okay, did I do it right? Nothing appears in my tools list. What would the name appear as? Anna Frodesiak (talk) 05:27, 23 March 2019 (UTC)
The tools list is on the left panel
@Anna Frodesiak: Yes, you did. It should appear as "Easy link" in your p-cactions menu (where the option to move a page is) --DannyS712 (talk) 05:53, 23 March 2019 (UTC)
DannyS712, it's fantastic!!!! One small thing: Would it be possible to put it into the left tools list. I have the top tabs a bit clogged with admin tools. If it's a bother, don't worry. You are amazing! Best, Anna Frodesiak (talk) 11:13, 23 March 2019 (UTC)
Hi DannyS712. I just realized that you may be on a mobile phone and not see what I'm seeing. I'm wondering if the easy link can be added to the left panel's "tools" list. Best, Anna Frodesiak (talk) 23:13, 23 March 2019 (UTC)
@Anna Frodesiak: done. Sorry, I can do a lot from my phone, but editing scripts that others import is not something I'm comfortable doing from my phone. --DannyS712 (talk) 23:45, 23 March 2019 (UTC)
Hi DannyS712. Perfect! Absolutely perfect!!! You are a genius. I look at that code and cannot understand how anyone can get their heads around it. I'm very impressed. Thank you!! Anna Frodesiak (talk) 23:58, 23 March 2019 (UTC)

Help needed: can not fork user script

Hello everyone,
According to the guideline in User Script guideline, I can fork an existing user script to modify and create a new one. I followed the steps and tried to fork this one in a subpage. But, when I click publish, it gives a warning that if I do this, my account will be blocked.
I tried another one to find out if there is anything wrong in my steps, this is working just fine. I can create subpage and can change and publish as per the guideline. But, it did not work with this one. I need to change this one, but it is not working. >br> Can someone please tell me whether I am doing anything wrong here. Is there any permission for different user script? Help me to fork this one in my page. I want to create a new one by changing this one. Thank you, everyone. I appreciate any kind of help. MREti12 (talk) 14:10, 18 May 2019 (UTC)

A very warm welcome to you, @MREti12: This is how scripts may be forked:
  1. Create a subpage in your userspace. For example, User:MREti12/scriptname.js.
  2. Copy the code from the source to the destination.
  3. Save the destination page. Make any future changes as you wish.
If you need any further assistance, you may contact me. Guywan (talk) 18:06, 18 May 2019 (UTC)
I should also note that per Wikipedia's content license you must make it clear where you obtained the script from (if you did not write it yourself). Guywan (talk) 18:10, 18 May 2019 (UTC)
  • Note: OP has been indeffed by Materialscientist for socking. —RainFall 05:01, 19 May 2019 (UTC)
:'( GUYWAN ( t · c ) 22:10, 3 June 2019 (UTC)

New userscript

Hi greetings, I created a new user script named TeahouseSidebar. It is only a tiny one. Can this use in Wikipedia? I created this for reaching Teahouse quickly for hosts, newcomers, etc. Please check this. Can I include this in WP:USL? Regards.--PATH SLOPU 10:28, 3 June 2019 (UTC)

@Path slopu: Don't see any reason why you can't. Might be useful to Teahouse regulars. GUYWAN ( t · c ) 22:08, 3 June 2019 (UTC)

Wanted: New version of Twinkle

This is a pretty big request, but could you try to make a new version of Twinkle that works on mobile devices?
Thanks, CrazyMinecart88 (talk | contribs) 11:54, 24 December 2018 (UTC)

CrazyMinecart88, Twinkle, though not designed for mobile devices, still does work on mobile, right? What issues are you facing? SD0001 (talk) 03:51, 1 January 2019 (UTC)
@SD0001: In mobile view, the Twinkle tab is not available, and desktop veiw looks weird on a tablet. To see what I mean, go to the bottom of a page with Twinkle on, and click mobile view.
Thanks, CrazyMinecart88 (talk | contribs) 00:33, 3 January 2019 (UTC)
Oh, you are talking about the mobile view. Well, it's not possible for any script/gadget to work in mobile view. The only JavaScript that gets executed on mobile is at Mediawiki:Minerva.js and Mediawiki:mobile.js both of which are empty. SD0001 (talk) 02:08, 3 January 2019 (UTC)

@CrazyMinecart88: The desktop site is quite usable on tablets/mobile devices if you change your skin in Special:Preferences § Appearance to Timeless. There's also a responsive mode you can set if you use the Monobook skin. - Evad37 [talk] 04:36, 3 January 2019 (UTC)

Wanted: List entry annotator

A script that does the following to each entry in a bulleted list: adds an en dash after the entry, fetches the first 2 sentences of the lead of the corresponding article (the linked term listed), and inserts them after the en dash of the entry. The Transhumanist 20:50, 1 April 2017 (UTC)

@The Transhumanist: is this still needed considering you can hover over links to get a summary? BrandonXLF (t@lk) 01:17, 1 June 2019 (UTC)
@BrandonXLF: Good question. There are definitely some trade-offs. On one hand, the popups remain up-to-date. On the other hand...
  • Reading a page directly is faster than hover-reading.
  • Having the annotations in the outline would support print outs. (You can't see pop-ups on a print out of a list).
  • Reuse of the content, that is, a copy of the page's text, wouldn't include popups, and so, it would be useful to have the annotations included.
  • Having pop-ups doesn't quite make a topic list a glossary, while having the annotations in there does.
To name a few factors. I'm very excited about the posts below, and will definitely be beta-testing!    — The Transhumanist   22:39, 5 June 2019 (UTC)
@The Transhumanist: Two years later ...  Done? Check out User:Guywan/Scripts/LEA.js if you're still interested. It works like this:
Create a bulleted list, exactly like so:
* [[linkA]]
* [[linkB|linkBname]]
Then click List Entry Annotator in the sidebar. You'll see something like:
* linkA – Holy crap it actually worked!
* linkBname – What'd I tell ya'?
Oh yeah. It fetches the entire lead (first paragraph). First two sentences would be ... slightly more difficult.
If you're not (interested) .... Well, it was fun to write. Regards, Guywan (talk) 16:48, 1 June 2019 (UTC)
@Guywan: you could screen for the first 2 sentences by counting the number of periods... DannyS712 (talk) 16:49, 1 June 2019 (UTC)
@Guywan: Also, a few notes: you need to define "api" for line 69 (api.post) - you never saved the api instance from line 57. Also, can I suggest filtering out inline html comments, like those found in the lede of Donald Trump? DannyS712 (talk) 16:51, 1 June 2019 (UTC)
@DannyS712: you could screen for the first 2 sentences by counting the number of periods... Yes, I thought about that. I'm concerned about 'false positives', such as ellipses or periods in templates and references, however unlikely.
Also, a few notes: you need to define "api" for line 69 ... True. Thanks for that!
Also, can I suggest filtering out inline html comments ... Most definitely. Consider it done. Guywan (talk) 17:08, 1 June 2019 (UTC)
@Guywan: A few other thoughts:
  • I put the version number of the script in the edit summary too, so that it is easier to debug
  • You may want to expand the summary to be more than just the current link (eg "Annotating list with link ")
  • You may want the link to point to the documentation page (which I suggest you create) rather than the source code
  • Why did you bold the link?
  • Why did you set "minor" edit to true? Generally filling in such lists wouldn't be considered minor
  • Per Wikipedia:Copying within Wikipedia#Proper attribution, I suggest you add a note in the summary "Copied from respective articles, see those pages' histories for attribution" or similar
Thanks, --DannyS712 (talk) 17:12, 1 June 2019 (UTC)
@Guywan: Also, for the comments, it should also allow newlines in the string (eg with "<!--(.|\n)*?-->") DannyS712 (talk) 17:14, 1 June 2019 (UTC)
@DannyS712:
Why did you bold the link? To differentiate it from other the links. Just a bit of 'pizazz'.
Why did you set "minor" edit to true? I don't know what The Transhumanist's intentions were, but this doesn't seem like a script that would be useful in mainspace. If it will be used there, then the minor can be removed. I see this as more of a userspace script. Guywan (talk) 17:26, 1 June 2019 (UTC)

Help needed: adjust location of view port

The script User:The Transhumanist/AnnotationToggler.js provides a toggle to hide/show the annotations in bulleted lists. The problem is that when the annotations disappear or reappear, the user is jolted away from the text he was reading, as that text shifts relative to the viewport. I need help resetting the location of the viewport to focus on the text that was there before the hide/show button press. The Transhumanist 20:50, 1 April 2017 (UTC)

Script or Bot to search and calculate coordinates

Please look at this table: Lands_administrative_divisions_of_New_South_Wales#Table_of_counties

My goal is to add a column to this table that shows the approximate geographical coordinates of each county. Those county coordinates can be derived form the parish coordinates that are found in each county article, by taking the middle of each northernmost and southernmost / easternmost and westernmost parish coordinates. Is it possible to write a script or a bot to achieve this? --Ratzer (talk) 10:45, 15 January 2018 (UTC)

Probably I'm wrong here, I'll ask somewhere else...--Ratzer (talk) 21:25, 25 January 2018 (UTC)


Words-to-watch finder

It would be helpful to have a tool that automatically searches an article for various words to watch, as defined in Wikipedia's Manual of Style. Such a tool would be very helpful in checking if an article complies with the style guidelines. This check would be useful in Good Article and Featured Article reviews.

My thinking is that the tool would be used while editing an article, allowing the editor to tab through the potential violations to review and correct them if needed. Also, the search list used in such a tool should be flexible so it can be expanded and improved over time by users. Qono (talk) 17:08, 14 December 2018 (UTC)

I'll see what I can do, however it probably will not be able to automatically scroll to violations, instead just selecting them. Danski454 (talk) 12:26, 18 December 2018 (UTC)
@Qono: I have written this: User:Danski454/w2wFinder. I am open to feedback. Danski454 (talk) 13:43, 19 December 2018 (UTC)
@Danski454: I'm so excited that you've put this together! I've installed the script, but am having trouble loading it. The "Next" button doesn't show for me when loading up the editor. Upon reloading the editor page, I'm given "Unable to load words to watch script" as a popup. Any ideas? Qono (talk) 21:16, 19 December 2018 (UTC)
@Qono: Which browser, skin and editor are you using? Danski454 (talk) 21:20, 19 December 2018 (UTC)
@Danski454: Safari. Vector. I'm using the default editor, I believe. FWIW, I also have this installed. Qono (talk) 21:25, 19 December 2018 (UTC)
@Qono: my safari is broken, even without scripts, so I cant use the debug console. Can you open the javascript console and tell me any errors that appear? Danski454 (talk) 21:38, 19 December 2018 (UTC)
@Danski454: On reloading: [Error] Failed to set referrer policy: The value 'origin-when-crossorigin' is not one of 'no-referrer', 'no-referrer-when-downgrade', 'same-origin', 'origin', 'strict-origin', 'origin-when-cross-origin', 'strict-origin-when-cross-origin' or 'unsafe-url'. (Felice_Beato, line 18) and [Error] Unhandled Promise Rejection: undefined (anonymous function) promiseReactionJob Qono (talk) 21:50, 19 December 2018 (UTC)
I'm sorry, but I do not know what would cause those errors, my best guess is that i is caused by something going wrong with loading the words to watch list (createLists and createListsWikitext in the code) Danski454 (talk) 22:53, 19 December 2018 (UTC)
@Danski454: For what it's worth, now I'm getting "Unable to load words to watch list - processing crashed". This is happening on Chrome as well as Safari. Are you not getting this error? Is there anything else I can do to help? Qono (talk) 03:10, 20 December 2018 (UTC)

@Qono: I have removed that error message to see if the console comes up with anything better. Danski454 (talk) 10:31, 20 December 2018 (UTC)

@Danski454: I'm not getting the pop-up error any longer, and the Javascript Console shows the following in Safari:

[Error] TypeError: undefined is not an object (evaluating 'text.toLowerCase') testWikitext (index.php:70) createUI (index.php:110) createListsWikitext (index.php:64) (anonymous function) (index.php:28) fire (load.php:470:921) fireWith (load.php:472:119) done (load.php:551:588) (anonymous function) (load.php:554:981)

Qono (talk) 15:52, 20 December 2018 (UTC)
@Qono: It seems the script can't find the contents of the editing box, somehow. If you inspect the edit box, you should find a <textarea> element. It should have something that looks like id="something" inside of it, can you find the id? Danski454 (talk) 17:11, 20 December 2018 (UTC)
@Danski454: I have two text area elements showing:<textarea autocorrect="off" autocapitalize="off" spellcheck="false" disabled="" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea> and <textarea id="wpTextbox1" class="ve-dummyTextbox oo-ui-element-hidden"></textarea> Qono (talk) 17:24, 20 December 2018 (UTC)
@Qono: Are you using the visual editor? Danski454 (talk) 17:44, 20 December 2018 (UTC)
@Danski454: I have the visual editor enabled, but was getting this result in source editing. Qono (talk) 18:05, 20 December 2018 (UTC)
@Qono: Are you using the 2017 wikitext editor (looks similar to visual editor and enabled from beta features)? Danski454 (talk) 19:26, 20 December 2018 (UTC)
@Danski454: Yes I am. I tried turning it off, and now do see the "Next issue" button, but I don't see any words or phrases highlighted, despite it showing "Issues found". Qono (talk) 19:53, 20 December 2018 (UTC)
@Qono: You need to press the next button to select a possible issue, and you may want to move the cursor using the arrow keys to scroll to it. Danski454 (talk) 20:01, 20 December 2018 (UTC)
@Danski454: Doesn't seem to work. After pressing the button, nothing happens. The cursor is not in the edit window. Qono (talk) 21:12, 20 December 2018 (UTC)

Pseudo-headings

Take List of shooting sports organizations as an example (permalink). Do we have a script that can convert pseudo-headings to sub-sub-(sub)-headings and add a {{TOC limit}}? If not, can anybody write such a script? Sam Sailor 09:33, 17 April 2019 (UTC)

@Sam Sailor: Still interested in such a script? Regards, Guywan (talk) 17:31, 11 May 2019 (UTC)
Yes, thank you, Guywan for User:Guywan/Scripts/Headings.js. See Special:Diff/895577147/896690370, could it remove the trailing : as well? Could it show changes instead of saving right away? Thanks again, best, Sam Sailor 07:42, 12 May 2019 (UTC)
@Sam Sailor: Trailing : will be removed. I wasn't aware pseudo-headings had those! Preview is definitely possible, I'll start work ASAP. You may have noticed it doesn't add a {{TOC limit}}, I might leave that up to the discretion of the editor. Also, any future bug reports or feature requests may be filed here, at your convenience. Regards, Guywan (talk) 10:53, 12 May 2019 (UTC)
I'll respond here, Guywan, because your remark "I wasn't aware pseudo-headings had those!" made me go back and read MOS:PSEUDOHEAD again, and you are right, it only talks about "abusing semicolon markup". To make sure it's not me confusing unacceptable pseudo-headings for acceptable description lists, I have posted about it on WP:VPT. Sam Sailor 05:56, 13 May 2019 (UTC)
@Sam Sailor: The script won't touch (properly formatted) definition lists. Also, the example you gave at WP:VPT shows incorrect usage of pseudo-headings, and not of definition lists, so converting them with the script would be acceptable, in my opinion. On a side note, the script will now show a preview and ask for confirmation before proceeding ('buttons' at the top of the page). It's a bit buggy, and ugly. Regards, Guywan (talk) 15:25, 13 May 2019 (UTC)
Hmm, or perhaps they should be bolded instead of sectioned (per MOS:PSEUDOHEAD) .... Guywan (talk) 15:35, 13 May 2019 (UTC)

IMDb link templater

I'm attempting to create something that will replace manual IMDb title and name links with templated versions. What I have so far is at User:Geniac/IMDbLinkTemplater.js I've programmed before, but that was many years ago, so I have some basic understanding of commands and variables and wildcards and stuff. I'm sure this is probably a 5-minute task for somebody who knows what they're doing, but I've never done any JavaScript before today, so excuse the hideous mess it probably is. I'm at a standstill now because I can't figure out how to establish that $1 refers to the 7-digit title number from the title URL and $2 refers to the 7-digit actor number from the name URL. Alternatively, I'm sure there's probably a much simpler way of doing this. --Geniac (talk) 19:43, 19 May 2019 (UTC)

Try
name:'IMDbLinkTemplater',
		script: function(editor) {
		const titlelink = /\[https:\/\/www\.imdb\.com\/title\/tt(.......)\/.*/;
		const namelink = /\[https:\/\/www\.imdb\.com\/name\/nm(.......)\/.*/;
		editor
			.replace(titlelink, '{{IMDb title|$1}}')
			.replace(namelink, '{{IMDb name|$1}}')
			.appendEditSummary('templated IMDb link')
			.clickDiff();
	}
I have made the regular expressions actual regular expressions, added a capturing group and used the string replacement syntax (assuming TemplateScript uses the standard javascript replacement function). The MDN documentation, and w3schools reference may be useful. Also, you could replace ....... with \d{7} --Danski454 (talk) 20:48, 19 May 2019 (UTC)
Forgot to ping Geniac --Danski454 (talk) 20:49, 19 May 2019 (UTC)
@Danski454: Ooh yes it works. That's what I was looking for. Thanks! --Geniac (talk) 23:43, 20 May 2019 (UTC)

Tweak to Gadget-markblocked

MediaWiki:Gadget-markblocked.js strikes through the names of locally blocked users, but does nothing if the user is globally locked but not locally blocked.

The code exists - MediaWiki:Gadget-popups.js detects both and hovering over a name like User:Chyah will show BLOCKED, LOCKED.

Gadget-markblocked needs to be enhanced to strike through the named of locked users (since in practice the effect of blocking and locking is equivalent) as well as blocked users.

note: MediaWiki talk:Gadget-markblocked.js#Globally locked and blocked users

Thanks, Cabayi (talk) 10:27, 2 January 2019 (UTC)

Galobtter has done some investigation and apparently it's not possible. Thanks everybody who considered the request, Cabayi (talk) 09:51, 29 January 2019 (UTC)
I've been intending to look at this for some time, and there might be a way we can still do it. Replied over there. Enterprisey (talk!) 16:40, 29 January 2019 (UTC)

Help Me Request Assistant

Hi, Would it be possible for a script similar to the edit request helper be created for responding to help requests that allows the template to be changed to the appropriate response based one easily and respond from the Template:Help me box? RhinosF1(chat)(status)(contribs) 21:48, 17 March 2019 (UTC)

@RhinosF1: WP:EPH was written by User:Jackmcbarn, who hasn't edited in 18 months. The script has some issues, and could benefit from some forking it and taking over as its maintainer. Given the similarities, it may make sense for one person to do both, since the code would ~likely~ be similar. I'm not volunteering, but just commenting --DannyS712 (talk) 21:51, 17 March 2019 (UTC)
DannyS712, Totally agree with you that one maintainer for both or it been part of EPH would be ideal RhinosF1(chat)(status)(contribs) 21:52, 17 March 2019 (UTC)

Load JSON

More a request for a snippet. How does one load a json file (e.g., User:Wugapodes/Capricorn/RedirectAliases.json) into a userscript (e.g., User:Wugapodes/Capricorn.js). Is there anything WP specific I should know? I tried $.getJSON("https://en.wikipedia.org/wiki/User:Wugapodes/Capricorn/RedirectAliases.json") but it didn't give me the result I was expecting. Wug·a·po·des​ 04:46, 15 August 2019 (UTC)

Add |action=raw, like https://en.wikipedia.org/w/index.php?title=User:Wugapodes/Capricorn/RedirectAliases.json&action=raw&ctype=application/json. Tokenzero (talk) 08:46, 15 August 2019 (UTC)

Back to top script

could someone make a script that adds a "go back to top of page" button? --Predated0 (talk) 19:49, 19 September 2019 (UTC)

@Predated0: Looks like there's already one, User:BrandonXLF/ToTop. ‐‐1997kB (talk) 05:38, 30 September 2019 (UTC)
@Predated0: You could also look at User:BrandonXLF/ToTopButton if you looking for more of a floating button rather than a link at the bottom of the page. BrandonXLF (t@lk) 04:31, 14 October 2019 (UTC)

Edit warring indicator

Edit warring is one of the most disruptive issue that can happen, and articles under active EW should be approached with caution (and could use also external opinions). I would like to propose the idea of making an "edit warring indicator" that would be a simple green/yellow/orange/red light placed at the top of articles as the XTools gadget does. The indicator would simply check the number of reverts in the last 24h. I know reverts are hard to detect, but there can be a few tricks to detect them most of the time: keywords in the diff comments (undid, revert, etc.); edits of the same KB count but with opposite signs. It could also account for the number of different editors involved. --Signimu (talk) 20:33, 29 October 2019 (UTC)

@Signimu: Done, see User:Evad37/EditWarChecker. - Evad37 [talk] 02:35, 30 October 2019 (UTC)
Sir, you are a hero! 🙏 And a fast one! Thank you so much! I appreciate that it shows the number of users involved in edit warring, awesome! --Signimu (talk) 02:43, 30 October 2019 (UTC)

Script request

Is there any script to put custom summary when rollbacking? I don't have rollback here but I do have this right on other projects. And It would be helpful to have a script like that. Perhaps DannyS712 can help? Masum Reza📞 13:24, 8 November 2019 (UTC)

@Masumrezarock100: See https://en.wikipedia.org/w/api.php?action=help&modules=rollback - the `summary` parameter can be customized DannyS712 (talk) 16:43, 8 November 2019 (UTC)
Thanks. I think I will create one myself. Masum Reza📞 16:46, 8 November 2019 (UTC)

Watchlist templates and their documentation in one click

Hi, is there/would it be possible to make the watchlist button on templates watchlist both the main template page and its /documentation sub page? ‑‑Trialpears (talk) 22:25, 9 November 2019 (UTC)

Watchlist thanks

I'd love to have thank links on my watchlist. Guarapiranga (talk) 01:15, 20 November 2019 (UTC)

I agree, that would be awesome! --Signimu (talk) 13:45, 20 November 2019 (UTC)Í
On talk pages too! (though I realise that's a little more involved) Guarapiranga (talk) 23:03, 20 November 2019 (UTC)

@Guarapiranga and Signimu:  Done for the watchlist: User:Evad37/Thanky. It will also work for other special pages with diff links, like recent changes, related changes, and contributions. - Evad37 [talk] 04:48, 23 November 2019 (UTC)

Excellent, Evad37, thank you (if only there was a thank link here… =D) Guarapiranga (talk) 06:39, 23 November 2019 (UTC)
Evad37, you are a legend, thank you so much, it works perfectly well even with grouping enabled! (the thanks I just sent you was done from there) --Signimu (talk) 10:46, 23 November 2019 (UTC)

Merge refs

Is there a script that detects duplicate refs and allows users to try merging them? If there's not, I hope one is made. --Kailash29792 (talk) 05:04, 1 January 2019 (UTC)

@Kailash29792: WP:REFILL does this if refs are identical. See, eg, a b c d e f g --DannyS712 (talk) 05:28, 1 January 2019 (UTC)
For two refs with the same name, yes, that would be toollabs:yabbr. It doesn't let you do it on a specific page, yet - it takes you through the whole backlog. Enterprisey (talk!) 05:40, 1 January 2019 (UTC)
@Kailash29792, DannyS712, and Enterprisey: User:Cumbril/Reference Organizer (formerly: User:Cumbril/References Consolidator) does that. Sam Sailor 09:39, 17 April 2019 (UTC)

Wanted: A Script to Lexicographically Order Bullet-Lists

Work in progress; comments welcome

My fellow script enthusiasts, et al., today I bring before you the matter of this horrid mess. (I see there was some attempt to maintain a sane ordering, but it fell apart at some stage.)

A script is needed to automate lexicographical ordering of items in bullet-lists. This may also be useful in See also sections of articles. Some points to bear in mind:

  1. Not all bullet-lists need be ordered. The script user must convey which items they want ordered. (i.e. This is not a task for a bot.)

Uhm, I guess that's the only point. If you choose to undertake this task, I would be happy to provide insight, if it proves challenging.

The first person to conclude a sufficient algorithm gets cake. Regards, GUYWAN ( t · c ) 22:47, 3 June 2019 (UTC)

@Guywan: see .sort() - https://www.w3schools.com/jsref/jsref_sort.asp DannyS712 (talk) 00:10, 4 June 2019 (UTC)
Guywan I made a script specifically to sort WP:US/L. It sorts by the name parameter of the {{userscript}} template on each line. Here it is in action. Some limitations are that it cannot sort entries that have no name parameter and it does not attempt to sort sub-lists. Here's a link to the script. I might add functionality to sort scripts with no name parameter but I'm taking a break for now. Anne drew (talk) 18:47, 1 July 2019 (UTC)
@Anne drew Andrew and Drew: Firstly, ouch, my fingers! Secondly, great work! Nice and simple script; I like it. I was looking for something more general, but this is quite good. We're halfway there.
Extended content
More generally, we want to build a list of bullet items (/^\*.*/ for the first level, /^\*\*.*/ for the second, etc) and order it. But we do not want to include markup in the ordering process, so items should be parsed before comparison. (E.g. via mw.Api.parse()) We would then replace the old wikitext with our ordered wikitext.
This is my imagining, anyway. Perhaps there is a more elegant solution.
P.S: I might suggest a keyboard shortcut that activates the script. (CTRL+R? CTRL+⇧ Shift+R?)
P.P.S: Also, don't add a portlet link unless
mw.config.get("wgAction") == "edit"
(just to declutter when link isn't needed.)
Regards, GUYWAN ( t · c ) 00:16, 4 July 2019 (UTC)
Hey Guywan, thanks for the helpful feedback! I've made some changes so it only shows up as a portlet link when you are on the WP:US/L page in edit mode. It also has a keyboard shortcut: Ctrl+Alt+S. Lastly, it can now sort scripts with no "name" parameter. I'll have to look into mw.Api.parse(), it seems useful. Anne drew 23:39, 9 July 2019 (UTC)
I would love a script to sort bulleted list. That would be so incredibly useful. Headbomb {t · c · p · b} 15:42, 17 September 2019 (UTC)
@Headbomb: Try BulletSort. GUYWAN ( t · c ) 14:50, 29 November 2019 (UTC)

Script for Merging articles easily.

Hi greetings, I have a suggestion of a new user script helping in merging articles easily. I mean this script should help to do all things listed in WP:MERGETEXT. My suggestions on the tool are...

  • A double window tool which can display both source page (say first) and destination page (say second) in editing mode. We can copy and paste the good content from first page to second page. This pages can determine by adding the names in tool before merging.
  • After this, tool should blank the page and redirect to second with appropriate edit summaries. Like this second page also should saved with edit summary.
  • Remove the merge templates from second page.
  • If first page has a talk page, reconcile it. Change the class in Wikiproject templates to Redirect.
  • Add merger templates such as {{merged-from}}, {{merged-to}} or {{copied}} in talk pages.
  • Automatically fix double redirects.

This is only some suggestions in my mind. It will be very beneficial to users who perform merging if this tool become available. I think there is no other scripts regarding this. Hope that the concerned will consider this. Thank you.--PATH SLOPU 13:58, 31 July 2019 (UTC)

Yeah, I've definitely always wanted a script like this. If someone's actually thinking of doing this, that would be wonderful; otherwise, I might move this further up a bit in the queue of scripts I want to write. Enterprisey (talk!) 06:37, 1 August 2019 (UTC)
Enterprisey, Thank you very much for considering this. Hope that you will consider this when creating a new script. It is a great help if you create this. Thank you. PATH SLOPU 09:50, 3 August 2019 (UTC)
Even a rudimentary version would be very useful. Just removing merge tags, placing {{merged to}} and {{merged from}} would be helpful. I've also posted a notice at WT:WPMERGE since I think there may be others that wish to comment. --Trialpears (talk) 21:45, 3 October 2019 (UTC)
You can do this using Twinkle. robertsky (talk) 22:21, 3 October 2019 (UTC)
Are you sure? I thought twinkle only handled the article namespace templates {{merge to}} and {{merge from}}. --Trialpears (talk) 22:30, 3 October 2019 (UTC)
Ah... apologies, just noted on the tenses in the template names. Then, yes it would be great to have such functionality.
A rundimartary tool, as Trialpears suggests, would save us a bunch of steps. The script could be run once an editor has manually copied all desired material from the source article to the target article. Parameters for the script would be the names of the source and target articles. The script would replace the content of the source article with a redirect. It would remove merge proposal banners ({{merge-from}}, {{merge-to}}) from both, It would add attribution banners {{merged-from}}, {{merged-to}} to talk pages and any other touch ups mentioned above that are nice and easy. The double-window idea sounds like the edit conflict resolution. I'm not convinced that helps a lot even for edit conflicts; Merges are often much more complicated than edit conflict resolution. ~Kvng (talk) 14:07, 6 October 2019 (UTC)
A merge tool would be very helpful particularly for those regularly involved in merging. I'm not currently a Twinkle user, but the documentation doesn't seem to cover anything like the scope of tools proposed by Trialpears. Klbrain (talk) 12:54, 4 October 2019 (UTC)
@Klbrain, Kvng, Trialpears, and Path slopu: I am considering to create a script based on the feedback here. The details are as follows:
  • The script is to be invoked from an article that is to be merged to another article. There will be a form window in which the name of the target article is to be entered. On submitting, following actions are performed:
    • current page is redirected to specified target, with {{R from merge}} tag, with a customisable edit summary
    • Any {{merge from|currentpage}} on target page is removed
    • {{merged-from}} is added to the talk page of target page
    • {{merged-to}} added to talk page of current page
    • Any wikiproject templates on talk page are reset with class=redirect, importance parameter is removed.
  • All the above actions are optional and some may be skipped by unchecking a checkbox on the form window.
The actual process of merging content has to be performed manually. Like Kvng, I don't see the benefits of implementing a double-window thing. You just to have open two tabs in separate browser windows and dock them side by side to replicate the effect.
Fixing of double redirects is best left to the bot.
Does all this sound right to you? And can you suggest a proper name for the menu button used for starting the script? SD0001 (talk) 18:47, 10 October 2019 (UTC)
Sounds perfect. I'm not sure we need the checkboxes for each operation but if you do include them, I hope they will all be checked by default. I suggest standard edit comments for all of these operations be something like "Merged from Source page. For more information visit WP:WPMERGE." I personally don't need edit comments to be customizable. ~Kvng (talk) 20:23, 10 October 2019 (UTC)
I often like to specify that it was a bold merge or link to the discussion and would personally like custom edit summaries. You may also want to remove {{being merged}}, a new system to keep track of mergers with consensus that haven't yet been implemented. It hasn't really taken off yet, but if it's as easy as I think it is I see no reason not to include it. --Trialpears (talk) 20:32, 10 October 2019 (UTC)
 Done See User:SD0001/easy-merge. Any feedback is welcome. Please report bugs if you find any. Thanks. SD0001 (talk) 22:31, 10 October 2019 (UTC)
@Trialpears: Looking at your recent edits, I have added a date field to the script, so that merged-from and merged-to can be made to take a different date than the default today. Just for maximum flexibility. SD0001 (talk) 18:46, 11 October 2019 (UTC)
Well that's great! There are some times where there is a merged version made but isn't implemented due to consensus concerns or the merger not being recorded properly for copyright attribution where this will be really useful. Thanks! --Trialpears (talk) 18:52, 11 October 2019 (UTC)
@SD0001:Hi greetings, thank you very much for considering the request. The tool seems very nice. It reduces the work considerably. Thank you for spending time to create this tool. Regards PATH SLOPU 10:28, 12 October 2019 (UTC)
@Enterprisey, Trialpears, Kvng, and Klbrain: Thank you very much for the suggestions and recommendations given to the creation of tool. Regards--PATH SLOPU 10:28, 12 October 2019 (UTC)
Thanks SD0001. Tried it on Multistage amplifier. Went smoothly. ~Kvng (talk) 01:44, 13 October 2019 (UTC)
It's working smoothly for me too (when I use it correctly); thanks! Additions, should one be in the mood, might include stripping various request templates from the talk page (like template:Photo requested), and having an option to add other relevant merge templates. The full gamut of such merge templates is large, but for starters an optional template:R from alternative language (with its 2 important parameters) might be helpful. Klbrain (talk) 09:09, 13 October 2019 (UTC)
Nice suggestions. I've updated it to also remove the various request templates, as well as any media-needed or needs-media parameters in wikiproject tags. Regarding addition of redirect templates, I think that's best left to Twinkle. Twinkle already supports adding of R from alt lang with both its parameters. I've also recently filed a patch for Twinkle that will make the redirect tagging interface searchable, making it easy to find a template from the large list. SD0001 (talk) 12:35, 13 October 2019 (UTC)
It looks like the script removes all of the categories on the redirected page; this isn't really a desirable feature, as its helpful to maintain categories which refer to a section or part that is being merged, but not to the whole target page. Klbrain (talk) 20:54, 15 October 2019 (UTC)
This should be optional since there are many mergers from purely duplicative articles for example all the Indian villages with two different transliterations. I also think detecting whether it's a redirect to section or not and tag appropriatly would be good. --Trialpears (talk) 21:14, 15 October 2019 (UTC)

Wanted: CSS script to display old padlocks on protected pages instead of new ones

I want to use a CSS script to display old padlocks to the right of the page title on protected pages instead of new padlocks. —Jencie Nasino (talk) 02:40, 14 August 2019 (UTC)

Jencie Nasino, see User:Enterprisey/old-prot-padlocks.css. You can use importStylesheet, like I did in this edit, or just copy-and-paste the whole thing into one of your user CSS files. Enterprisey (talk!) 05:13, 14 August 2019 (UTC)

Script allowing addition of inline cleanup tags directly from article page

Would it be possible to write a userscript which would allow addition of inline cleanup tags without having to open the full editor? I find myself reading articles on topics I'm curious about and spotting issues such as weasel words or uncited claims, and I want to add the cleanup tags, but this involves opening the editor and finding the same spot again, which infringes on my reading experience. I know, the standard response here is don't tag but be bold, and I try to do that whenever possible, but to be frank often this happens on topic I don't know much about or have very little interest in improving. I still think that in such situations providing some feedback to parties interested in improving the article may be of some use.

This request is really inspired by my experience of using User:Galobtter/Shortdesc helper. Since I've started using it, upon encountering pages without descriptions, I often find myself reading an article until I have some basic understanding of the topic and writing a description before navigating away, which is something I did significantly less before I discovered the aforementioned tool that makes it super easy.

Thanks for your consideration. Melmann 18:43, 9 September 2019 (UTC)

I have begun work on this. This is going to be a tough task to get right, so no promises on a finished product for now. SD0001 (talk) 10:47, 16 September 2019 (UTC)
Thank you for your effort, whether it results in a finished product or not. I'll be patiently waiting for my chance to try it out. Melmann 13:25, 21 September 2019 (UTC)
@Melmann: I know this isn't exactly what you wanted, but you can take a look at User:BrandonXLF/QuickEdit. It works by allowing you to edit individual sections without opening the full editor.BrandonXLF (talk) 19:38, 26 December 2019 (UTC)

Group Special:Contributions by page

Not sure why this wasn't included in Special:Preferences#mw-prefsection-rc when the group by page option was added for recent changes and the watchlist, but I wanted to do precisely that on Special:Contributions pages. I looked everywhere and asked at the Village Pump, to no avail. So I'll leave this as a suggestion here. Guarapiranga (talk) 04:10, 10 December 2019 (UTC)

@Guarapiranga: See User:BrandonXLF/ContribsByPage.js BrandonXLF (talk) 08:03, 8 March 2020 (UTC)

)

A script to improve linking and readability of the article on a specific date/year/century

Regarding the talks on (over)linking of dates

  1. Manual_of_Style#Linking#Linking_month-and-day_or_year
Is it correct that when we put e.g. years, centuries or dates in whatever form, between square brackets, the article gets listed automatically on the wikipedia article of that specific year? I can imagine that this can lead to a page where you it is difficult see what's relevant to you or not. Wouldn't it be interesting to ask for a script to be developed that allows people to show only those events related to e.g. a parameter "art", "politics", "notable people", "fun", "military", "priority level 1", "priority level 2", etc? Sincerely, --SvenAERTS (talk) 03
28, 31 December 2019 (UTC)
SvenAERTS, no, that's not correct, links don't cause articles to be automatically listed in a year article. What you're suggesting wouldn't be a user script, but a significant change to the core MediaWiki code. If you want to pursue it, you could bring it up at one of the WP:VILLAGEPUMP boards. --IamNotU (talk) 14:55, 31 December 2019 (UTC)

ZoomOnThumb gadget

The ZoomOnThumb gadget (to zoom images temporarily on mouseover) has been available for a long time on the fr.wiki "Gadgets" preferences page, and it works quite well. I suggest that it be installed among the Gadgets which all en.wiki users can enable through their preferences.

In the meantime, interested users can import it into their common.js script. See mine at User:Tonymec/common.js. Already loaded pages must be reloaded for this JS to work once you've added it to your common.js; AFAICT it doesn't work if the image is inside an infobox. — Tonymec (talk) 16:22, 20 January 2020 (UTC)

For convince for anyone interested, the code to install is mw.loader.load('//fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ZoomOnThumb.js&action=raw&ctype=text/javascript');. Tonymec, if you want this script to be installed as a gadget, make a request at WP:VPT.BrandonXLF (talk) 18:40, 24 January 2020 (UTC)
@BrandonXLF: OK. — Tonymec (talk) 21:30, 24 January 2020 (UTC)

Easy to copy Special:Diff links on diff pages

Resolved

Example diff

  1. URL: https://en.wikipedia.org/w/index.php?title=Ivan_Bortnik&type=revision&diff=843666779&oldid=843651236
  2. Wikilink: Special:Diff/843651236/843666779

Note, how in the URL version 843666779 goes before 843651236, and it is the reverse in the wikilink syntax. It would be convenient, if one could easily copy [[Special:Diff]] syntax from the diff page. —⁠andrybak (talk) 10:50, 16 February 2020 (UTC)

@Andrybak: I think User:Enterprisey/diff-permalink is what you looking for. ‐‐1997kB (talk) 13:08, 16 February 2020 (UTC)
@1997kB: thank you! —⁠andrybak (talk) 11:39, 17 February 2020 (UTC)

Script to display a drop down list of a user's all subpages in the top toolbar

I would like a drop down list in the top toolbar that displays a list of all of User's subpages like sandboxes, common.js pages, etc. Thanks in advance. DishitaBhowmik 16:50, 29 February 2020 (UTC)

@Dishita Bhowmik: User:BrandonXLF/Subpages do that to an extent. ‐‐1997kB (talk) 02:54, 1 March 2020 (UTC)
@Dishita Bhowmik: Since you would like it in the top toolbar, do you mean you want a link to a list of all the subpages of your userpage? if so, User:PrimeHunter/My subpages.js does that (minus the dropdown part).BrandonXLF (talk) 09:04, 1 March 2020 (UTC)
@BrandonXLF: and @1997kB:, thank you! DishitaBhowmik 16:35, 1 March 2020 (UTC)

Request for an ISBN script

A script which hyphenates ISBN-13 digits (with four hyphens), similar to this website. A script which converts ISBN-10 to 13 would be appreciated also. Thank-you.--Nevéselbert 23:13, 25 June 2017 (UTC)

@Neve-selbert: is this still needed? I'm not saying, that I will do this, but... --Edgars2007 (talk/contribs) 06:41, 6 March 2018 (UTC)
@Edgars2007: it would come in handy, certainly.--Neve~selbert 17:07, 22 March 2018 (UTC)
That website uses JavaScript which is open source so I guess it would be easy to port it here. SD0001 (talk) 06:35, 1 January 2019 (UTC)
@Neveselbert: At least for English and German books, m:User:TMg/autoFormatter adds dashes to ISBNs. Sam Sailor 09:26, 17 April 2019 (UTC)

User script to help guide students working on medical articles

Students make similar errors when editing and each new batch repeats similar errors made by the last batch. I am wanting a user script that analysis the students edits and provides them feedback. For example:

  1. If they use a url to the inside net of their library it will remind them that this is not useful to anyone outside their institution.
  2. If they use caps for every word in a heading it will point out that generally only the first word in a heading gets a cap unless the other words are proper names.
  3. If they put refs before the punctuation or leave a space after the punctuation before the ref it will remind them that the house style is refs go immediately after the punctuation.
  4. If they use a book (ie an ISBN) without a page number they will be reminded to provide a page number.
  5. If they do not use "cite templates" to match those already used in the article they will be requested to do so.
  6. If they use a pmid that is listed as a "primary source" they will be requested to use a secondary source. Whether or not a pmid is primary or secondary can generally be determined by pubmed.

I am involved with supporting a number of classes, including one of medical students at UCSF. I am wanting to trial this sort of script on them to see if they find it useful and it decreases the work load for other volunteers. Currently education initiatives are not really scalable and this sort of script will help make them so. Doc James (talk · contribs · email) 04:57, 15 March 2018 (UTC)

First draft here Doc James (talk · contribs · email) 02:53, 19 March 2018 (UTC)
Thanks for TheSandDoctor who already started to work on it. I just want to refer to User:ערן/WeaselWords.js and Wikipedia:Manual of Style/Words to watch/Config which can be used as a sketch example how to do it (though someone should review the code which was written in WM'14). Particularally I suggest enwiki to adapt hewiki practices here and to put the "rules" above in two format:
  • as human readable rules in Wikipedia:Manual of Style (or a sub page) - where users can read the rational behind the rule. Probably some of the rules Doc James mentioened above are already there - if not please consider to add them. Doing it means users who don't have user script installed can still be aware to it (though it is less accessible)
  • as machine readable rules (as in Wikipedia:Manual of Style/Words to watch/Config or some other format) for a user script to verify the rules. Doing it will greatly simplity further adding/removing/twiking the style rules.
Thanks, Eran (talk) 07:30, 21 March 2018 (UTC)
You should use jquery.textSelection source api module to access the contents of the wiki text editors. That synchronises between the various wiki text editors, so that when two tools makes changes to the form value, they don't overwrite each other. —TheDJ (talkcontribs) 09:16, 21 March 2018 (UTC)

Disabling Media viewer and Page preview

There is the page Wikipedia:Tools/Greasemonkey_user_scripts which shows publicly usable Greasemonkey scripts to give the users a better experience. Sadly there is no list for requested scripts. So I guess, this one here has to be the right one for this purpose, too.

I think, I have a request to make Wikipedia usable / readable for normal people (without an account) again. Please, provide us (or at least the technically versed parts of us) with some means to disable these annoying "features" of the Wikipedia once and for all. I don't think that I have to name reasons here - there are multiple comments on the appropriate discussion pages which seem to be ignored altogether.

So please, give at least the Greasemonkey users the possibility to turn off Media viewer and Page preview. It's really no help at all to have to choose to disable them about a hundred times a day (for every browser instance [in case of the Page preview also for every already opened browser tab!], for every language version, multiple times a day again and again and again)!

Otherwise Wikipedia seems not to be usable in an effective manner anymore. Even on big screens it's hard to find a spot to "park" your mouse cursor at to be able to scroll the site without having previews popping up every now and then. - Which totally disturbs the normal workflow! --141.76.83.180 (talk) 16:04, 21 June 2018 (UTC)

unfortunately, without an account you cannot activate a user script or enable a gadget. But, I encourage you to make an account (WP:ACCOUNT) - you may find what you are looking for in your account's settings ("preferences"). --DannyS712 (talk) 04:47, 1 March 2019 (UTC)
You can also use a popup-blocker to get rid of all popups on Wikipedia articles. Moreover there exist Extensions at Google Chrome Store, that let you disable popups on selected websites, you can use them as well. --180.151.77.214 (talk) 19:30, 10 April 2019 (UTC)
A pop-up blocker will not work for page preview pop-ups, as they use html rather than creating a window. However, there is a gear icon in the pop-up which allows you to disable them. Alternatively, you can add .mwe-popups{display:none!important} using user css. --Danski454 (talk) 11:30, 12 April 2019 (UTC)
Retrieved from "https://en.wikipedia.org/w/index.php?title=Wikipedia:User_scripts/Requests/Archive_3&oldid=1092751342"