Jump to content

Wikipedia:User scripts/Requests: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
→‎Wanted: A Script to Lexicographically Order Bullet-Lists: ::::I would love a script to sort bulleted list. That would be so incredibly useful. ~~~~
Line 311: Line 311:


:::Hey {{u|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: {{key|Ctrl|Alt|S}}. Lastly, it can now sort scripts with no "name" parameter. I'll have to look into <code>mw.Api.parse()</code>, it seems useful. [[user talk:Anne drew Andrew and Drew|<span style="color:#074">Anne&nbsp;drew</span>]] 23:39, 9 July 2019 (UTC)
:::Hey {{u|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: {{key|Ctrl|Alt|S}}. Lastly, it can now sort scripts with no "name" parameter. I'll have to look into <code>mw.Api.parse()</code>, it seems useful. [[user talk:Anne drew Andrew and Drew|<span style="color:#074">Anne&nbsp;drew</span>]] 23:39, 9 July 2019 (UTC)

::::I would love a script to sort bulleted list. That would be so incredibly useful. &#32;<span style="font-variant:small-caps; whitespace:nowrap;">[[User:Headbomb|Headbomb]] {[[User talk:Headbomb|t]] · [[Special:Contributions/Headbomb|c]] · [[WP:PHYS|p]] · [[WP:WBOOKS|b]]}</span> 15:42, 17 September 2019 (UTC)


== WikiProject status ==
== WikiProject status ==

Revision as of 15:42, 17 September 2019


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

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

Before you request a script, please make sure it does not already exist. For a list a user scripts, see this list.


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)[reply]

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)[reply]
@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)[reply]
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)[reply]

@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)[reply]

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)[reply]

@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)[reply]
@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)[reply]
@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)[reply]
@Guywan: you could screen for the first 2 sentences by counting the number of periods... DannyS712 (talk) 16:49, 1 June 2019 (UTC)[reply]
@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)[reply]
@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)[reply]
@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)[reply]
@Guywan: Also, for the comments, it should also allow newlines in the string (eg with "<!--(.|\n)*?-->") DannyS712 (talk) 17:14, 1 June 2019 (UTC)[reply]
@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)[reply]

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)[reply]

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)[reply]

@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)[reply]
@Edgars2007: it would come in handy, certainly.--Neve~selbert 17:07, 22 March 2018 (UTC)[reply]
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)[reply]
@Neveselbert: At least for English and German books, m:User:TMg/autoFormatter adds dashes to ISBNs. Sam Sailor 09:26, 17 April 2019 (UTC)[reply]

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)[reply]

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

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)[reply]

First draft here Doc James (talk · contribs · email) 02:53, 19 March 2018 (UTC)[reply]
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)[reply]
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)[reply]

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)[reply]

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)[reply]
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)[reply]
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)[reply]

Automatic American English

I want the reverse of Ohconfucious's American → British script so that it could convert British → American. IDK why it hasn't been done already. — Mr. Guye (talk) (contribs)  08:32, 26 July 2018 (UTC)[reply]

Do you have a link to the original script? --Danski454 (talk) 16:39, 3 August 2018 (UTC)[reply]
Is this the page in question? --Kailash29792 (talk) 16:49, 3 August 2018 (UTC)[reply]
I think this might be it: User:Ohconfucius/script/EngvarB.js --Danski454 (talk) 17:38, 3 August 2018 (UTC)[reply]
Danski454, Ohconfucious does not appear to have responded to a request to make a script that can convert British English to American. Are you working on it? Or does Canadian English follow the same style? --Kailash29792 (talk) 11:44, 24 August 2018 (UTC)[reply]
Kailash29792 I am not working on this script. Also, Canadian English is somewhere between British and American. Danski454 (talk) 18:47, 25 August 2018 (UTC)[reply]
I must thank Ohconfucius for making this possible, so this request may be archived. --Kailash29792 (talk) 08:54, 13 September 2018 (UTC)[reply]
No, this request should not be archived. There still is not an automatic edit script that converts British English to American English, nor does it seem like anyone is trying to create one. My request is far from fulfilled. — Mr. Guye (talk) (contribs)  01:25, 15 September 2018 (UTC)[reply]
Is anyone working on this? If not, I can take a stab at it. Warpaltarpers (talk) 16:05, 30 May 2019 (UTC)[reply]

