Wikipedia:User scripts/Requests#Template:Infobox journal filler/inserter

{{Wikipedia:User scripts/Requests/Header}}

{{User:MiszaBot/config

| algo = old(250d)

| archive = Wikipedia:User scripts/Requests/Archive %(counter)d

| counter = 9

| maxarchivesize = 100K

| archiveheader = {{Talk archive navigation}}

| minthreadstoarchive = 1

| minthreadsleft = 4

}}

[[User:UncleDouggie/smart_watchlist.js]]

Hello, the editor of this script has been retired for a long time. The script has an issue. While it includes a {{tq|clear settings}} button, it lacks a confirmation box . Many times, I’ve accidentally clicked the {{Tq|clear settings}} button and lost my settings. Could someone please edit the script to add a confirmation box ? — Saqib (talk I contribs) 16:57, 15 August 2024 (UTC)

:Precedent is to not edit userscripts unless they have a bug even if the user's been inactive. Thankfully, the script exposes every function globally. That means you can append the following to your common.js (probably after the part that loads the smart watchlist script) to work your magic:

SmartWatchlist.clearSettings = function () {

if ( confirm( "Clear all of your settings?" ) ) {

clearSettings.apply(this, arguments);

}

};

Also, why not use the new JS interface? Aaron Liu (talk) 23:48, 15 August 2024 (UTC)

::Aaron Liu, Thanks for your prompt help. Could you please [https://en.wikipedia.org/w/index.php?title=User%3ASaqib%2Fcommon.js&diff=1240600610&oldid=1236604150 check this] if I’ve done it right, or let me know if I need to add it at line # 269 before I proceed with testing? And what is new JS interface?Saqib (talk I contribs) 08:09, 16 August 2024 (UTC)

:::Erm, you're supposed to install scripts with importScript() (which will always fetch the latest versions) instead of copy-pasting it. But yeah, it should work.{{pb}}Nevermind my comment about the JS interface. I personally couldn't get the script to work even without the changes unless I selected "use non-JS interface". Aaron Liu (talk) 12:36, 16 August 2024 (UTC)

::::Aaron Liu, You’re right. But If I had installed this with importScript, I wouldn’t be able to make the above changes to it, correct?Saqib (talk I contribs) 13:17, 16 August 2024 (UTC)

:::::Yes you would. Like I said, the script exposes some functions so we could simply place the part I made after the importScript and it’ll work. Aaron Liu (talk) 14:29, 16 August 2024 (UTC)

::This seems flawed in two ways: it would result in a ReferenceError because the global SmartWatchlist doesn't exist until the external script is loaded, which is asynchronous; and clearSettings is not a global so another ReferenceError when the new function actually runs. So you'd have to do something like: mw.loader.getScript('/w/index.php?title=User:UncleDouggie/smart_watchlist.js&action=raw&ctype=text/javascript').then(function () {

var clearSettings = SmartWatchlist.clearSettings;

SmartWatchlist.clearSettings = function () {

if ( confirm( "Clear all of your settings?" ) ) {

clearSettings.apply(this, arguments);

}

};

}); Nardog (talk) 01:34, 17 August 2024 (UTC)

:::Fair. It works on my machine though :) Aaron Liu (talk) 01:47, 17 August 2024 (UTC)

Unclutter script broken

The signature minimisation feature is broken in this script due to updates by Krinkle to MediaWiki this year and I am unable to contact the author due to their four year inactivity and the MW dev is unresponsive. 1989 (talk) 15:11, 18 August 2024 (UTC)

:@1989 Which update? And, how does the breakage manifest in this script? Krinkle (talk) 18:47, 18 August 2024 (UTC)

::My guess is the linking of timestamps, which stops the script from detecting signatures. Aaron Liu (talk) 20:26, 18 August 2024 (UTC)

:::That seems to be what is the cause. I ran into a page where the timestamp link doesn’t work, and the user script is able to work. {{ping|Krinkle}} Is there a script that can optionally disable that? 1989 (talk) 21:53, 18 August 2024 (UTC)

::::It's never a good idea to use something that's not going to be updated much. Like I said, I'd recommend Convenient Discussions (the JWBTH/CD link below). Aaron Liu (talk) 22:24, 18 August 2024 (UTC)

:::::What you’ve suggested is unfortunately not a solution for me. 1989 (talk) 23:31, 18 August 2024 (UTC)

::::::@1989 Which "updates to MediaWiki" is this about? Krinkle (talk) 21:38, 6 September 2024 (UTC)

:::::::Did your reply script lag for 19 days? Aaron Liu (talk) 01:38, 7 September 2024 (UTC)

:I would recommend c:User:JWBTH/CD in the toggleable Flow-like interface combined with WP:POPUPS. Aaron Liu (talk) 20:27, 18 August 2024 (UTC)

Auto-open Wikidata item

I work on {{cl|Articles missing coordinates with coordinates on Wikidata}} in bulk occasionally, and a tool that would speed up the process a lot is a script similar to User:SD0001/UnassessedArticleLinks.js, which opens pages of a certain category in a new tab and automatically opens Rater. The script I'm envisioning would automatically open the linked Wikidata item for the article in a new tab and the edit page for the article when clicking on an article in {{cl|Articles missing coordinates with coordinates on Wikidata}}.

