Jump to content

Wikipedia:User scripts/Requests: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m +
Line 200: Line 200:
[[Category:Wikipedia scripts| ]]
[[Category:Wikipedia scripts| ]]
[[Category:Non-talk pages that are automatically signed]]
[[Category:Non-talk pages that are automatically signed]]

== User:Bility/convert24hourtime.js ==

Would anyone be able to revise [[User:Bility/convert24hourtime.js]]? It hasn’t been updated in seven years and it’s quite buggy. [https://en.wikipedia.org/w/index.php?title=Talk:Innovation_of_Industrial_Internet_of_Things&action=history The thanks button shows up differently], [https://en.wikipedia.org/wiki/Special:Contributions/TripleX.Numb conflicts with the blocked template in Contributions page], [https://en.wikipedia.org/w/index.php?title=Talk:Innovation_of_Industrial_Internet_of_Things&diff=877565584&oldid=877517480 and doesn’t work when looking at diff]. -- [[User:1989|1989]] ([[User talk:1989|talk]]) 00:51, 10 January 2019 (UTC)

Revision as of 00:51, 10 January 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.

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!

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]

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]

Help with script for Galician wiki

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

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

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

Could somebody help me with that? Bye, --Elisardojm (talk) 15:33, 31 July 2017 (UTC)[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]

Minimise sections

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

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

AutoRollbacker

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

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

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]

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

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

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

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

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

"RCpage" user script

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

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

Wanted:Categorization

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

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

Please ping me when responding,

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

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

Wanted:Show WikiData Q number on Wiki Articles

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

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

Undo move

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

@Flooded with them hundreds: I've written this. Danski454 (talk) 18:16, 19 December 2018 (UTC)[reply]
Incredible! Great work, it works smoothly. Thanks! Flooded with them hundreds 11:18, 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]

2nd chance

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

@L235: this seems like a pretty big request, but I'll start trying to work on it. I already have a function (User:DannyS712 test/append.js) to append content, and some of the rest seems pretty simple, albeit tedious. --DannyS712 (talk) 00:16, 2 January 2019 (UTC)[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]

User:Bility/convert24hourtime.js

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