Another editor in support of this script - Atsme Talk 📧 21:09, 20 July 2019 (UTC)[reply]

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)[reply]

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)[reply]
@Qono: I have written this: User:Danski454/w2wFinder. I am open to feedback. Danski454 (talk) 13:43, 19 December 2018 (UTC)[reply]
@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)[reply]
@Qono: Which browser, skin and editor are you using? Danski454 (talk) 21:20, 19 December 2018 (UTC)[reply]
@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)[reply]
@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)[reply]
@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)[reply]
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)[reply]
@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)[reply]

@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)[reply]

@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)[reply]
@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)[reply]
@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)[reply]
@Qono: Are you using the visual editor? Danski454 (talk) 17:44, 20 December 2018 (UTC)[reply]
@Danski454: I have the visual editor enabled, but was getting this result in source editing. Qono (talk) 18:05, 20 December 2018 (UTC)[reply]
@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)[reply]
@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)[reply]
@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)[reply]
@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)[reply]

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)[reply]

@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)[reply]
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)[reply]
@Kailash29792, DannyS712, and Enterprisey: User:Cumbril/Reference Organizer (formerly: User:Cumbril/References Consolidator) does that. Sam Sailor 09:39, 17 April 2019 (UTC)[reply]

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)[reply]

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)[reply]
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)[reply]

Script to help automate G5 tagging

Frequently I check special:newpagesfeed and go to 'by blocked users.' A lot of the time the blocked users are sockpuppet accounts that have made 25+ articles that would have to be manually tagged. Tagging all these articles is tedious and I frequently find myself asking sysops on IRC to run a special:nuke. I am requesting a script that could semi-automatically go through and tag G5 eligible articles from a user's contributions page or page creation logs if it has not been edited by another editor and was created after a date that the user would input. Thanks to anyone that might be able to help! Kb03 (talk) 19:28, 8 March 2019 (UTC)[reply]