For example, as I'm writing this the current top article alphabetically in that category is ¡Cu-Cut! incident. With this script, when clicking on the link to that article within the articles missing coordinates category listing, it would open two new tabs: one with https://en.wikipedia.org/w/index.php?title=%C2%A1Cu-Cut!_incident&action=edit open, and one with wikidata:Q14521476 open. Hopefully that makes sense? Suntooooth, it/he (talk/contribs) 23:03, 20 August 2024 (UTC)

:I think it would be possible to auto-generate and insert the coord template with the Wikidata API. Anyone interested in this can check out Special:Diff/1238811453 and wikidata:Wikidata:REST API. Aaron Liu (talk) 01:00, 21 August 2024 (UTC)

::That would be very cool - I already have [https://github.com/Suntooth/wiki-coords my own external program] for generating the coords template that copies it to clipboard, but I'd be interested in seeing an automatic on-wiki version :] Suntooooth, it/he (talk/contribs) 15:03, 21 August 2024 (UTC)

  • The code below extracts coordinates from Wikidata and prepares the wikitext for the coord template.

var qid = mw.config.get('wgWikibaseItemId')

$.get('https://www.wikidata.org/w/rest.php/wikibase/v0/entities/items/' + qid).then(function(data) {

if (!data.statements.P625) {

alert('No coordinates on wikidata')

return

}

var value = data.statements.P625[0].value.content;

var latitude = value.latitude;

var longitude = value.longitude;

var template = '{{coord|' + latitude + '|N|' + longitude + '|W|display=inline,title}}';

console.log(template)

})

The problem is that I'm not much familiar with coordinates on Wikipedia and not sure if the values are correct and can be used on articles. For example, on Bidkhun-e Morghak this code outputs {{coord|29.11694444|N|57.88777778|W|display=inline,title}} which is a bit different from what is shown in the infobox and not sure if we should round (down/up?) those latitude and longitude values to N decimal places. I need some guidance on what the expected output looks like, then i will work on the rest of the script which includes inserting the output into the edit box. Thanks. Jeeputer Talk 00:25, 2 September 2024 (UTC)

:With a quick search I found out that the {{property|P625}} only supports World Geodetic System 1984 (aka WGS84), and per WP:OPCOORD, the value from Wikidata (which uses WGS84) is not always appropriate to be inserted into articles. Asking Suntooooth for help. Thanks. Jeeputer Talk 00:35, 2 September 2024 (UTC)

::I'm not sure why you say that WGS84 isn't always appropriate - Wikipedia:WikiProject Geographical coordinates#Geodetic system says "All coordinates specified through {{tl|coord}} must be referenced to WGS84, or an equivalent datum." For a generic script, I feel like truncating to either 0.1′′ or 0.00001 precision should be fine, since those are the most precise but useful coordinates (someone can always make it less precise very easily if it's referring to, say, a town, but it's more work to make it more precise after the fact).

::Also, does the Wikidata API always automatically output in dd.ddddd format, or is it sometimes in degrees-minutes-seconds? When I open the Wikidata page for the article you linked, it shows the coordinates in degrees-minutes-seconds for me. This would explain why the template on that article is formatted differently, since that's also in DMS.

::And one last thing - I'm not sure why you've hard-baked N and W into the template output considering that's not a given. Either the coordinate numbers will have positive and negative possibilities (in which case the direction doesn't need to be specified) or they will have only positive possibilities and N/S and E/W have to be specified. Look at the documentation for {{tl|coord}} for more info. Suntooooth, it/he (talk/contribs) 00:54, 2 September 2024 (UTC)

:::Looking at the documentation for {{tl|coord}} is advised anyway, since that'll describe your expected output. Suntooooth, it/he (talk/contribs) 00:56, 2 September 2024 (UTC)

:::@Suntooooth: Not being familiar with coordinates is the answer, I'm a complete newbie in this context. :)

:::The property itself (P625, linked above) says that "only WGS84 coordinating system is supported at the moment". I think DMS is only the way it is parsed and shown there (hence the value itself is entered in DMS system). If you use the code above in your browser's console, the result is always in WGS83 system, giving lat and long values instead of degrees-minutes-seconds.

:::I read the documentation and I think something like {{coord|29.11694|57.88777|display=inline,title}} looks fine for a start. What do you think? Jeeputer Talk 20:35, 2 September 2024 (UTC)

::::That looks good, yeah! Check with some other articles to make sure specifying N/S and E/W isn't required (for example, check a location in South America - if specifying isn't required, both latitude and longitude will be negative, but if specifying is required they'll be positive). Suntooooth, it/he (talk/contribs) 20:47, 2 September 2024 (UTC)

:::::@Suntooooth: I tested the code on Contando a féria and both latitude and longitude are negative. Looks good. I will continue writing the script and will let you know of the result. By the way I will round numbers to 5 decimal places. Jeeputer Talk 20:56, 2 September 2024 (UTC)

::::::WP:AutoEd's core script is an example of how to manipulate the edit field. Godspeed! Aaron Liu (talk) 00:20, 3 September 2024 (UTC)

:::::::@Suntooooth: Coord Inserter is almost ready to use. There's an issue with copying the template to clipboard if {{para|coord}} not found. I will try to fix the issue tomorrow. But the script works fine with articles having the parameter (example edit).

:::::::@Aaron Liu: Thanks for your advice. it took me about an hour to find out how to insert the template into the text area. Btw can you help me with the problem I mentioned? I know that document.execCommand('copy') is deprecated, but there's a weird problem i can't understand. I can explain if you can help. Thanks. Jeeputer Talk 01:35, 3 September 2024 (UTC)