@Kb03: I don't think this is a good idea for a script. For example, Wikipedia:Bots/Requests for approval/PkbwcgsBot 6 was denied because nominating pages for deletion should always be reviewed (as you say you will do) - but it also ties in with communicating with the editors, etc. I'm uncomfortable making this script unless there is a consensus that it would be permissible. Sorry, --DannyS712 (talk) 19:46, 8 March 2019 (UTC)[reply]
DannyS712, would an RfC be appropriate for this? Kb03 (talk) 19:47, 8 March 2019 (UTC)[reply]
@Kb03: Probably. Maybe even a discussion at WT:CSD or WP:AN. The actual script should be relatively straightforward to create (its a small matter of programming) but the potential consequences make me hesitant. --DannyS712 (talk) 19:48, 8 March 2019 (UTC)[reply]
DannyS712, one question. when you quote "Communicating with the editors, etc" are you saying the creator of the article or an editor that may dispute the G5? Kb03 (talk) 20:33, 8 March 2019 (UTC)[reply]
@Kb03: I believe that @Xaosflux was referring to the creator. And yes, I understand that this doesn't usually apply with G5, but you should still review pages individually imo. --DannyS712 (talk) 20:35, 8 March 2019 (UTC)[reply]
Yes, as such a script could be used for any reason. Perhaps getting "csd-batch" added to Twinkle may be useful, and also automate appropriate settings. Leaving a note at AN/ANI should normally be fine for a NUKE request though - in nuke situations page tagging isn't needed. — xaosflux Talk 20:45, 8 March 2019 (UTC)[reply]
Xaosflux, would you have an issue with me requesting the feature be added on WT:Twinkle? Kb03 (talk) 20:58, 8 March 2019 (UTC)[reply]
Kb03, I'm not sure it's a good fit for Twinkle. Mass-G5 tagging isn't particularly common to most users, and isn't something I think we should suggest is readily encouraged. Mass-tagging is just mass-editing, I think if it's really dramatic people have used AWB, but really as Xaosflux said a post to AN/ANI would be more than appropriate; tagging is just beside the point, especially if they're already blocked. — Preceding unsigned comment added by Amorymeltzer (talkcontribs) 21:53, 8 March 2019 (UTC)[reply]
Kb03 guess it is kind of niche, there really isn't a good reason for anyone to spend time mass-tagging, since you can just ask at AN. — xaosflux Talk 22:48, 8 March 2019 (UTC)[reply]
Xaosflux, Could TW then have a function that automated posting to WP:AN for that reason? RhinosF1(chat)(status)(contribs) 07:51, 9 March 2019 (UTC)[reply]
@RhinosF1: That, on the other hand, is a simple script to create - its just new section: please new pages created by XYZ. I don't think it should be included in twinkle, because of how rare it is; ping @Amorymeltzer to chime in about the need for twinkle vs standalone script. --DannyS712 (talk) 07:54, 9 March 2019 (UTC)[reply]
I can have a script in beta within a few days --DannyS712 (talk) 07:55, 9 March 2019 (UTC)[reply]
DannyS712, What about mass protection requests? RhinosF1(chat)(status)(contribs) 08:04, 9 March 2019 (UTC)[reply]
@RhinosF1: That would be harder, because RFPP works differently, and has a specific format. AN is just &section=new and explaining the issue --DannyS712 (talk) 08:09, 9 March 2019 (UTC)[reply]
DannyS712, Amorymeltzer might be able to advise as Twinkle can do one at a time. Can I also suggest criteria like U5/G11 as a potential for your script? That gets quite quite a few being done at a time then the user never editing again. RhinosF1(chat)(status)(contribs) 08:12, 9 March 2019 (UTC)[reply]
@RhinosF1: let me start with just requesting a nuke, a build from there. I have to go, but I'll get back to you with a draft version soon --DannyS712 (talk) 08:23, 9 March 2019 (UTC)[reply]
@RhinosF1: Current script at User:DannyS712 test/nuke.js makes edits like this (I just need to change the target page to AN, but until then it targets my sandbox so feel free to test it). Thoughts? --DannyS712 (talk) 04:24, 10 March 2019 (UTC)[reply]
Extended discussion moved to User talk:DannyS712 test/nuke.js --DannyS712 (talk) 08:04, 10 March 2019 (UTC)[reply]
ToBeFree, weren't you redesigning WP:RfPP RhinosF1(chat)(status)(contribs) 18:19, 9 March 2019 (UTC)[reply]
DannyS712, that would be a good alternative. I see no problems with it. Kb03 (talk) 21:08, 9 March 2019 (UTC)[reply]
I have tried to do the same now. Because G5 only applies to pages "that have no substantial edits by others", I had to manually check the substantiality of all edits not made by the blocked user. I also had to verify that the sockpuppeteer had been blocked before the article has been created by a now-confirmed puppet. I'm not sure if a script can safely automate what I just did. If may be useful for easier cases, though.
@RhinosF1: yes; we're currently waiting for the bot to be updated. ~ ToBeFree (talk) 03:25, 10 March 2019 (UTC)[reply]

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)[reply]

@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)[reply]
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)[reply]

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)[reply]

@Sam Sailor: Still interested in such a script? Regards, Guywan (talk) 17:31, 11 May 2019 (UTC)[reply]
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)[reply]
@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)[reply]
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)[reply]
@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)[reply]
Hmm, or perhaps they should be bolded instead of sectioned (per MOS:PSEUDOHEAD) .... Guywan (talk) 15:35, 13 May 2019 (UTC)[reply]

Redirect page tab behavior

Would really appreciate a script for commons.js, so that when I'm sitting on the Talk page of a Redirect page, and click the "Article" tab at the top of the page, it just takes me back to the Redirect article, and not to the target of it. Full details on this page at WP:VPP. Thanks! Mathglot (talk) 06:22, 9 May 2019 (UTC)[reply]

@Mathglot: I'm out of town currently, but I want to work on this. I should have something for you this weekend --DannyS712 (talk) 06:26, 9 May 2019 (UTC)[reply]
Wow, thanks! Do you need any additional information from me? Let me know. Mathglot (talk) 06:38, 9 May 2019 (UTC)[reply]
Paging User:Brion VIBBER, who may be interested in following this topic as well. Mathglot (talk) 06:49, 9 May 2019 (UTC)[reply]
@Mathglot: Can be done using a single line of JS. Just add the following to your common.js file: $("#p-namespaces a")[0].href += '?redirect=no'; This makes the subject page button not follow the redirect. Works for the vector skin, not sure about others. SD0001 (talk) 17:50, 9 May 2019 (UTC)[reply]
@SD0001: That seems to work fine, thanks! Also works for non-existent Project Talk pages (e.g., the TP belonging to Wikipedia:WPWO.) I wonder if there's a repository with links to helpful scripts like this one somewhere. Probably would make a lot of editors happy to customize their experience. This one immediately makes my life easier. Mathglot (talk) 19:49, 9 May 2019 (UTC)[reply]
@Mathglot and SD0001: Additional line so that the Read tab links to the redirect itself: $("#p-views a")[0].href += '?redirect=no';. It's possible that these both could be merged into one line, but I don't know JQuery or JS in general well enough to tell.
I've also note I've reopened T5324 Tthe underlying Phabricator issue; there's more discussion here. eπi (talk | contribs) 01:51, 10 May 2019 (UTC)[reply]

Hi, @SD0001, DannyS712, and E to the Pi times i:, Just a heads up that about some unforeseen knock-on effects that this fix may have provoked; see WP:VPT#Invalid url from Create tab. I think this is a minor enough issue that it doesn't really need to be fixed, now that I'm aware of it; but I wanted to draw your attention to it, in case you're interested. In a nutshell: if the url already has a query string, then either the positioning of the added redirect= param or its delimiter might need to be altered. Thanks, Mathglot (talk) 23:52, 10 May 2019 (UTC)[reply]

@Mathglot: Yeah, that one's probably my fault. I copied SD0001's script, but I didn't consider the effects it would have on the right tab. But it's not an unfixable problem; it just needs to be more discerning about how it modifies the URL. eπi (talk | contribs) 01:52, 11 May 2019 (UTC)[reply]

oh sorry, didn't foresee that bug. if ($("#p-namespaces a")[0].className.includes('mw-redirect')) $("#p-namespaces a")[0].href += '?redirect=no'; Here, now the ?redirect=no will be added only if the subject page is a redirect, removing all issues. Haven't tested this since I'm on phone. Tell me if it doesn't work. SD0001 (talk) 03:38, 11 May 2019 (UTC)[reply]

@Mathglot: Just tested this and it works. If you also want the "Read" tab to not follow redirect, you need if ($("#ca-view a")[0].className.includes('mw-redirect')) $("#ca-view a")[0].href += '?redirect=no'; SD0001 (talk) 06:42, 12 May 2019 (UTC)[reply]
@SD0001: thanks. I wasn't quite clear if I need only the last one (@06:42) for Talk & Read, or both (03:38 & 06:42). Mathglot (talk) 08:01, 12 May 2019 (UTC)[reply]

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)[reply]

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)[reply]
Forgot to ping Geniac --Danski454 (talk) 20:49, 19 May 2019 (UTC)[reply]
@Danski454: Ooh yes it works. That's what I was looking for. Thanks! --Geniac (talk) 23:43, 20 May 2019 (UTC)[reply]

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)[reply]