::::::::I ran the stuff in the console and got this:{{tqb|document.execCommand(‘cut’/‘copy’) was denied because it was not called from inside a short running user-generated event handler.}}Searching it up and following a link from stackoverflow, [https://stackoverflow.com/questions/41094318/firefox-document-execcommand-cut-copy-was-denied-because-it-was-not-calle the deprecated thing can only be used inside an event handler], such as a click listener. So we have a few options to go from here:

::::::::# [https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard Use the new asynchronous clipboard API.]

::::::::# Attach a click handler to the mw.notify that copies the thing.

::::::::{{pb}}{{#tag:aside|The script you copied from seems really crufty. It creates an additional element for seemingly new reason and uses {{!xt|.setAttribute('value', new_url);}} instead of {{xt|1=.value = new_url;}}.}} Aaron Liu (talk) 01:59, 3 September 2024 (UTC)

:::::::::@Aaron Liu: The weird thing is that when I manually open the edit form of the page and then run the code there, the copy command works. I don't know how to use the clipboard API. Actually, I tried using the API, but as it asks for user's permission to read/write the clipboard, I think it's not the best solution. Attaching an event handler to mw.notify looks fine to me, I will test it. Thank you. Jeeputer Talk 10:54, 4 September 2024 (UTC)

:::::::::And it's done, problem solved. The template syntax now gets inserted into the clipboard by clicking on the notification. Thank you. Jeeputer Talk 17:02, 4 September 2024 (UTC)

::::::::::Thanks for your hard work on this script! :] Suntooooth, it/he (talk/contribs) 19:06, 4 September 2024 (UTC)

:::::::::::@Suntooooth: Nevermind. :) I really enjoy it. Let me know if you had any ideas to improve the script, or found any issues. Thanks. Jeeputer Talk 19:14, 4 September 2024 (UTC)

::::::::::::It doesn't seem to be working for me, for some reason - the edit link shows up fine on :Category:Articles missing coordinates with coordinates on Wikidata, but when the edit page pops up nothing has changed in the article. I tested it on ¡Cu-Cut! incident and Ahsham-e Sartal. I'm on original Vector rather than Vector 2022, which might be the issue? I'm not sure. Suntooooth, it/he (talk/contribs) 19:36, 4 September 2024 (UTC)

:::::::::::::Pinged you on the script's talk page. Jeeputer Talk 20:27, 4 September 2024 (UTC)

:::::::Looks like Suntooooth also does Javascript. So maybe he can help too. Jeeputer Talk 01:43, 3 September 2024 (UTC)

::::::::Oh, I really don't :P The scripts I've made have entirely been simple portlet links by following tutorials - I do computer science, but Javascript isn't one of the languages I know. Suntooooth, it/he (talk/contribs) 01:48, 3 September 2024 (UTC)

Undo any of your changes by double-clicking them in the preview window

Would it be possible to implement a feature similar to the one in AutoWikiBrowser, where you can preview your changes and then easily undo any of them by double-clicking in the preview window? I didn't see this feature available as a userscript. It would be very helpful, especially when using tools like Wikipedia:AutoEd for semi-automated editing, where multiple changes are made to a page and you sometimes need to quickly undo specific edits without having to scroll back and forth to the editing box. 2001:14BA:9C40:0:B1BC:5F0A:4848:2904 (talk) 22:27, 1 September 2024 (UTC)

:+1, this would be very useful. Suntooooth, it/he (talk/contribs) 00:55, 2 September 2024 (UTC)

:User:Nardog/DiffUndo. Kind of experimental, let me know if it works. Nardog (talk) 04:46, 7 September 2024 (UTC)

::Looking great! I wonder if you're aware of the Latin word wikt:diffundo, also known as a Harry Potter spell that cuts things? Aaron Liu (talk) 15:31, 7 September 2024 (UTC)

::Thank you very much! It has worked very well in my home wiki so far. (OP) 2001:14BA:9C40:0:21F1:9332:6D2D:A0BA (talk) 20:41, 20 September 2024 (UTC)

:::Now that I think about it, I also really like another similar feature in AWB, where you can click (once) a change in the preview window, and it will automatically scroll to the corresponding line in the editing box, i.e., places your cursor at that line... :D (OP) 2001:14BA:9C40:0:21F1:9332:6D2D:A0BA (talk) 21:00, 20 September 2024 (UTC)

:Similar request at :m:Community Wishlist/Wishes/Partial revert undo; it's for already published changes though. Ponor (talk) 14:59, 20 September 2024 (UTC)

Easily add row headers to tables

For accessibility purposes (see WP:DTT), all tables should have "row headers". It is annoying to copy/paste ! scope="row" | ad nauseam and a script to quickly add these to a selected column would be much appreciated. Thanks, Charlotte (Queen of Heartstalk) 18:48, 11 September 2024 (UTC)

:God I wish. It's a constant need at WP:FLC. It'd be awesome to highlight a column in visual editor or something and click an "add row headers" button and it would add ! scope="row" for cells without a span and ! scope="rowgroup" for ones with one. Hey man im josh (talk) 01:14, 24 January 2025 (UTC)

::Might make more sense to build this into VisualEditor than to make it a user script. Consider filing a ticket on Phab for this and tagging it VisualEditor. Then of course drop the phab link here so myself and others can subscribe to it. –Novem Linguae (talk) 01:48, 24 January 2025 (UTC)

Warn the user about unattributed translations

Algorithm:

  1. Run only in mainspace and draftspace
  2. Check the oldest 10 edit summaries of the article for the word "translat" (i.e. translation, translated, etc.), case insensitive.
  3. If 2 is present, check the wikicode of the talk page for the word "translat", case insensitive.
  4. If 2 is present and 3 is not present, display a warning at the top of the page that says "Warning: This article is likely an unattributed translation. Please consider adding {{t|Translated from}} to the talk page." If you'd like an example of how I usually display page warnings in my user scripts, see User:Novem Linguae/Scripts/DetectG4G5.js, which displays a red bar at the top.

Would do myself but I'm a bit busy this month. Thanks in advance for any help. –Novem Linguae (talk) 08:32, 17 September 2024 (UTC)

:User:Vanderwaalforces/checkTranslationAttribution.jsNovem Linguae (talk) 10:33, 17 September 2024 (UTC)

Generating pings from past discussions

Merger wizard

Is there a user script which allows people to easily propose and finish merges. The current process is prone to error and takes a long time to be finished. If there is one like it, that would be great in combating the backlog. Tavantius (talk) 21:24, 24 September 2024 (UTC)

:What kind of features are you looking for? Copy paste the old article into the bottom of the new article in a new section, then WP:BLAR the old article? –Novem Linguae (talk) 22:47, 24 September 2024 (UTC)

::Huh, if a script did that and added all the copied tags and old id's etc., that would be genuinely great. CMD (talk) 02:37, 25 September 2024 (UTC)

::Basically I want it to help create a merging discussion and if the discussion closes as merge, it'll help you copy-paste parts of the old article into the new article and do all the tagging as well. Tavantius (talk) 12:20, 26 September 2024 (UTC)

:There is Easy-Merge that does some of what you're requesting. ~Kvng (talk) 17:08, 21 October 2024 (UTC)

"Was" in TV articles

I'm still finding TV show articles that follow the form "Name of show was" despite MOS:TV having long established "Name of show is" as a standard. Could a bot be made to find cases of articles still using "was"? Maybe search for that word in the first sentence? Ten Pound Hammer(What did I screw up now?) 19:11, 28 September 2024 (UTC)

:WP:QUARRY might be more suited for this. Nardog (talk) 02:19, 7 October 2024 (UTC)

::I don't think so{{snd}}{{tq|Quarry does not have access to page content, so queries which require checking wikitext cannot be answered with Quarry.}} jlwoodwa (talk) 00:24, 14 October 2024 (UTC)

:::I would have thought that at least the lead was available since it's cached for Page Previews. Nardog (talk) 07:22, 14 October 2024 (UTC)

:Check out {{tl|search link}} ~Kvng (talk) 17:13, 21 October 2024 (UTC)

[[wikispecies:User:Rillke/createRedirects.js]] no longer working

Hello,

On Wikispecies, there is a user script created by Rillke, wikispecies:User:Rillke/createRedirects.js, which has not been functional for several months: wikispecies:Wikispecies:Village Pump/Archive 68#The script common.js.

The script is used to create redirects to a given page. See for example wikispecies:Epipactis helleborine subsp. helleborine. When using the script, a first click on a toolbar link labeled "Create Redirects" highlights all potential redirects to be created; in this case, all the names in italics listed under the heading "Synonyms" are highlighted (e.g., Serapias helleborine var. latifolia, Cymbidium latifolium, etc.). It is possible to deselect some of them by clicking on the highlighted names. A second click on the link will then create the redirects to wikispecies:Epipactis helleborine subsp. helleborine.

Rillke was contacted, but they said they were "currently out of capacity" (see commons:User talk:Rillke/Discuss/2019#common.js).

When using the script, it no longer highlights potential redirects. Could someone help us understand why this script is no longer working? Thanks in advance, Korg (talk) 11:41, 3 October 2024 (UTC)

:Seems like it's due to mw:Heading HTML changes. I've forked and patched it at species:User:Nardog/createRedirects.js. Nardog (talk) 02:15, 7 October 2024 (UTC)

::{{Hidden ping|Nardog}}Many thanks Nardog for the explanation and for patching the script! All the best, Korg (talk) 10:53, 8 October 2024 (UTC)

See further discussion at wikispecies:User talk:Nardog#createRedirects.js. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:32, 7 October 2024 (UTC)

[[User:Bellezzasolo/Scripts/arb]]

Hi. Is it possible for someone to take this over? Bellezzasolo hasn't edited for five months, and it looks like his script stopped working when ARBDS changed to CTOPs (see {{u|FormalDude}}'s note on its talk and my illustation). But it's phenomonally useful; any thoughts? SerialNumber54129 14:30, 10 October 2024 (UTC)

:Serial Number 54129: I've [https://en.wikipedia.org/w/index.php?title=User:Bellezzasolo/Scripts/arb.js&curid=56987842&diff=1250466874&oldid=1147196090 applied an update] to this script, and fixed a couple of things along the way. There are still duplicate entries in the dropdown; that's more or less unavoidable since the duplicates are there in the original list itself. Let me know if you run into any issues. Writ Keeper  15:54, 10 October 2024 (UTC)

::Wow, thanks {{u|Writ_Keeper}}! It works great—thanks very much! Wish I'd asked a few months ago now :) SerialNumber54129 16:04, 10 October 2024 (UTC)

:@Serial Number 54129. I use User:TheresNoTime/Scripts/CT-Helper.js nowadays. –Novem Linguae (talk) 10:50, 21 November 2024 (UTC)

::Thanks {{u|Novem Linguae}}! Tight faded male arse. Decadence and anarchy. A certain style. Smile. 12:11, 21 November 2024 (UTC)

[[User:Enterprisey/unblock-review]]

Would someone be interested in adopting this? Right now, there are only about 50 of us using it, but that's because it has a couple of unreliability issues.

  1. Sometimes it just fails harmlessly, with no message to the user -- it just doesn't do anything at all.
  2. Sometimes (pretty often) it fails slightly harmfully, putting the desired text in the wrong place (usually in a block notice where the example unblock request is presented).
  3. It automatically submits the changed page, with no chance to preview.

I'm thinking that the second problem has to do with a check for "tlx|unblock" failing -- a regex issue? something to do with "chunkFiftyCharactersWide" being a wrong "chunk"? The first problem just needs an informative popup, but it would be nice to actually fix that problem. The third, I imagine, is where the "postWithToken" occurs; both the "accept" and "decline" should do the same thing "Show preview" does, i.e., show a preview.

I could study debugging scripting and all that, but I'd just as soon someone who already knows how do these (apparently) little things. --jpgordon𝄢𝄆𝄐𝄇 18:19, 29 October 2024 (UTC)

:I've worked on this user script before. If you can make me a list of bugs (oldid and description for each bug), I can probably find some time to take a look at it. The last time I worked on this I reorganized the code into a wikicode in -> wikicode out function and [https://github.com/enterprisey/unblock-review/blob/trunk/tests/unblock-review.test.js set up unit tests], so this shouldn't be terribly hard to work on. –Novem Linguae (talk) 22:28, 29 October 2024 (UTC)

::Assume I'm ignorant. (And it's amazing what skills can vanish after 20 years of retirement from the profession.) I just listed the bugs/deficiencies above; oldid of what? --jpgordon𝄢𝄆𝄐𝄇 22:46, 29 October 2024 (UTC)