@Guywan: see .sort() - https://www.w3schools.com/jsref/jsref_sort.asp DannyS712 (talk) 00:10, 4 June 2019 (UTC)[reply]
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)[reply]
@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)[reply]
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)[reply]
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)[reply]

WikiProject status

I just want a lightweight script that will allow me to manually fill in the parameters for {{WikiProject status}}. Pretty much exactly like User:Evad37/rater, but simpler and only for one banner template. –MJLTalk 20:16, 9 July 2019 (UTC)[reply]

Might do, if nobody takes this before end-September. WBGconverse 14:44, 2 August 2019 (UTC)[reply]

Watchlist notifier: number of (automated) updates in browser page title

Automated updates of live blogs are often indicated by a number between brackets shown in the browser's page title, signifying the number of recent changes. The inboxes of most e-mail services display the same, as do Twitter pages. Would it be possible to add a gadget that allows for automated updates of Watchlists (for all projects) with such a notifier in the browser (tab) page titles as well? For me, and I guess for many other users, it would be a major improvement, not having to manually check watchlists anymore and instead being able to view live updates while working in other browser windows. I am not sure if this has been proposed before – if so, my apologies. Jürgen Eissink (talk) 14:24, 17 July 2019 (UTC).[reply]

@Jürgen Eissink: that would require the javascript to run when the window isn't in focus, and I'm not sure that is supported. But, you may want to check out User:DannyS712/Global watchlist, which shows you your watchlist from multiple sites. Hope that helps --DannyS712 (talk) 20:01, 17 July 2019 (UTC)[reply]
I didn't actually mean a Watchlist for all projects in one, but the possibility to have the proposed feature activated on the different projects (in my case mainly nl., en., de. en Commons). And it doesn't seem like DannyS712 uses automatic updates and a page title signifier, which is specifically what I am inquiring about. Thousands of pages of pages run without the window in focus, I don't see why this would be a problem for specific Wikipedia pages. Oh, I now see you are DannyS712. Thanks for your answer, anyway. Jürgen Eissink (talk) 20:25, 17 July 2019 (UTC).[reply]
@Jürgen Eissink: clarification: I'm not sure wikipedia's support for user-defined javascript (eg at your /common.js) will run when the window isn't in focus. I could be wrong though --DannyS712 (talk) 21:50, 17 July 2019 (UTC)[reply]
Someone else, who I consider an expert, gave me the impression that it would technically be easy to implement. Let's wait for other reactions. Thanks so far. Jürgen Eissink (talk) 21:58, 17 July 2019 (UTC).[reply]
@Jürgen Eissink: I ran some tests. You're right, sorry --DannyS712 (talk) 22:13, 17 July 2019 (UTC)[reply]
@DannyS712: That sounds hopeful, thanks! I myself am not enough focused on programming to grasp every possibility, so I have to rely on others in these matters. Jürgen Eissink (talk) 22:19, 17 July 2019 (UTC).[reply]
@Jürgen Eissink: User:SD0001/watchlist-update-title.js. SD0001 (talk) 18:52, 18 July 2019 (UTC)[reply]
@SD0001: Well, thank you, SD0001, but it doesn't seem to be working for me yet. I copied your script to a new .js-page in my user space, but it doesn't seem to update automatically and neither are the numbers of changed pages displayed in the page title. Am I getting it wrong? Pinging @DannyS712: also. Jürgen Eissink (talk) 20:20, 18 July 2019 (UTC).[reply]
Oh, I now see that I have to copy it to my common.js, which I just did. Will try and see again. Jürgen Eissink (talk) 20:30, 18 July 2019 (UTC).[reply]
Is this supposed to automatically update the Watchlist when working in another window? If so, how often will it update? Doesn't do anything so far. Jürgen Eissink (talk) 21:07, 18 July 2019 (UTC).[reply]
@Jürgen Eissink: It will work only if "Live updates" button on watchlist is selected. (there seems to be no preferences option to have it selected automatically - it has to be selected every time you open your watchlist, but if you wish I can tweak the script to have it selected every time the watchlist is opened). When the watchlist undergoes a live update (done by the mediawiki software, not by this script), the script just updates the page' HTML title prefixing it with a "(1)" or "(2)" or so on. This number is removed when the window comes into focus (i.e, when you switch over to the tab from another, or if you click anywhere within the window if you were already on it).
To install it across all wikis, add
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:SD0001/watchlist-update-title.js&action=raw&ctype=text/javascript');
on your global.js page on meta. Or to your common.js locally for use on a specific wiki. I'd suggest doing this rather than copy-pasting the code as you've done so that any updates/improvements I may make will become available to you automatically. SD0001 (talk) 03:24, 19 July 2019 (UTC)[reply]
Okay, that makes sense and now it seems to be working, although so far I've seen updates marked (1) when there were more pages added. So the count seems to be the update and not the number of pages updated, which I'd prefer. A small issue is that when pressing 'Mark all changes as seen' that the counter again appears and will only go away after refreshing the page, which is counterproductive to the initial purpose. I'll keep testing a bit, and while improvements would be welcomed, I thank you for the code! Jürgen Eissink (talk) 11:40, 19 July 2019 (UTC).[reply]
It takes some time to get used to this new feature, but the first experiences are satisfying. Thank you once again. I will also keep an eye on DannyS712's developments. Thank you both. Jürgen Eissink (talk) 20:27, 19 July 2019 (UTC).[reply]
@Jürgen Eissink: now "Live updates" will automatically be enabled. Counter will count number of new edits rather than watchlist updates. Also fixed the issue with Mark all changes as seen button. SD0001 (talk) 19:31, 20 July 2019 (UTC)[reply]
@SD0001: that is pretty amazing and quite literally exactly what I had in mind, so I couldn't be more grateful. I hope more users will find it useful, and I am actually somewhat surprised that this is a first. Thank you again. Jürgen Eissink (talk) 19:40, 20 July 2019 (UTC). P.S. Maybe it's good to list this on Wikipedia:User scripts/List#Watchlist?[reply]
One last improvement could be, @SD0001:, that one's own edits are not counted, but I don't know if that is possible. Jürgen Eissink (talk) 21:18, 20 July 2019 (UTC).[reply]
It's possible, but isn't it better to just hide one's own edits from the watchlist? There's an option in Preferences for that. SD0001 (talk) 07:19, 21 July 2019 (UTC)[reply]
Well I do see the benefit nevertheless for people who don't have that option on. Will add it. SD0001 (talk) 08:27, 21 July 2019 (UTC)[reply]
I use the script, because it's convenient to me, but maybe on minor detail could be improved: when hovering over the page histories, those page histories are not updated – would it be possible to add this? Thanks. Jürgen Eissink (talk) 13:32, 26 July 2019 (UTC).[reply]

Template:Infobox journal filler/inserter

It would be super, super useful if we could have a one-click script that could insert a partially pre-filled {{infobox journal}} in articles, or rebuild existing ones.

Basically it would insert the default

{{Infobox journal
| title         = 
| image         = <!-- or |cover= -->
| image_size    = 
| alt           = 
| caption       = 
| former_name   = <!-- or |former_names= -->
| abbreviation  = <!-- ISO 4 abbreviation -->
| bluebook      = <!-- For law journals only -->
| mathscinet    = <!-- For the MathSciNet abbreviation IF different from ISO 4 abbreviation-->
| nlm           = <!-- For the NLM abbreviation IF different from ISO 4 abbreviation-->
| discipline    = <!-- or |subject= -->
| peer-reviewed = 
| language      = 
| editor        = <!-- or |editors= -->
| publisher     = 
| country       = 
| history       = 
| frequency     = 
| openaccess    = 
| license       = 
| impact        = 
| impact-year   = 
| ISSNlabel     = 
| ISSN          = 
| eISSN         = 
| CODEN         = 
| JSTOR         = 
| LCCN          = 
| OCLC          = 
| website       = 
| link1         = 
| link1-name    = 
| link2         = <!-- up to |link5= -->
| link2-name    = <!-- up to |link5-name= -->
}}