:::Pardon my lack of clarity. By oldid I mean a link to the revision of the page that failed. I need to go grab the wikitext so I can reproduce the error. [https://en.wikipedia.org/w/index.php?title=User_talk:Jaydenstyy&oldid=1104756676 Here's an example.] Notice how the URL had &oldid= in it :) –Novem Linguae (talk) 03:07, 30 October 2024 (UTC)

::::I've been here two decades, I know exactly what an oldid is; you didn't specify the oldid of what. Try this one: [https://en.wikipedia.org/w/index.php?title=User_talk:Rathoremohanrathore&oldid=1254315616]. It will fail as described in #2 above. --jpgordon𝄢𝄆𝄐𝄇 15:14, 30 October 2024 (UTC)

:::::What I was trying to say is the most useful format for me would be a list like this...

:::::* Bug1: oldid, description

:::::* Bug2: oldid, description

:::::* Bug3: oldid, description

:::::Will take a look at the above diff when I get time. Stay tuned. –Novem Linguae (talk) 21:52, 30 October 2024 (UTC)

  • 1: [https://en.wikipedia.org/w/index.php?title=User_talk:Jean_Zboncak&oldid=1254425403]. Fails silently.
  • 2: [https://en.wikipedia.org/w/index.php?title=User_talk:Rathoremohanrathore&oldid=1254315616]. Result ends up in wrong place
  • 3: All instances, feature change: it needs to let us review rather than simply publishing.

Thanks for your help. --jpgordon𝄢𝄆𝄐𝄇 01:28, 31 October 2024 (UTC)

:4: [https://test.wikipedia.org/w/index.php?title=User_talk:Novem_Linguae&oldid=621893]. Result overwrites the section above it. –Novem Linguae (talk) 03:40, 31 October 2024 (UTC)

::I forked the user script tonight and started refactoring the code to make it more readable, and kind of just refreshed my memory about how this user script works. You can install it at User:Novem Linguae/Scripts/UnblockReview.js if you want. Don't forget to turn off the old user script in your common.js so that the two don't clash. No bug fixes yet, but will work on this again soon. –Novem Linguae (talk) 05:14, 31 October 2024 (UTC)

:::Cool. I'll start using it. --jpgordon𝄢𝄆𝄐𝄇 05:31, 31 October 2024 (UTC)

:User:Novem Linguae/Scripts/UnblockReview.js is now ready for wider use, if anyone would like to try it out. –Novem Linguae (talk) 10:48, 21 November 2024 (UTC)

::I highly recommend it; it works much better than Enterprisey's version. --jpgordon𝄢𝄆𝄐𝄇 15:46, 21 November 2024 (UTC)

Copy named refs from split page

After splitting a page, citation errors occur as they the named references from the starting sections of the page are not copied after splitting below sections to a new article. Is there/Can someone develop a script which copies ref data from another pages with same name? I had this problem in List of post offices in Colorado: G–O#Notes, where the refs are located at List of post offices in Colorado: A–F. Thanks! ~/Bunnypranav:<ping> 05:40, 30 November 2024 (UTC)

:{{re|User:AnomieBOT}} This occurs for the three-way split:

::List of post offices in Colorado: A–F

::List of post offices in Colorado: G–O

::List of post offices in Colorado: P–Z

:Thanks,  Buaidh  talk e-mail 19:25, 30 November 2024 (UTC)

Cherry-pick diffs

A lot of the time, I have an article where an old version was better in some ways, but the newest version is better in other ways (e.g. after a mixed-quality edit spread across multiple sections). What I'd like is some way to take a diff between these two versions, and then paragraph-by-paragraph, select which paragraph I think is better (like I can already do with edit conflicts). Ideally in the visual editor, but it doesn't have to be, especially if there's some way to fold/hide templates and citations. – Closed Limelike Curves (talk) 03:19, 1 December 2024 (UTC)

:User:Nardog/DiffUndo Aaron Liu (talk) 03:48, 1 December 2024 (UTC)

::I've seen it, and it's very good—90% of the way there. Basically all I'd need is a feature where if I have a diff, I can click a button that uses this interface to compare the two versions side-by-side. Right now, the script only shows differences from the current version. – Closed Limelike Curves (talk) 19:14, 1 December 2024 (UTC)

:::You could go to the old revision you want to compare against (by clicking its timestamp), click on "edit", and your edit box will be prefilled with the contents of the old revision. From there, just press "show changes". Aaron Liu (talk) 20:01, 1 December 2024 (UTC)

Customise

I'm not sure how possible this is, but it would be really nice to have a user script which adds a new icon to the top toolbar (where one's username is, notifications, watchlist, etc.) which could be customized using custom images + a custom link which it leads t 103.73.46.225 (talk) 10:40, 2 December 2024 (UTC)

:Good idea. See User:Polygnotus/Scripts/Todoes.js (although thats not as userfriendly as what you propose). Polygnotus (talk) 23:25, 6 December 2024 (UTC)

Source assessing

I created User:Polygnotus/Scripts/SourceTable and then I discovered {{tl|Source assess table}} and {{tl|ORGCRIT assess table}}.

User:DannyS712/SATG and User:Red-tailed hawk/SATG CORP.js also exist.

Can someone make a version that combines the functionality of automatically retrieving the sources, like User:Polygnotus/Scripts/SourceTable does, with a simple interface where you can judge them. It should be usable for both NCORP stuff and non-NCORP stuff. Bonus points if you can generate the code, close the popup, save the page and then edit it again and keep going where you left off judging sources. Polygnotus (talk) 23:16, 6 December 2024 (UTC)

User:BilledMammal/MovePlus.js

Please make MovedPlus.js add pages edited or moved by the script to the watchlist (or match the settings in Special:Preferences). @BilledMammal hasn't edited in almost a month or responded to requests on their talk page. Frost 03:19, 10 December 2024 (UTC)

:Is User:Polygnotus/Scripts/MovePlusWatch.js what you want? Polygnotus (talk) 23:02, 11 December 2024 (UTC)

:{{ping|Frost}} please test this and if it works copy it to your own userspace and let me know. Polygnotus (talk) 23:30, 11 December 2024 (UTC)

::@Polygnotus it adds moved pages to the watchlist but not pages with retargeted links. Frost 01:35, 12 December 2024 (UTC)

:::{{ping|Frost}} And [https://en.wikipedia.org/w/index.php?title=User%3APolygnotus%2FScripts%2FMovePlusWatch.js&diff=1262623865&oldid=1262538908 now]? Polygnotus (talk) 10:01, 12 December 2024 (UTC)

::::Perfect. Thanks! Frost 10:19, 12 December 2024 (UTC)

:::::{{ping|Frost}} Please copypaste it to your own userspace, e.g. User:Frost/MovePlusWatch.js and install it from there. I already have way too many pages in my userspace! Polygnotus (talk) 10:23, 12 December 2024 (UTC)

::::::Done. Frost 10:25, 12 December 2024 (UTC)

::::::Not sure what you mean by "too many pages in [your] userspace" lol. It's perfectly fine to have a lot of scripts! Aaron Liu (talk) 20:37, 20 December 2024 (UTC)

Script for awarding [[WP:Four Awards]]

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

:Won't all this focus on content distract us from our real goal: bickering and infighting? Polygnotus (talk) 10:12, 12 December 2024 (UTC)

::I could propose a script to automate that, so we could fit both in? ♠PMC(talk) 12:16, 12 December 2024 (UTC)

:::How dare you suggest a reasonable comprimise! That is not what we do here! Polygnotus (talk) 12:57, 12 December 2024 (UTC)

::::I'm Canadian! It's instinctive! I'm sorry! ♠PMC(talk) 13:55, 12 December 2024 (UTC)

:I don't know if it will help, but {{tl|GOCE award}} greatly simplified award delivery for the Guild of Copy Editors. The copy/paste samples are especially helpful. – Jonesey95 (talk) 17:33, 12 December 2024 (UTC)

::It's really the adding to the Records table with all the fiddly templates and dates that's the annoying part, which I'm not sure that template can really help with. ♠PMC(talk) 01:00, 13 December 2024 (UTC)

:::Please link to an example edit. – Jonesey95 (talk) 02:14, 14 December 2024 (UTC)

::::There are diffs for each step in the script idea that I linked. ♠PMC(talk) 04:55, 14 December 2024 (UTC)

A better RM closing script

I'm here to ask for a script similar to User:BilledMammal/Move+, but where, if multiple pages are being RM'd, the first page on the "pages to move" list in the script's menu is always the first page in the RM, regardless of the title of the page where the RM has been made. This is to prevent the ordeal that took place here from happening again. JJPMaster (she/they) 15:23, 16 December 2024 (UTC)

:@JJPMaster I think I can add this to my user tools script (see doc page here). Could you give me the following and I will try to implement it:

:* What namespace: based on what I'm understanding, article.

:* In steps, at least at the high level, what you would like it to do. I'm not sure I would be able to fork the script but I may be able to implement the features you request.

:{{User:TheTechie/pp}} TheTechie@enwiki (she/they {{pipe}} talk) 00:17, 4 January 2025 (UTC)

::@TheTechie:

::# Namespaces: This tool would work in any namespace.

::# Steps:

::## There would be a button or some other indication that allows me to close an RM

::## I press it, and it allows me to choose between "Moved", "Not moved", and "No consensus", and also allow me to indicate if the page is being moved to a title other than what the RM proposal said

::## If there are multiple pages being moved, the title of the page will not be taken into consideration unless it is also included in the RM list; so as to avoid accidentally moving an entire WikiProject because an RM took place on its talk page

::## Afterward, it will add the {{tlx|Old move}} template to the talk pages of every article moved, and perform the moves

::JJPMaster (she/they) 03:37, 4 January 2025 (UTC)

SFN page numbers

Hello! A pain point for myself, and others who pursue FAs, is ensuring that the SFN & HARVNB templates is "p=" for single page (e.g., p. 4) and "pp=" for a citation spread across pages (e.g., pp. 4–6 or pp. 4, 6). I don't want to dictate outcomes here but I'd be very interested (as, I am sure, would all FA contributors) in something that makes this easier. Either by highlighting infractions or fixing it automatically. Would be cool to hear any thoughts. — ImaginesTigers (talkcontribs) 18:46, 7 February 2025 (UTC)

:A script would be nice yes. But doesn't WP:AWB take care of this already? I could be wrong though. Headbomb {t · c · p · b} 18:53, 7 February 2025 (UTC)

:: I have looked through the areas I would expect to see that functionality included in (e.g., autoFormatter) and no, it doesn't. This request came out of an FAC discussion – I think someone would have told me if AWB was able to do it (unless the feature's been forgotten). But yeah I don't see it there sadly. — ImaginesTigers (talkcontribs) 19:28, 7 February 2025 (UTC)

:::Hi {{u|ImaginesTigers}}, there actually is a script for this (a bloody nice bit of kit from Laboratoires {{u|Lingzhi}}), not only does it highlight pp. errors, but also alerts when publications are too early for ISBNs, need a pub. location, doi etc; in fact, all the stuff pernickety errors source reviewers highlight... i.e., it's where they find 'em ;) Serial (speculates here) 20:02, 7 February 2025 (UTC)

:::: Hello, Serial! Thank you so much for telling me.

:::: Pinging some other folk who may be interested in this: {{user|Noleander}}, {{user|SchroCat}}. — ImaginesTigers (talkcontribs) 20:17, 7 February 2025 (UTC)

Pending changes defcon

Alright so I've been using User:Jeeputer/defconIndicator.js (super useful script by the way @Jeeputer) to check for vandalism information quickly in my toolbar, but I've been wanted to change it to show the pending changes backlog (like this). Problem is I haven't the slightest clue how to change user scripts, and I think Jeeputer's one uses ORES. Any thoughts are greatly appreciated, thanks! Sophisticatedevening (talk) 23:42, 18 February 2025 (UTC)

:@Sophisticatedevening: Hi. If you are familiar with Javascript, you can copy the code to your own userspace (i.e. a subpage) and tweak it to do what you want, otherwise I can expand the script to show the pending changes backlog too, or even create a new script for that purpose (the latter is preferred). Jeeputer Talk 08:06, 19 February 2025 (UTC)

::Thanks for the response! Unfortunately my coding skills do not extend beyond basic html, so I'm not able to tweak it effectively myself. If you have the time to expand or create one, that would be super appreciated. Sophisticatedevening (talk) 12:24, 19 February 2025 (UTC)

CategoryFilter

Can anyone create a script that can filter categories by namespace? If it be further sorted by the time of entry of an article into a category, it will be even better. These informations are already available in XML format ([https://en.wikipedia.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Pages_where_post-expand_include_size_is_exceeded&cmprop=title%7Ctimestamp&cmlimit=500&cmnamespace=0&format=xml&cmsort=timestamp&cmdir=desc example]), however that doesn't allow clicking or previews. Thanks! CX Zoom[he/him] (let's talk • {CX}) 16:01, 13 March 2025 (UTC)

: I can't build scripts, but can you elaborate on your request for the sake of editors who can? Are you talking about a search while sitting on a category page, and what kind of output are you expecting? Not knowing what you mean makes it hard to be sure, but I think that the Petscan tool might possibly do what you want. Mathglot (talk) 20:36, 3 April 2025 (UTC)

::Yeah, petscan should work. Thanks! CX Zoom[he/him] (let's talk • {CX}) 23:08, 3 April 2025 (UTC)

Adding custom buttons to VE and DiscussionTools

{{tracked|T390807}}

{{tracked|T391403}}

In the old WikiEditor it is pretty easy to define some [https://www.mediawiki.org/wiki/Extension:WikiEditor/Toolbar_customization custom buttons].

I have made proof of concept scripts that load a JSON file with custom buttons, and allow using any image instead of just [https://doc.wikimedia.org/oojs-ui/master/demos/?page=icons&theme=wikimediaui&direction=ltr&platform=desktop these], both for VE and DiscussionTools.

For reasons beyond my understanding the WMF does not appear to be interested in actually providing this functionality.

I do not believe in JavaScript and I think it is morally wrong. Is there some JavaScript god here who can look at these proofs of concept and make something better (or less shit)?

I uploaded the code to Phabricator, links are on the right hand side.

Ideally as much of the WikiEditor toolbar customization options as possible would be supported. Ideally there would also be a script to generate the JSON.

File:Newtopictoolbuttons.jpg|Screenshot of script adding extra buttons to the New Topic Tool

File:Replytoolbuttons.jpg|Screenshot of script adding extra buttons to the ReplyTool

File:VEbutton.jpg|Screenshot of script adding an extra button to the Visual Editor

File:VEbuttons.jpg|Screenshot of script adding extra buttons to the Visual Editor

Polygnotus (talk) 21:13, 8 April 2025 (UTC)

:Sounds like you started writing a user script and you want us to take a look at the code. Got a link to the user script? –Novem Linguae (talk) 22:57, 8 April 2025 (UTC)

::@Novem Linguae

::For VE:

::*User:Polygnotus/Scripts/VEbuttons.js loads its config from

::*User:Polygnotus/VEbuttonsJSON.json

::*User:Polygnotus/Scripts/VEbutton.js (only one button, as a MVP)

::For DiscussionTools:

::*User:Polygnotus/Scripts/ReplyButtonsv4.js loads its config from

::*User:Polygnotus/ReplyButtonsJSON

::Polygnotus (talk) 23:00, 8 April 2025 (UTC)

:::For someone that thinks JavaScript is {{tq|morally wrong}}, you sure seem quite proficient at it :) –Novem Linguae (talk) 23:04, 8 April 2025 (UTC)

::::@Novem Linguae Check out my userpage. I hate JavaScript. I have been using the NoScript Firefox extension for well over 15 years. User:Polygnotus/Scripts/DetectPromo-v2.js is forked from your script. Polygnotus (talk) 23:04, 8 April 2025 (UTC)

[[User:BilledMammal/MovePlus.js]] and [[User:Frost/moveplus.js]]

@Nurg informed me of an error which affects both the version of Move+ created by @BilledMammal and @Polygnotus's fork (hosted in @Frost's userspace).

When using the 'Notify WikiProjects' function, and when notifying WikiProject New Zealand, an error occurs when a comment is left in the move discussion. Move+ leaves the code ealand Wikipedians' notice board, effectively removing the "New Z" from "New Zealand" in the comment.

See Special:Diff/1285364289 for BilledMammal's version making the error and Special:Diff/1285372599 for Polygotus's version making the error.

Is anyone able to fix the error and take on maintaining the script as BilledMammal hasn't edited in a number of months since the outcome of WP:ARBPIA5.

Ps, if someone does take it on, forking from BilledMammal's version would be in my opinion preferable, as that version doesn't add pages to the watchlist. TarnishedPathtalk 10:38, 13 April 2025 (UTC)

:{{ping|TarnishedPath}} The difference between User:BilledMammal/Move+ and User:Frost/moveplus.js is that I added 4 lines of code to watchlist the relevant pages upon Frost's request.

:Try User:Polygnotus/Scripts/Tarnished.js. Polygnotus (talk) 10:50, 13 April 2025 (UTC)

::@Polygnotus per Special:Diff/1285377884 that seems to have done the trick. TarnishedPathtalk 10:56, 13 April 2025 (UTC)

:::@TarnishedPath I added const WATCHLISTPAGES = false; to the top. If you set it to true it watchlists pages. The original script just strips 15 characters which assumes the prefix is "Wikipedia talk:". Polygnotus (talk) 11:02, 13 April 2025 (UTC)

::::Mate I haven't coded in almost 20 years, when I was at university. It's all Greek to me. TarnishedPathtalk 11:06, 13 April 2025 (UTC)

:::::If {{ping|Frost}} updates their copy of the script they should set const WATCHLISTPAGES to true and then it will watchlist the pages for them. Polygnotus (talk) 11:10, 13 April 2025 (UTC)

::::::I don't want that feature anymore. Is it okay if I import User:Polygnotus/Scripts/Tarnished.js directly? Frost 11:15, 13 April 2025 (UTC)

:::::::@Frost Yup. Polygnotus (talk) 11:16, 13 April 2025 (UTC)

::::::::Yep, I found that feature was crowding out my watchlist at a rapid rate.

::::::::Bigger question though, is anyone able to maintain this script? I've made a copy in my userspace, but it really needs a maintainer.

::::::::Pinging @Aaron Liu, @JJPMaster and @TheTechie from discussions above. TarnishedPathtalk 11:20, 13 April 2025 (UTC)

:::::::::BilledMammal wrote: {{tq|I hope to return later this year or early 2026}} so hopefully they will be back soon. Which means that being a maintainer will not be a commitment for the rest of your life. Polygnotus (talk) 11:39, 13 April 2025 (UTC)

::::Ps, I've just noticed your DuplicateReferences script. Looks handy. TarnishedPathtalk 11:09, 13 April 2025 (UTC)

:::::Yeah its great for lazy people like myself. {{smiley|5}} When you have many references in an article it becomes near impossible to figure out which are duplicates without a script to help you. Polygnotus (talk) 11:10, 13 April 2025 (UTC)

Reflist Warning

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