(and remove {{italic title}} or its redirect if present) in the lead, like so, and would take existing {{infobox journal}} found in articles and standardize them to the above layout, importing whatever parameters it found. Extra non-empty parameters could just be appended, one per line, below |link2-name=, in alphabetical order. Headbomb {t · c · p · b} 00:35, 29 July 2019 (UTC)[reply]

Additionally, it could automatically populate certain fields, like

  • |title=, could be {{PAGENAME}}, with a warning to verify the name, in case we have an infobox journal on a non-journal article (e.g. like a society that publishes the journal).
  • |abbreviation= could be determined by putting {{PAGENAME}} in [1], with a warning to verify the abbreviation, especially for non-English titles, or for non-journal articles
    • [2] could be used to compute the abbreviation for non-English titles (treat multilingual as English)

Headbomb {t · c · p · b} 00:54, 29 July 2019 (UTC)[reply]

Going to @Tokenzero: who may have some insight here as well. Headbomb {t · c · p · b} 01:10, 29 July 2019 (UTC)[reply]
Still looking into it... my thoughts for now: it would probably be best to use a solid parser like mwparserfromhell: using it to do the basic reformatting of a chosen infobox would be much easier and probably always more robust than any amount of hand-crafted regexes. Looking at mw:Alternative parsers gives essentially two options: Parsoid (the parser behind the visual editor and a few other tools; seems harder to use but can run directly in browser) or python (mwparserfromhell or wikitextparser; easier for me but requires setting up some server to communicate with your browser), I'm still looking into these. Meanwhile, I also learned about TemplateData: ideally the formatting, suggested fields and their ordering could be taken from there, right?
About the UI: you're thinking of e.g. an additional menu entry "add/normalize infobox" on the article page, which would take you to the editing screen with a proposed diff? Tokenzero (talk) 22:58, 2 August 2019 (UTC)[reply]
Yeah, taken to diff window would be good yes. Headbomb {t · c · p · b} 04:13, 3 August 2019 (UTC)[reply]
I've got a template parser at User:Evad37/extra.js (parseTemplates function), if anyone wants to try using that to make a userscript. - Evad37 [talk] 03:46, 3 August 2019 (UTC)[reply]
Thanks! That should work indeed (Parsoid turns out to be overkill and as far as I see it does not allow modifying templates/finding their position with a stable or documented API).
 Partly done Here's my first attempt: importScript('User:Tokenzero/infoboxJournal.js'); // Backlink: [[User:Tokenzero/infoboxJournal.js]]. Does not pre-populate fields yet, only adds defaults, reformats, reorders, and then removes {{italic title}}. It should display an 'Infobox journal' portlet under the 'More' menu. On an edit page it just modifies the textarea, on an article view page it redirects you to the diff page. Tokenzero (talk) 20:03, 9 August 2019 (UTC)[reply]
I'll try it later tonight! Very much looking forward to it! Headbomb {t · c · p · b} 21:19, 9 August 2019 (UTC)[reply]
@Tokenzero: first thing is it should give an edit summary. Headbomb {t · c · p · b} 01:18, 10 August 2019 (UTC)[reply]
[3] add |formernames= as an alias of |former_name= Headbomb {t · c · p · b} 01:26, 10 August 2019 (UTC)[reply]
Ok, edit summary is now Add infobox journal (IJ.js) or Reformat infobox journal (IJ.js) (or do you prefer just ce? Also I don't care about the link to the script, I can remove it if preferred). Added aliases |formernames= and |formername=. New infoboxes are now inserted after all initial templates. Tokenzero (talk) 09:03, 10 August 2019 (UTC)[reply]
"Adding/standardizing infobox journal with User:Tokenzero/infoboxJournal.js" depending on if it's added, or if one already exists. The link could be an 'instruction page' on how to add/use the script, but it might be worth waiting until it's a bit more polished to have that link. Headbomb {t · c · p · b} 12:07, 10 August 2019 (UTC)[reply]
Summary changed, links to User:Tokenzero/infoboxJournal. Pre-filling should now work for |language= and |frequency=. Tokenzero (talk) 13:01, 10 August 2019 (UTC)[reply]
Looks good. Only thing that's a bit weird is that saving using the premade summary gives a warning that there is no edit summary. A few scripts seem to be doing that. I wonder why. Headbomb {t · c · p · b} 16:29, 10 August 2019 (UTC)[reply]
Fixed: 'wpAutoSummary' should have been set to md5 of empty string. If a script wants users to change the premade summary (e.g. because it's just tagging the script name), the intended behaviour is to set 'wpAutoSummary' to md5 of it. By the way, do you know any user-script that redirect to the edit or diff page? Tokenzero (talk) 18:55, 10 August 2019 (UTC)[reply]

not sure what "do you know any user-script that redirect to the edit or diff page" means, but you could take a look at WP:Citation expander. Headbomb {t · c · p · b} 19:15, 10 August 2019 (UTC)[reply]

Any script that takes you from the view page to the edit or diff page with proposed changes. I just found that tricky to do and I wonder if there's a better way :) Citation expander, as far as I see, either works directly on the edit page (so it won't show you a diff) or from a web page that submits the edit before you can see the diff (which is much easier to do). Tokenzero (talk) 19:26, 10 August 2019 (UTC)[reply]
If you use the Citations button, you're taken to a diff. Headbomb {t · c · p · b} 19:38, 10 August 2019 (UTC)[reply]

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)[reply]

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)[reply]
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)[reply]

Convert sfn to CS1

What the title says. Leave the sfn(s) if they are botched i.e. the corresponding reference can't be tracked. WBGconverse 14:43, 2 August 2019 (UTC)[reply]

Extract data from a frozen VisualEditor

Often VisualEditor ends up frozen and won't allow me to save or switch to markup-mode, giving instead a "docserver-http-error", "500", or "404" error (when the article has been renamed while I was editing). This happens about once a day.

It seems VisualEditor's API doesn't allow for extracting the markup data without connecting to the server.

I have two ugly ideas for how to solve this:

1. Regularly log wikimarkup when using VisualEditor to prevent loss of data when it freezes

  • Every 30 seconds, generate wiki-markup and console.log it.
  • If the connection to the server is broken, alert() me so that I may retrieve my markup from the console and reload the editor.

2. Extract the data model

  • Extract the data model, copy it to my clipboard
  • Reload the window
  • Paste the data model, and the user script applies it to the new instance of VisualEditor

Or if anyone knows a better way to retrieve data from a frozen VisualEditor, that'd be good to know.

With thanks, – Thjarkur (talk) 22:40, 3 August 2019 (UTC)[reply]

Wanted cross-wiki reporting tool

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)[reply]

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)[reply]

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·des04:46, 15 August 2019 (UTC)[reply]

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)[reply]

Empty parameters

Is there a script that removes empty parameters in the cite web template like "df=" that is pretty much always empty? --Mazewaxie (talkcontribs) 13:28, 26 August 2019 (UTC)[reply]

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)[reply]

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)[reply]

Hide rollback link for unpatrolled edits

Hi everyone.

How to hide rollback button (.mw-rollback-link) if editing is performed by an autopatrolled user or has editing status unpatrolled? Of course, using custom scripts.

Thank you!-MrJaroslavik (talk) 14:37, 17 September 2019 (UTC)[reply]