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 of user scripts, see this list. If you have been helped, please let us know, so that we may archive the request. |
|
2001 – 2019
Some ideas
Some ideas copied from User:Enterprisey/Dashboard. If you make one of these scripts, strike the entry and add a link to your script.
- Still not done?
- A user script to display the same info as PleaseStand's script, but in a very compact way so it doesn't cause reflow when the info shows up - also incrementally showing the data as API responses get back would be cool
- A user script to expand a diff until it covers all contiguous edits made by that user (if a user made three consecutive edits and you view the diff of the middle, pressing a button should expand it to cover all three) (L235 suggestion)
- User:Nardog/Consecudiff is close, which adds links to diffs of consecutive edits rather than expand the diff you're viewing. Nardog (talk) 20:14, 1 February 2021 (UTC)
- A user script to give you a browser push notification when you get a Wikipedia notification
- User:Evad37/livenotifications is a similar concept, but gives in-page bubble notifications - Evad37 [talk] 01:52, 2 January 2021 (UTC)
- And User:Enterprisey/browser-notifs.js. Enterprisey (talk!) 23:03, 2 January 2021 (UTC)
- A user script so that whenever you go directly to a section, the section gets floated so that the header gets locked to the top of the screen. This will theoretically prevent the text from jumping around as the rest of the pages load. Now, the hard part is making sure that this script runs before the rest of the stuff making it jump around.
- A user script to quickly switch between tabs, on pages that have tabs at the top (WikiProjects, village pumps, etc)
- A user script to make stuff clickable in diffs. (Section headers, line numbers, etc.)
- A user script to highlight which content (in the HTML) comes from which template (suggested by MusikAnimal over IRC 23:18, 7 January 2019 (UTC))
- A user script to say where a given template is being used. How to do it: call the Extension:TemplateSandbox endpoint (the one that gets hit when you do the "Preview page with this template" text field on a template edit page) with the wikitext of that template (but with a yellow border), and previewing the current page.
- A user script that provides a button to mark all reverts (i.e. pages displayed with an edit summary that includes the word "reverted") as "visited" in the watchlist (suggested by Natureium)
- A user script to automatically add unsigned/undated templates
- A user script to show a pop-up section preview when you hover over its TOC link
- A user script to put the current AIV count in your toolbar, Stack Overflow mod style.
- A user script to move discussions
- A user script to hyperlink "per X" to the last comment X made
- Edit just one section w/ "true" (no server-roundtrip) live preview
- Maybe User:BrandonXLF/QuickEdit.js– BrandonXLF (talk) 08:06, 8 March 2020 (UTC)
- Minimap for big diffs
- A user script that removes newsletters and other recurring messages while viewing a talk page
- There should be a way to jump directly to a user's comment from the history page (or, more broadly, if a diff consists of just a few lines being added in one place, to jump directly to those new lines instead of just to the top of the section). Implementation notes: Parallel fetch diff (mw:Api:Compare) and current wikitext, then split the wikitext by lines, go from the line number (from the diff HTML) to a string index into the wikitext, add a sentinel marker at that point, run it through Parsoid, find the sentinel, go up in the MediaWiki DOM to highest "paragraph" (or list element, for discussions), obtain the start and end string indices of the added region in the paragraph, pack up the (section header, paragraph index, start idx, end idx), reload the page with that 4-tuple in window.location.hash, and do the jump.
- Convenient Discussions does this. – SD0001 (talk) 16:00, 19 September 2021 (UTC)
- Replace page titles in watchlist & user contribs pages w/ their shortcuts for readability
- Done
Make a user script that is bound to a keyboard shortcut and pops up a modal where you can type a section header on the current page (auto-completed, of course) and jump to itUser:TheTVExpert/searchForSectionA user script to unify the "Alerts" and "Notices" icons (might not even be possible, but it would be cool if it happened) (see screenshots for the old icon with no notifications and one notification)User:Enterprisey/simple-notifs- The API supports getting alerts and notification at once, completely possible.– BrandonXLF (talk) 20:03, 18 December 2019 (UTC)
A script that puts a tab at the top of user script pages & user script documentation pages, to allow switching between themUser:TheTVExpert/scriptDocumentationTabsA user script that takes an oldid and takes you to the deleted revision (idea was L235's, I think)User:Enterprisey/link-deleted-revsA user script so that whenever you click on a "hist" link in a user contribs page, the resulting page history highlights all contributions by that user (also has form on history page to perform such highlighting)(link)A user script to make a single section edit, without reloading the whole page (shoutout to Gryllida for the idea)- See User:BrandonXLF/QuickEdit.js – BrandonXLF (talk) 19:33, 26 December 2019 (UTC)
A user script that redirects accidental navigation to 404's ending in a slash (say, Foo/) to the normal page (Foo)- Done User:Majavah/Unslashifier.js Majavah (t/c) 11:01, 3 January 2020 (UTC)
In diffs, show previews for both the old and new versions (with anchors to allow jumping)- See User:BrandonXLF/CompareRevisions – BrandonXLF (talk) 20:03, 18 December 2019 (UTC)
A link at the end of every comment to the diff in which it was added. Needs some thought about how to make this as efficient as possible.- Done as User:Evad37/TimestampDiffs - Evad37 [talk] 20:14, 29 August 2020 (UTC)
Holding down CTRL lets you click into any template or link in the edit window- Note: Wikipedia:Tools/Navigation popups allows something similar if you select the template or link. —guywan (talk • contribs) 15:21, 24 March 2020 (UTC)
- Done as User:TheresNoTime/linkThings.js. Chlod (say hi!) 09:35, 9 November 2021 (UTC)
GUYWAN ( t · c ) 19:33, 5 December 2019 (UTC)
2021 Q1
2021 Q2
Script for coordinates
Using {{coords}} is a painful template, especially when you are trying to add coordinates en masse. A script that allows you to quickly edit and add coordinates would be greatly useful. — Berrely • Talk∕Contribs 17:28, 28 June 2021 (UTC)
- Hi, Berrely! "Add" is a bit of a broad term: a userscript won't really know where to add a {{coord}} template unless it's been pointed to. I'm assuming you mean right above category links (or replacing {{coord missing}}) per WP:ORDER? Chlod (say hi!) 09:46, 9 November 2021 (UTC)
- Chlod yep, that's it. Ideally there would also be an option to put it in the Infobox, but that would probably be a bit too complex. — Berrely • Talk∕Contribs 13:25, 9 November 2021 (UTC)
- @Berrely: Done! See User:Chlod/Scripts/Coordinator for the userscript. If you have any concerns, bug reports, or additional requests, feel free to give me a ping. Chlod (say hi!) 08:14, 12 January 2022 (UTC)
- Chlod yep, that's it. Ideally there would also be an option to put it in the Infobox, but that would probably be a bit too complex. — Berrely • Talk∕Contribs 13:25, 9 November 2021 (UTC)
2021 Q3
Also move articles and sub-categories when moving a category
Do you guys have any scripts that combine Cat-a-lot and SpecialːMove?
UnnamedUser 20:43, 17 July 2021 (UTC)
- <jk>No, you idiot. Go and write one for your own.</jk> NguoiDungKhongDinhDanh 13:47, 18 March 2022 (UTC)
Timestamp anchors in talk pages
I've been using Evad37's excellent TimestampDiffs script to effectively link comments in talk pages, but what would be most useful, instead of sending the reader to a diff page, is simply put anchors in the timestamps, and be able to link them in the comment. Is there a script already that does that? I couldn't find any at either WP:USLIST or WP:USRANK. Incidentally, it seems to me that this would be an easier job than what Evad37 did in TimestampDiffs, as the script wouldn't have to parse the history page at all. If it could jig the css to shade the linked comment, that'd be a bonus! — Guarapiranga ☎ 23:51, 20 July 2021 (UTC)
- That makes little sense. Such links won't work unless everyone installs the same script. Nardog (talk) 23:54, 20 July 2021 (UTC)
- Could the anchor links perhaps be made accessible to anyone by putting a templatestyle on the page? — Guarapiranga ☎ 01:54, 21 July 2021 (UTC)
- No, anchors cannot be added via CSS. Nardog (talk) 02:22, 21 July 2021 (UTC)
- Right! Pity timestamps aren't anchored already. — Guarapiranga ☎ 05:56, 21 July 2021 (UTC)
- ... like that. — Guarapiranga ☎ 06:09, 21 July 2021 (UTC)
- That would result in invalid HTML if multiple comments were made within the same minute on the same page. You may give them unique IDs with serial numbers, but then that would result in links pointing to different comments than intended after they are archived. Besides, it's hardly useful to jump to a signature, which is at the very bottom of the comment. But on the flip side, it's often not easy to determine with certainty where a comment begins. Talk pages are in such chaos that I've come to feel any attempt to improve the experience client-side is a fool's errand... Nardog (talk) 17:58, 21 July 2021 (UTC)
- ... like that. — Guarapiranga ☎ 06:09, 21 July 2021 (UTC)
- Right! Pity timestamps aren't anchored already. — Guarapiranga ☎ 05:56, 21 July 2021 (UTC)
- No, anchors cannot be added via CSS. Nardog (talk) 02:22, 21 July 2021 (UTC)
- Could the anchor links perhaps be made accessible to anyone by putting a templatestyle on the page? — Guarapiranga ☎ 01:54, 21 July 2021 (UTC)
- I just realised c:Convenient Discussions already does that! So there, TWIMC, that answers my question:
Is there a script already that does that?
There is: c:Convenient Discussions. — Guarapiranga ☎ 06:30, 21 July 2021 (UTC)- c:User:Jack who built the house/Convenient Discussions ―Qwerfjkltalk 20:05, 23 July 2021 (UTC)
- @Guarapiranga Hi, it appears the reply tool subscribe function gives a link like this (from the notification panel): https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)?markasread=226456919&markasreadwiki=enwiki#c-Rummskartoffel-2021-08-28T11:53:00.000Z-Shushugah-2021-08-27T22:10:00.000Zto
Not sure if this helps. ― Qwerfjkltalk 12:01, 28 August 2021 (UTC) - I guess this is Done. See m:User:ESanders (WMF)/commentlinks.js. NguoiDungKhongDinhDanh 13:49, 18 March 2022 (UTC)
Help request
Hey there! I'm pretty sure this is not the best place for this request so I do apologize beforehand. In SqWiki we have this extra CS1 error tracking category for citations missing the language parameter. (I'm an admin there.) It has around 11.500 entries. It would be good if we could decrease that number (solve that error) in any way possible. We don't have an active technical community in SqWiki, me being the only user that deals with that aspect. In this situations, I thought asking for help here. Is there any kind of bot that could help me with this? Or maybe even user scripts that could semi-automatize the process of finding the language of the citation and inserting it in the templates. Of course, I'm mostly talking about citations coming from webpages because I don't believe bots and scripts could be much of help in book citations and other of the sort. Any idea that helps decrease that number even partially is much appreciated. - Klein Muçi (talk) 21:24, 4 September 2021 (UTC)
- Idea::
action=languagesearch API
, which returns language codes based on the characters used in the input string, can be used to detect the language, but i have no idea how can we get a string from those citations and pass it tosearch
parameter. Jeeputer (talk) 13:14, 25 September 2021 (UTC)- @Jeeputer, sorry for not replying for so long. Only now I'm seeing this. Unfortunately I can't progress your idea any further either. But thank you for trying to help! :) - Klein Muçi (talk) 20:40, 11 October 2021 (UTC)
restore the Wikipedia Citation Tool for Google Books
- The Wikipedia Citation Tool for Google Books (which was at https://reftag.appspot.com/) seems to be permanently broken. That tool was absolutely invaluable to me. I do not remember who wrote it. If anyone could rewrite it, or get a copy of it and host it, it would be a tremendous service... ♦ Lingzhi.Random (talk) 06:09, 22 September 2021 (UTC)
- The source code is available under GPLv3 at https://github.com/Apoc2400/Reftag. Somebody recently said they would pick it up, but I don't know what has become of that. – Rummskartoffel 16:31, 24 September 2021 (UTC)
- @Scarpy:, @Shushugah: Thoughts? Comments? ♦ Lingzhi.Random (talk) 17:59, 24 September 2021 (UTC)
- @Lingzhi.Random: Have been trying to carve out some time fork the code and debug. I will pledge to spend two hours on it this weekend. Not sure what happened to the original author. (P.S. is it Random like Random from The Chronicles of Amber? Or just a random Random?) - Scarpy (talk) 21:28, 24 September 2021 (UTC)
- @Scarpy:, @Shushugah: Thoughts? Comments? ♦ Lingzhi.Random (talk) 17:59, 24 September 2021 (UTC)
- The source code is available under GPLv3 at https://github.com/Apoc2400/Reftag. Somebody recently said they would pick it up, but I don't know what has become of that. – Rummskartoffel 16:31, 24 September 2021 (UTC)
(←) I freaking love The Chronicles of Amber. Much better than Game of Thrones. But no, my Random is just.. there was a Ling.Nut, a Ling.Nut2, a Ling.Nut3, then a Lingzhi, a Lingzhi2, and... the numbers became overwhelming... Thanks!! ♦ Lingzhi.Random (talk) 23:00, 24 September 2021 (UTC)
- New tool: Wikipedia DOI and Google Books Citation Maker. See also here. - Medgirl131 20:02, 5 October 2021 (UTC)
- @Medgirl131: Are youthe author? URL : Hungry Bengal, google books causes message: "Not a valid Google Books URL or ID. Please try again." Thanks, ♦ Lingzhi.Random (talk) 21:10, 5 October 2021 (UTC)
- It works now. - Medgirl131 23:00, 5 October 2021 (UTC)
- @Lingzhi.Random can someone explain to me where/how how the google books scripts are implemented? I see several google book alternative/solutions now, but don't know which one is used for "automatic citations". Fantastic work to whoever fixed it, and I'll star/keep an eye on whatever repository the code is hosted on, in case I can keep an eye/improve it. ~ 🦝 Shushugah (he/him • talk) 13:48, 25 October 2021 (UTC)
- It works now. - Medgirl131 23:00, 5 October 2021 (UTC)
- @Medgirl131: Are youthe author? URL : Hungry Bengal, google books causes message: "Not a valid Google Books URL or ID. Please try again." Thanks, ♦ Lingzhi.Random (talk) 21:10, 5 October 2021 (UTC)
- Note: User:Qwerfjkl/scripts/generatedoi.js adds a portlet link to the tool mentioned above. ― Qwerfjkltalk 17:56, 25 October 2021 (UTC)
- https://citer.toolforge.org/ seems to be a good replacement. --Wire723 (talk) 09:09, 28 March 2022 (UTC)
2021 Q4
A user script to make formatted edit requests
See this request. If there were a script that somehow made it easier to submit requests formatted like that, I'm sure people would like it. Enterprisey (talk!) 06:47, 1 October 2021 (UTC)
- @Enterprisey Since edits are usually done in a sandbox, it's easy to generate a Special:ComparePages link that shows the diff – a while ago, I created Template:Sandboxed edit request to facilitate doing this easily. Not sure how a script can help. – SD0001 (talk) 07:43, 1 October 2021 (UTC)
- Yeah, the idea is to show the diff table itself, to avoid having to click on a link. Enterprisey (talk!) 01:51, 2 October 2021 (UTC)
- It would be nice if, for simple edit requests (not just template requests), You could use the script to "edit" the articles, but instead of saving the edit, it would post a formatted edit request. ― Qwerfjkltalk 07:20, 2 October 2021 (UTC)
- That sounds like quite an idea. Parallely, it would be good to have a tool for responders to apply the suggested edit in two clicks (one for generating the edit, another for confirming it). – SD0001 (talk) 09:01, 4 October 2021 (UTC)
- @SD0001 Hopefully, that could be implemented in the.main edit request script, User:Jackmcbarn/editProtectedHelper. ― Qwerfjkltalk 17:57, 25 October 2021 (UTC)
- That sounds like quite an idea. Parallely, it would be good to have a tool for responders to apply the suggested edit in two clicks (one for generating the edit, another for confirming it). – SD0001 (talk) 09:01, 4 October 2021 (UTC)
- @Enterprisey, @SD0001: I found Module:Diff, which might help. ― Qwerfjkltalk 09:44, 1 April 2022 (UTC)
@Enterprisey, SD0001, and Qwerfjkl: See User:NguoiDungKhongDinhDanh/FormattedEditRequest.js. Sometimes it gets stuck when encountering JS pages/Lua modules like User:Alexis Jazz/Bawl-test.js or Module:Citation/CS1 (I don't know why yet), but in general it does work. NguoiDungKhongDinhDanh 19:58, 1 April 2022 (UTC)
- @NguoiDungKhongDinhDanh: Yet again, the copy function doesn't work for me :( . If it helps, I have some code at User:Qwerfjkl/scripts/copy.js that seems to work for me. Thanks for putting the time in to make this! ― Qwerfjkltalk 20:51, 1 April 2022 (UTC)
- @Qwerfjkl: I guess that's because your browser doesn't support
navigator.clipboard.writeText()
(caniuse). Let's see what I can do... NguoiDungKhongDinhDanh 20:57, 1 April 2022 (UTC) - @Qwerfjkl: Try again. If this doesn't work I'll have to create a third button. NguoiDungKhongDinhDanh 21:27, 1 April 2022 (UTC)
- @NguoiDungKhongDinhDanh: The cactions link doesn't appear any more. ― Qwerfjkltalk 21:37, 1 April 2022 (UTC)
- @Qwerfjkl: It won't appear when you're at a non-exist or editable page. Also, you should be viewing the page. NguoiDungKhongDinhDanh 21:40, 1 April 2022 (UTC)
- @NguoiDungKhongDinhDanh: Template:If then show work for you? ― Qwerfjkltalk 21:42, 1 April 2022 (UTC)
- @Qwerfjkl: Surprisingly no. Try again now. NguoiDungKhongDinhDanh 21:47, 1 April 2022 (UTC)
- @NguoiDungKhongDinhDanh: Template:If then show work for you? ― Qwerfjkltalk 21:42, 1 April 2022 (UTC)
- @Qwerfjkl: It won't appear when you're at a non-exist or editable page. Also, you should be viewing the page. NguoiDungKhongDinhDanh 21:40, 1 April 2022 (UTC)
- @NguoiDungKhongDinhDanh: The cactions link doesn't appear any more. ― Qwerfjkltalk 21:37, 1 April 2022 (UTC)
- @Qwerfjkl: I guess that's because your browser doesn't support
Autohighlighting specific characters. (Greek)
I'd like to know if there is a tool (js, I guess) that if turned on, will highlight specific characters in an article. At this point I'm looking at articles that my search has said have a latin alphabet character next to a greek one, and I'd like to easily see in the article where that is. So for example, if both ΦΒΚ and ΦBK are in an article, I'd like to have all of the first one highlighted and only the Phi highlighted in the second (the first has Beta and Kappa, the second has B and K). I'd like it to be a little flexible, since I'd like to be able to add the accented greek letters as well as the Lunate Sigma (the version of Sigma that looks like a C. Naraht (talk) 15:10, 10 October 2021 (UTC)
Add WikiProject templates to subcategories
I would like to add {{WikiProject Go}} to the talk pages of all subcategories of category Go (game). Needless to say, I would only want to add it to the talk page if it isn't already added. Is there a bot or script that can do this? Coastside (talk) 06:25, 11 October 2021 (UTC)
- I think EarwigBot Task 14 may be what you are looking for. – Rummskartoffel 11:32, 11 October 2021 (UTC)
GUI for voting
Hello! I was trying to find a way to make participation in voting easier for my homewiki (SqWiki) by introducing some kind of graphical user interface for adding templates like pro/against/neutral (preferably with a text box that asks for a rationale behind that vote) in "elections"/discussions. I asked around and found this script and my intention was to localize it into a gadget but unfortunately the script makes use of hard-coded EnWiki pages which made it hard for me to modify it. I tried contacting the creator for help but he wasn't available so... Is there any other script/gadget which is "more malleable" that I can use for my case? Maybe someone with extra free time can help me create one from scratch? - Klein Muçi (talk) 20:47, 11 October 2021 (UTC)
- PS: Please ping in case of answers. - Klein Muçi (talk) 20:53, 11 October 2021 (UTC)
Cross wiki POTD
Hey, Hope you are doing well. Since small wiki's don't have enough contributors to help in Featured picture section, I was wondering if someone can come up with an idea to get En.wikis POTD featured on these wiki's. Actually this was a suggestion from another user at Ks.wiki. Thankyou signed, Iflaq (talk) 17:21, 26 October 2021 (UTC)
- @Iflaq: This might be better implemented as a bot that automatically pulls in the {{POTD}} subpage of the current day and saves it to a page on ks.wiki. This could be implemented in the wiki's MediaWiki:Common.js but I advise against it due to performance issues (besides the fact that it won't show up for any user who doesn't use JavaScript). Chlod (say hi!) 09:39, 9 November 2021 (UTC)
External Link to internal link
Hi, how about a user script that could turn external links into internal in some sort of way? It would look better. Thanks. ― ItcouldbepossibleTalk 07:16, 26 December 2021 (UTC)
- @Itcouldbepossible: See m:User:TMg/autoFormatter#Internal links. ― Qwerfjkltalk 13:01, 26 December 2021 (UTC)
- @Qwerfjkl Ok thanks. ― ItcouldbepossibleTalk 14:53, 26 December 2021 (UTC)
- @Qwerfjkl But does it have anything to do with turning external links into internal? Can you tell me which part you are telling me to read? ― ItcouldbepossibleTalk 14:56, 26 December 2021 (UTC)
- @Itcouldbepossible: Under Internal links, it says it can
[r]eplace weblinks to other projects and languages with prefixed internal links if possible
. ― Qwerfjkltalk 16:45, 26 December 2021 (UTC)- @Qwerfjkl Thanks for the user script. I have installed it to my global.js page. ― ItcouldbepossibleTalk 07:12, 27 December 2021 (UTC)
- @Itcouldbepossible: Under Internal links, it says it can
- Can you give some example inputs and outputs? Would only be able to do this for links like
[https://en.wikipedia.org/wiki/Test Test2] -> [[Test|Test2]]
(internal domains). –Novem Linguae (talk) 17:31, 26 December 2021 (UTC)
2022 Q1
Opening pages in new tab with modifier key
I would usually write my own scripts, but this one is a little more not straightforward so I thought I'd ask for help with it and it can be a learning experience :)
Anyway, let me describe my issue. When I'm editing wikipedia, I often want to open other pages to read them, get info from them, clarify a rule, etc. The easiest way to do this is to go to the search in the top right and type the page I want. For example, if I wanted to grab a quick deletion template, I would type wp:csd, and then down arrow, then the enter key. The issue with this is that the link will open on the current page, and there is no way to open it in a new tab. I currently take my hand off of the keyboard off of the keyboard and onto the mouse and then press the command key, which when clicking on pages opens them in a new tab. This is annoying for me as I use computers mainly with key combos and mostly using the keyboard.
With this in mind, I would like to make a script to fix this. My thoughts were modifying the search bar to open in a new tab when I have the command key held down (on mac; dunno what it is on windows). My first thoughts would be to just have a listener for onkeydown and onkeyup in the script and then setting target="_blank"
when that's the case. I'm not familiar with the mediawiki javascript api in wikipedia so I don't know if this is the best way to to do things, or if using keydown listeners are something you can do in wikipedia scripts or if there is some more official api that you can use. Thanks a lot, ― Levi_OPTalk 17:08, 7 January 2022 (UTC)
- Sounds like a good plan to me.
.mw-searchSuggest-link
appears to be the class you need to addtarget="_blank"
to. Maybe do aDOMNodeInserted
listener at first, just to get everything working. (This listener would add_blank
all the time, even without a keypress.) Then once you confirm that it works, you can add the complexity of a keypress listener, whether to only add_blank
while pressing, whether to remove_blank
once keypress is done, etc. –Novem Linguae (talk) 18:27, 7 January 2022 (UTC)- Not only is DOMNodeInserted deprecated (and event delegation is your friend), that solution won't work because when you select an autocomplete with arrow keys and hit Enter, you're not opening the link but changing the textbox and submitting the form. Each autocomplete item is already a link, so Ctrl+click or middle click already works. Nardog (talk) 15:04, 8 January 2022 (UTC)
- I have this issue as well. This sounds like a useful script. If you can't make it work, my workaround is to Cmd-click on something near the search box, like "View history" or "Sandbox", then go to that new tab and do my search. When I remember to do it, it works well. – Jonesey95 (talk) 14:08, 8 January 2022 (UTC)
- Hacky but works: Nardog (talk) 14:48, 8 January 2022 (UTC)
$(document.body).on('keydown', '#searchInput', function (e) { if ((e.ctrlKey || e.metaKey) && e.which === 13) { $('#searchform').attr('target', '_blank'); } }).on('blur', '#searchform', function () { this.removeAttribute('target'); });
- Thanks for the help. This is kind of what I was looking for, and led me in the right direction. I wanted it more like the way that clicking works, where as long as cmd is held down it opens in a new tab, and it doesn't if it isn't, not if the input no longer focused. The issue is that when you have command held down, which is supposed to make it open in a new tab, pressing enter no longer does anything, because cmd+enter isn't supposed to work. To get around that I just added a listener for command enter and then made it click the search button, which will open it. Here's the code I ended up using: Thanks! ― Levi_OPTalk 13:55, 10 January 2022 (UTC)
$(document.body).on('keydown', '#searchInput', function (e) { if (e.metaKey) { $('#searchform').attr('target', '_blank'); if (e.which === 13) { $("#searchButton").click() } } }).on('keyup', '#searchform', function (e) { if (!e.metaKey) { this.removeAttribute('target'); } });
- I don't really know what you mean, but I used the blur event only because I had to figure out a way to remove the target attribute after a new tab was opened. keyup of course works too and is perhaps more obvious, but I figured that would get fired too often. Nardog (talk) 21:06, 10 January 2022 (UTC)
- Thanks for the help. This is kind of what I was looking for, and led me in the right direction. I wanted it more like the way that clicking works, where as long as cmd is held down it opens in a new tab, and it doesn't if it isn't, not if the input no longer focused. The issue is that when you have command held down, which is supposed to make it open in a new tab, pressing enter no longer does anything, because cmd+enter isn't supposed to work. To get around that I just added a listener for command enter and then made it click the search button, which will open it. Here's the code I ended up using:
Script for reporting people on WP:AIV?
Often while reverting people's vandalism I see accounts that have done enough to be reported to WP:AIV, which I do often. The process currently involves copying their username, opening WP:AIV, editing the "User reported" section, pasting their username at the bottom, then copying the template, then pasting it at the bottom, then cutting the username from where I put it, then putting it where the default name was. This is very annoying. I find it hard to believe that no one else has had this problem and made this script, I just cannot find one in the list with a name or description that says it might fix this. I'm looking for a script with a button on the page or something where I can just put their username / ip and a reason without fussing with copying the template to the bottom as well. Thanks, ― Levi_OPTalk 14:15, 10 January 2022 (UTC)
- WP:TWINKLE has this. The menu item is TW -> ARV -> AIV. –Novem Linguae (talk) 15:03, 10 January 2022 (UTC)
- I knew that twinkle could do something like this; the edit summaries on aiv said they were twinkle. The issue is that now I have twinkle installed. I don't really want twinkle. I've experimented with both and I prefer redwarn over it, and now having it installed just adds more load time to other stuff, and, well, now I have lots of other twinkle stuff on my page. Does redwarn have anything like this? Is there any way to turn off all of twinkle besides just the menu? Thanks, ― Levi_OPTalk 16:13, 10 January 2022 (UTC)
- You can turn of all modules apart from ARV at the Twinkle preferences page. ― Qwerfjkltalk 16:20, 10 January 2022 (UTC)
- I knew that twinkle could do something like this; the edit summaries on aiv said they were twinkle. The issue is that now I have twinkle installed. I don't really want twinkle. I've experimented with both and I prefer redwarn over it, and now having it installed just adds more load time to other stuff, and, well, now I have lots of other twinkle stuff on my page. Does redwarn have anything like this? Is there any way to turn off all of twinkle besides just the menu? Thanks, ― Levi_OPTalk 16:13, 10 January 2022 (UTC)
script that removes the languages on the sidebar
hello, can someone make a script that removes the languages on the sidebar? i only speak english, and it makes me irritated whenever there is a small page with a lot of languages, cause it makes the footer not really the footer anymore. look at this page, Wikipedia:General disclaimer, and scroll down and you will see what i mean. thanks! Desktop.INI 17:42, 11 January 2022 (UTC)
- You can just hide it in your CSS: Nardog (talk) 17:46, 11 January 2022 (UTC)
#p-lang { display: none; }
Script for WP:NOTBROKEN and MOS:SECTLINK
Hi. I need a script for converting unnecessary "article#section" links and piped links to available redirects per WP:NOTBROKEN and MOS:SECTLINK. A script capable of finding correct/relevant redirects. For example, if there is a "article #Section XYZ" link and there is a "redirect XYZ" to that specific section, then the script should be able to find and suggest the available redirect(s). Same for the piped links. Mann Mann (talk) 21:00, 12 January 2022 (UTC)
A script that does nothing beneficial
Hello, I wasn't sure if this was the proper place to request this kind of stuff but the community portal says "specialized script that doesn't exist yet", and I think it falls under that line. I say that because it doesn't do anything "beneficial" to make something cool for my user talk page. I had a couple of ideas for funny "notices" to put at the top of my talk page, but putting too many would make things cluttered. Instead, I came up with the idea for a script that cycles through a large selection of notices and other things; it chooses one from a list (I'm using my sandbox) of these templates and puts uses it on the talk page. Whenever the page is refreshed or purged, a new one from that list is put there (in the same spot). Is that possible? Or is this some sort of thing that can be done without using a script? Panini!🥪 14:52, 13 January 2022 (UTC)
- User scripts only do things for you, not for other people. Sounds like you want this to occur whenever anyone loads a page. You'd probably want a template/module. Might want to cut and paste this over to WP:RT. –Novem Linguae (talk) 15:01, 13 January 2022 (UTC)
- The code in {{Randomquote}} would probably work fine for Panini!. – Jonesey95 (talk) 15:29, 13 January 2022 (UTC)
- Jonesey95, Ie been getting the results I want (still at User:Panini!/sandbox5) but it's only been showing the first six of my list (I have about fifteen). Is there something wrong with the code after I removed some of it? Panini!🥪 15:51, 13 January 2022 (UTC)
- The code in {{Randomquote}} would probably work fine for Panini!. – Jonesey95 (talk) 15:29, 13 January 2022 (UTC)
Special:PendingChanges - Rollback option
Can a veteran user script creator take a look at my request at VP:VPT and give its opinion on it? :) - Klein Muçi (talk) 03:56, 30 January 2022 (UTC)
Shortcut preferences toggle buttons
Hi, I need a script to toggle on and off the "Temporarily disable the visual editor while it is in beta" option in Editing section of prefs. A shortcut toggle button at the top of page will be preferable as I might have to switch many times. It will be of immense help if someone can build a script to achieve that. Also, if someone does build it, they may want to do it such that any user is able to select their 5-10 most used prefs and create a shortcut list without having to go deep into preferences page. Thanks! ---CX Zoom(he/him) (let's talk|contribs) 20:46, 14 February 2022 (UTC)
- If this is not possible, a link to add
&veaction=edit
to the edit page link might be helpful. – Jonesey95 (talk) 20:56, 14 February 2022 (UTC) - @CX Zoom:
Done with User:Qwerfjkl/scripts/VEtoggle. ― Qwerfjkltalk 21:50, 14 February 2022 (UTC)- Thank you very much, Qwerfjkl. Thanks Jonesey95. ---CX Zoom(he/him) (let's talk|contribs) 09:04, 15 February 2022 (UTC)
Interlanguage linking on minerva
A script that will do the same thing described here. Thanks. —Yahya (talk • contribs.) 09:30, 19 February 2022 (UTC)
- This seems to be already possible by enabling the advanced mode in Special:MobileOptions. Nardog (talk) 15:25, 30 March 2022 (UTC)
- @Nardog No, it can't be done that way. —Yahya (talk • contribs.) 16:21, 20 April 2022 (UTC)
- Oh, it's about adding interlangs. Sorry for the misunderstanding. Recreating the "Add links" dialog on the mobile site seems a bit complicated a task, but you could easily add a link to Wikidata (this example requires the advanced mode): I noticed the interface for adding interlangs on the mobile Wikidata sucks, so the link forces the desktop site. Remove
if (mw.config.get('skin') === 'minerva' && mw.config.get('wgAction') === 'view' && mw.config.get('wgNamespaceNumber') >= 0 && mw.config.get('wgNamespaceNumber') % 2 === 0 && mw.config.get('wgArticleId') ) { $(function () { if (mw.config.exists('wgWikibaseItemId')) { mw.util.addPortletLink( 'p-tb', '//www.wikidata.org/wiki/' + mw.config.get('wgWikibaseItemId') + '?mobileaction=toggle_view_desktop#sitelinks-wikipedia', 'Edit interlangs' ); } else { mw.util.addPortletLink( 'p-tb', '//www.wikidata.org/wiki/Special:NewItem?site=' + mw.config.get('wgWikiID') + '&page=' + encodeURIComponent(mw.config.get('wgPageName')).replace(/_/g, '+') + '&mobileaction=toggle_view_desktop', 'Add interlang' ); } }); }
?mobileaction=toggle_view_desktop
and+ '&mobileaction=toggle_view_desktop'
if you prefer the mobile site. Nardog (talk) 01:37, 21 April 2022 (UTC)
- Oh, it's about adding interlangs. Sorry for the misunderstanding. Recreating the "Add links" dialog on the mobile site seems a bit complicated a task, but you could easily add a link to Wikidata (this example requires the advanced mode):
- @Nardog No, it can't be done that way. —Yahya (talk • contribs.) 16:21, 20 April 2022 (UTC)
Save Changes
I would like to be able to save my changes without having to publish changes on https://en.wikipedia.org/wiki/Draft:Alyssa_Ruffin. — Preceding unsigned comment added by CharlesRuffin1 (talk • contribs) 04:33, 28 February 2022 (UTC)
- "Save" and "Publish" have the same meaning here at Wikipedia. When you save changes to a page on the Wikipedia servers, the revised page is published for the whole world to see. There are no pages on Wikipedia that only you can see. – Jonesey95 (talk) 17:23, 28 February 2022 (UTC)
- Sounds like you want meta:Community Wishlist Survey 2022/Editing/Autosave edited or new unpublished article (which looks likely to be investigated/implemented)czar 23:38, 28 February 2022 (UTC)
Limit time on Wikipedia
Hi, WP:WikiBreak Enforcer is a great script for those who wish to take some time off of Wikipedia to invest in real life responsibilities. But I don't want to take some days off of Wikipedia, but want to force my WP activity into a singular 1 hour slot (say, 10pm to 11pm) each day, so that I can utilise the rest of the time to prepare for my upcoming very important exams. Is it possible to create such a script? Thanks! ---CX Zoom(he/him) (let's talk|contribs) 07:46, 10 March 2022 (UTC)
- @CX Zoom:
Done with User:Qwerfjkl/scripts/wikibreak.. ― Qwerfjkltalk 18:33, 10 March 2022 (UTC)- @CX Zoom and @Qwerfjkl: FYI, the script looks overlapping in functionality with User:Anomie/lockout.js :) 🐶 EpicPupper (he/him | talk) 01:20, 1 April 2022 (UTC)
Accept changes on Special:RecentChanges
Hello! In SqWiki we have mw:Extension:FlaggedRevs, activated for all pages, similar to DeWiki and some other wikis. With that, reviewers get an extra WP:Rollback button in Special:RecentChanges which they can use to quickly revert vandalism. Can a user script be made that it also adds an accept button beside it that can be used to quickly accept good changes? It would help a lot in keeping our backlog lower. - Klein Muçi (talk) 13:26, 22 March 2022 (UTC)
- @Klein Muçi: User:Nardog/QuickAccept.js – let me know what you think. Also can you point to the code that shows rollback buttons on RecentChanges? I wonder if I could make the accept button aesthetically consistent with the rollback button. Nardog (talk) 15:13, 30 March 2022 (UTC)
- @Nardog, almost perfect! I'm almost inclined to make it a gadget auto-activated for all users. I believe if the said extension wasn't the most un-maintained one I'd be asking for this to be a native feature on it. Speaking of which, check this discussion and this discussion, especially MusikAnimal's answers. I believe the short answer for your question is this link. The only addition I'd like to have is to have both buttons show side to side by each-other. Currently we get the accept button, some information, some information and then the revert button. To be honest, I generally wish for buttons instead of words so having both those buttons be icons instead of links would be maybe better but that's, most likely, a detail for another request in another time. - Klein Muçi (talk) 15:51, 30 March 2022 (UTC)
- Oh, so it's part of the extension? Yeah, showing them next to each other is what I basically meant by "aesthetically consistent". Can you give me the reviewer and rollbacker rights on sqwiki so I can figure it out? I tried to get them on testwiki but turns out testwiki and test2wiki each have only one, not both! Nardog (talk) 16:15, 30 March 2022 (UTC)
- @Nardog, done. Those + more granted for 1 day. I can extended it to 1 week or more if so needed, just tell me.
- And yes, it is part of the extension. If you followed that rabbit hole of links I sent above, you may have seen that the whole thing is a bit chaotic. EnWiki doesn't use that extension much and therefore (I believe) that has led to that extension being unmaintained which in turn has led to the whole pending changes thing being a bit hard to utilize properly. For example, I have 8 years as an admin in SqWiki and I'm still not 100% sure where those 4 rights I just gave you change from one another and how they serve in reviewing pending changes. We rely on EnWiki's help pages for these kind of instructions but EnWiki doesn't use that extension in the way we use it so its help pages aren't much of help for us currently. If you followed all the links you may have also seen that some of our past admins have asked for some specific autopromotion workflows in the past, being inspired by DeWiki, which has led to us having MANY de jure reviewers but only 2-3 de facto ones. This has created a backlog of edits waiting review for more than 1 year now. I was desperate to solve that backlog problem because we have had quite some complaints about it in the past and thought about learning a bit more about that extension and maybe suggesting some improvements to it, like the one you just did as an user script, and to our autopromotion workflows but unfortunately I was welcomed by the harsh reality that EnWiki is barely related to that extension and it being one of the most unmaintained extension currently so I just settled for this request here, which again, if you followed the links, many people believed could also go totally unanswered. It didn't and for that I'm grateful and I thank you! :) - Klein Muçi (talk) 16:45, 30 March 2022 (UTC)
- @Klein Muçi: Well, I'm sorry, this is embarrassing: Turns out I didn't need the rights at all as (1) there's no rollbacker group and only admins get the rollback tool on sqwiki and (2) I'm already a rollbacker here. For some reason I thought you were talking about a special rollback button I wasn't privy to that appeared only for edits with pending changes. Oh well. Anyway, what do you think of the change to the script I just made? Nardog (talk) 17:02, 30 March 2022 (UTC)
- @Nardog, now it seems perfect! The request may be considered resolved.
- Some side missions:
- Can we add a l18n/translation possibility to its strings?
- Can we add icons-instead-of-links possibility to it? A pair of icons like thumbs up/thumbs down for accept/reject. (Not really that pair as that would be confusing but just to express the idea.) Having a toggle function for this would be nice.
- Can we add both those side links/buttons (accept/revert) even on entries on this page like we did on Special:RecentChanges? Having a toggle function for this would be nice.
- Thanks a lot for your help! :) - Klein Muçi (talk) 17:15, 30 March 2022 (UTC)
- Great! I'll work on those later. As for i18n, I was working on the premise that this would be a local script configured for sqwiki since the user groups with the review right differ from wiki to wiki (it could asynchronously retrieve which rights the user has, but that's slow), but I guess that can also be a configurable message in and of itself now that I think about it. Nardog (talk) 17:32, 30 March 2022 (UTC)
- ... I also get the accept button beside my edits. Is that intended? I believe I shouldn't get it because my edits are automatically accepted given my permissions. What is there to accept per se? Same would be true for other reviewers as well. I get the revert button as well but we can always revert ourselves while we can't further accept ourselves, can we? Just noticed it. - Klein Muçi (talk) 17:23, 30 March 2022 (UTC)
- Oh, that may be because I only tested it with the non-grouping interface. I'll fix it. Nardog (talk) 17:32, 30 March 2022 (UTC)
- Actually I don't know if this is the case. You do have many pending edits over there after all. Don't you see "[Kontrollimi në pritje]" next to them too? If so, it seems appropriate to show the button for them. Nardog (talk) 18:31, 31 March 2022 (UTC)
- @Nardog, another idea I just had now would be to have both texts highlighted in red and green respectively. It does seem a bit like a big sea of blue currently. - Klein Muçi (talk) 22:55, 30 March 2022 (UTC)
- Also, when you revert something, the revert button disappears in all instances of edits in that page. When you accept something, it changes on "unaccept" on that entry and it stays on "accept" on all other entries. It should change on them as well. - Klein Muçi (talk) 23:12, 30 March 2022 (UTC)
- The accept button should now show only for the latest edit to each page. Should it show for older edits too? Nardog (talk) 21:46, 31 March 2022 (UTC)
- @Nardog, I believe it shouldn't. It still does show though but it disappears after refreshing the page. The revert button disappears immediately, without reloading the page. Can we make it behave in the same way or do we have to settle for that?
- Some other fine-tuning:
- I also get the revert button when the edit created a new page, if I'm not wrong. I believe it shouldn't be there considering you can't really revert those types of edits because you can't "revert page creation". I may be wrong on this or even on the part above in regard to the accept button considering I'm not an expert on reviewing. If that's true, ignore these.
- Something strange happens, which has its good sides but I don't believe it is intentional: We currently have only the icons but the text version remains "underneath" them. When you try to select the icon you get the text partly shown - in SqWiki we get "Riktheje" and "Accept" - and if you search for any of those 2 terms (Ctrl + F) you'll get those entries highlighted. This is good because I can open the list of recent changes and search for any of those terms to quickly highlight which entries require review but it is a very strange way to do it.
- - Klein Muçi (talk) 02:25, 1 April 2022 (UTC)
- ... Also, when you rollback changes on Special:RecentChanges the page reloads to show you the diff you just made while in Special:PendingChanges that doesn't happen. Can we "remove" it from Special:RecentChanges too? - Klein Muçi (talk) 12:58, 1 April 2022 (UTC)
- I'm having a hard time understanding what you mean by "the revert button disappears". By default, the rollback button is a simple link that immediately performs the action upon being clicked. So if you click it, the browser navigates to a different page saying "Action complete" with a diff. I just realized there was the option "Show a confirmation prompt when clicking on a rollback link" (in Preferences → Editing), but even with this enabled, clicking Confirm still simply opens the link. It must be some gadget, script or option I'm not aware of that's preventing the page from reloading. I can't help you if I don't know what it is. Nardog (talk) 20:38, 1 April 2022 (UTC)
- @Nardog:
- I'm having a hard time understanding what you mean by "the revert button disappears".
- You have 3 edits in the same page. You go to Special:RecentChanges, find these 3 edits, they all have a "Rollback" link beside them. You press "Rollback" on the last one, the "Rollback" link disappears on the other 2 edits. The same behavior doesn't happen with the "Accept" link.
- Don't worry much though. As I said, I'm aware I may be asking for some impossible things accidently. I'm not an expert in reviewing and therefore I lack the skill of clearly describing what I have in my mind in regard to it.
- Some last requests:
- Can we somehow enhance it to also allow reverting with summaries, maybe even choosing from some default ones? I'm aware this would be a different thing from the rollback button. Having something pre-listed like "Sources needed." would be helpful in many reverts in which the information doesn't seem to be false but we can't be sure as there are no sources.
- MAYBE having a plain back-curving black arrow would be better than the current icon we have for rolling back? The one we have isn't bad. I just wanted your opinion on this matter.
- Most importantly, can the script be made to work ONLY if the Navigation popups gadget is active? As I said in the beginning, I was thinking of making this the default way for any reviewer but this whole thing works so well for me only because I can hover over the links and see what the change was without having to open the page. If you don't have that gadget active, you can't really utilize this script as you'd have no idea what the change that you're accepting/refusing is without opening the page.
- - Klein Muçi (talk) 21:46, 1 April 2022 (UTC)
- No, the rollback link by default shows for the latest edit only (example). Wait... When you said "The revert button disappears immediately, without reloading the page", were you talking about the revert button in my script? So you want the same behavior for rollback on RecentChanges as well? If not, I still want to know what's preventing the page from reloading because it could interfere with my script. Nardog (talk) 22:00, 1 April 2022 (UTC)
- I meant the accept button, not the rollback button. If you have consecutive edits, you get the accept link beside each of them, not only on the last line, like the rollback link in the photo you just showed me. If you accept the last one, the other accept links stay there until you reload the page manually. - Klein Muçi (talk) 22:17, 1 April 2022 (UTC)
- I don't understand... The accept button should be showing only for the latest edit of each page (I just made sure that it is). Do you want it shown for older edits too? Nardog (talk) 22:36, 1 April 2022 (UTC)
- @Nardog, no. I wanted precisely that. If it does, it's good. I can't test it at SqWiki currently as there are no consecutive edits to accept. - Klein Muçi (talk) 22:42, 1 April 2022 (UTC)
- I don't understand... The accept button should be showing only for the latest edit of each page (I just made sure that it is). Do you want it shown for older edits too? Nardog (talk) 22:36, 1 April 2022 (UTC)
- I meant the accept button, not the rollback button. If you have consecutive edits, you get the accept link beside each of them, not only on the last line, like the rollback link in the photo you just showed me. If you accept the last one, the other accept links stay there until you reload the page manually. - Klein Muçi (talk) 22:17, 1 April 2022 (UTC)
- No, the rollback link by default shows for the latest edit only (example). Wait... When you said "The revert button disappears immediately, without reloading the page", were you talking about the revert button in my script? So you want the same behavior for rollback on RecentChanges as well? If not, I still want to know what's preventing the page from reloading because it could interfere with my script. Nardog (talk) 22:00, 1 April 2022 (UTC)
- I'm having a hard time understanding what you mean by "the revert button disappears". By default, the rollback button is a simple link that immediately performs the action upon being clicked. So if you click it, the browser navigates to a different page saying "Action complete" with a diff. I just realized there was the option "Show a confirmation prompt when clicking on a rollback link" (in Preferences → Editing), but even with this enabled, clicking Confirm still simply opens the link. It must be some gadget, script or option I'm not aware of that's preventing the page from reloading. I can't help you if I don't know what it is. Nardog (talk) 20:38, 1 April 2022 (UTC)
- The accept button should now show only for the latest edit to each page. Should it show for older edits too? Nardog (talk) 21:46, 31 March 2022 (UTC)
- @Klein Muçi: Well, I'm sorry, this is embarrassing: Turns out I didn't need the rights at all as (1) there's no rollbacker group and only admins get the rollback tool on sqwiki and (2) I'm already a rollbacker here. For some reason I thought you were talking about a special rollback button I wasn't privy to that appeared only for edits with pending changes. Oh well. Anyway, what do you think of the change to the script I just made? Nardog (talk) 17:02, 30 March 2022 (UTC)
- Oh, so it's part of the extension? Yeah, showing them next to each other is what I basically meant by "aesthetically consistent". Can you give me the reviewer and rollbacker rights on sqwiki so I can figure it out? I tried to get them on testwiki but turns out testwiki and test2wiki each have only one, not both! Nardog (talk) 16:15, 30 March 2022 (UTC)
- @Nardog, almost perfect! I'm almost inclined to make it a gadget auto-activated for all users. I believe if the said extension wasn't the most un-maintained one I'd be asking for this to be a native feature on it. Speaking of which, check this discussion and this discussion, especially MusikAnimal's answers. I believe the short answer for your question is this link. The only addition I'd like to have is to have both buttons show side to side by each-other. Currently we get the accept button, some information, some information and then the revert button. To be honest, I generally wish for buttons instead of words so having both those buttons be icons instead of links would be maybe better but that's, most likely, a detail for another request in another time. - Klein Muçi (talk) 15:51, 30 March 2022 (UTC)
- (←) The button thing is intentional. I wanted it to be done completely in CSS so you can safely customize the default rollback button and easily opt it out (as you suggested, if that is what you meant by "having a toggle function"), so I basically copied how the section edit button is rendered in Minerva. I've made it a separate CSS.
- The rollback button is also now a separate script, because making the default rollback link a dynamic Ajax button is a different thing in itself. I added the ability to enter a summary, which serves as confirmation as well. The confirmation option in Preferences needs to be turned off to use this. I considered supporting summary presets but that's significantly more cumbersome to implement. Even Twinkle doesn't have it after all. If you really need presets, I suggest using a clipboard manager (Win+V on Windows 10+).
- There are other scripts than Navigation popups that allow dynamic loading of diffs (and you could also open them in tabs), so I don't want to limit who can use the scripts in that way.
- There's no way to tell whether the last edit of a page is also the only one (i.e. a creation) on PendingChanges, so the script just shows the button for all edits on the list. Since the page name is the only information already available, both accept and rollback on PendingChanges are done to whatever the last edit is (whoever the last editor is) when the button is clicked, not when PendingChanges was opened or when you view the diff, so beware you could accept or roll back an edit you didn't intend to if the edit was made during that short time period.
- I don't like OOUI's undo icon () as I don't find it "curvy" enough. So I used instead. But you can use whatever image anyway since it's just CSS. Nardog (talk) 02:13, 2 April 2022 (UTC)
- @Nardog, thank you! I had the same train-thought when I suggested using presets, especially the Twinkle part. I'm a bit confused now though:
- Should I have both scripts to have the same functionality I had before you split them?
- How do I actually load the CSS part? I know how to "install scripts" in JS in my common.js page but I have never "imported" CSS pages. Sorry for the lack of correct terminology.
- Can we have QuickReview.js (or another name) that is just a script that combines both scripts for users who prefer it like that so we don't have to import 2 scripts instead of 1?
- As for the part regarding dynamic loading of diffs, my rationale was related to the SqWiki community mostly. Being a small community, I know our users don't really use user scripts or even gadgets. NavPopUp is the only one that enjoys a bit of popularity. I was afraid that having those buttons there without it would make some reviewers irresponsible, accepting/refusing everything without seeing what they're accepting/refusing, not really understanding what they're actually doing, just to get the list cleared. Unfortunately, it is not a weird scenario for communities like us. But I do understand that from a global point of view tying it up to that specific gadget doesn't make much sense. - Klein Muçi (talk) 05:52, 2 April 2022 (UTC)
- Is this the correct way to act with the CSS page? It works fine practically.
- PS: Shouldn't the name of the CSS page be something more neutral now that Rollback and Accept are two different scripts and the said CSS acts on both? - Klein Muçi (talk) 06:04, 2 April 2022 (UTC)
- QuickAccept adds accept buttons on RecentChanges, Watchlist and PendingChanges, and QuickRollback makes the default rollback buttons dynamic and adds its own rollback buttons on PendingChanges. You can have either one or both and it should work fine.
- I recommend loading the CSS by adding
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Nardog/ButtonizeRollback.css&action=raw&ctype=text/css', 'text/css');
to your .js. Using@import
is slow. - Loading a script that loads both would actually be to load three scripts in total, so I don't think it's a good idea. If you make the scripts gadgets, you can limit who can install them by the rights they have, which would naturally be
review
androllback
, respectively, for the scripts, but you can also specify something that only admins have, likedelete
, to deter non-admins from enabling it, for example. You can also make enabling the gadget impossible without also loading Navigation popups by addingext.gadget.Navigation_popups
to the dependencies for the gadget. - The idea was to make the CSS a gadget as well. Perhaps I should split it too. Nardog (talk) 07:04, 2 April 2022 (UTC)
- @Nardog, oh, so I should turn it into a gadget (well, multiple gadgets) and then set up its dependencies. Understood. (And thank you for the loading suggestion!) If I choose to go that way, I'll probably need a bit more further assistance to make the conversion possible (even though I've changed user scripts into gadgets in the past) but that's a conversation that we can continue on our talk pages.
- I wasn't actually thinking of having a script that loads other scripts but rather having a script that has the code of both scripts merged into it, basically what we had in the beginning. But you can decide on that.
- I tried the summary function. I really love the popup, very fresh. The only problem is that we get it every time while 80% of my rollbacks would need no summary. Is there a way to make it only appear "when needed"? This, of course, begs the question how will the software know when you actually need it. I couldn't think of an elegant way to implement that function beside having an extra button for that. So we'd have Rollback, Rollback with summary and Accept. Maybe the "Rollback with summary" button only appears when you hover on the Rollback button? Hopefully you have a better idea. Also, shouldn't we have the summary ability even when accepting? Its use case would be even lower practically but if it is possible... I understand that would mean +1 more (hidden or not) Accept with summary button in my scenario above though. - Klein Muçi (talk) 07:26, 2 April 2022 (UTC)
- Well, you don't need to make them gadgets, but I certainly wrote them with that intention (using old syntax that passes the MW linter). And if you do, enabling both would essentially have the same effect as combining them into one script because gadgets are loaded all at once. I'll think about your suggestions about summaries. I thought just hitting Enter wouldn't be too much of an obstacle though. Nardog (talk) 07:34, 2 April 2022 (UTC)
- Oh, and since we're at the summaries part, since the summary popup happens before the software can be assured if the rollback is possible or not, there are times when you will end up writing a summary only for you to get another popup notifying that the rollback isn't possible because the title couldn't be found or another reason. I don't know if something can be done to mitigate this. I thought you should know. - Klein Muçi (talk) 07:59, 2 April 2022 (UTC)
- Rolling back changes in the S:RecentChanges now behaves similarly to what happens in S:PendingChanges. Page doesn't reload to the diff link but instead we only get a popup. That's good news! Can we also get a popup when accepting changes? - Klein Muçi (talk) 13:17, 2 April 2022 (UTC)
- You mean a notification? Nardog (talk) 14:07, 2 April 2022 (UTC)
- I believe so, yes. I also have to say that I don't know why but currently the script appears to be broken?! I can't roll back any changes in S:PendingChanges. I keep getting "Can't find title" or "Can't find the last user" notifications on EVERY entry. Can you test it out? Does it work fine for you? - Klein Muçi (talk) 14:19, 2 April 2022 (UTC)
- It looks like Navigation popups was interfering. How about now? Nardog (talk) 15:05, 2 April 2022 (UTC)
- Unfortunately, still no. :/ - Klein Muçi (talk) 15:18, 2 April 2022 (UTC)
- Have you cleared browser cache and reloaded the special page? Is there any change in the errors you're seeing etc.? Nardog (talk) 15:24, 2 April 2022 (UTC)
- I did. I still get "Can't find last edit." in every roll back. I gave you review privileges again in SqWiki for 1 week so you can test it out for yourself. - Klein Muçi (talk) 15:33, 2 April 2022 (UTC)
- It's working for me. Try disabling gadgets/scripts one by one. Nardog (talk) 06:31, 3 April 2022 (UTC)
- @Nardog, did you try it from Special:PendingChanges or from Special:RecentChanges? Because from S:RC it never stopped working even for me. - Klein Muçi (talk) 06:35, 3 April 2022 (UTC)
- Removed every script and disabled every gadget. I still get "Couldn't retrieve the last editor." on every rollback I've tried. :/ - Klein Muçi (talk) 06:46, 3 April 2022 (UTC)
- @Klein Muçi: I've made it so that the relevant data pops up in case of that error. Copy and paste it here. Nardog (talk) 06:58, 3 April 2022 (UTC)
- @Nardog:
- sq.wikipedia.org says Speciale:PendingChanges
- {"batchcomplete":true,"query":{"pages": [{"ns":-1,"title":"Speciale:PendingChanges","special":true}]}} - Klein Muçi (talk) 07:05, 3 April 2022 (UTC)
- Thanks, that's... weird. Can you tell me the HTML code of the list item where the rollback fails? (Right click on the bullet item, select "Inspect", locate the
<li>
, press F2 and copy.) It should look like this:Nardog (talk) 07:10, 3 April 2022 (UTC)<li><a href="/wiki/Fshatrat_e_Shqip%C3%ABris%C3%AB" title="Fshatrat e Shqipërisë">Fshatrat e Shqipërisë</a> (<a href="/w/index.php?title=Fshatrat_e_Shqip%C3%ABris%C3%AB&action=history" title="Fshatrat e Shqipërisë">versione</a>) <span dir="ltr" class="mw-plusminus-pos mw-diff-bytes" title="16.150 bajtë pas ndryshimit">+42</span> (<a href="/w/index.php?title=Fshatrat_e_Shqip%C3%ABris%C3%AB&diff=cur&oldid=2133180" title="Fshatrat e Shqipërisë">shqyrtim</a>) <i>(590 ditë)</i><span class="quickrollback"><a href="#" role="button" title="Restore penultimate editor's revision">rollback</a></span><span class="quickaccept"><a href="#" role="button" title="Accept this pending revision">accept</a></span></li>
- @Nardog:
- - Klein Muçi (talk) 07:23, 3 April 2022 (UTC)
<li><a href="/wiki/Shqip%C3%ABria_n%C3%AB_Luft%C3%ABn_e_Dyt%C3%AB_Bot%C3%ABrore" title="">Shqipëria në Luftën e Dytë Botërore</a> (<a href="/w/index.php?title=Shqip%C3%ABria_n%C3%AB_Luft%C3%ABn_e_Dyt%C3%AB_Bot%C3%ABrore&action=history" title="Shqipëria në Luftën e Dytë Botërore">versione</a>) <span dir="ltr" class="mw-plusminus-pos mw-diff-bytes" title="55.931 bajtë pas ndryshimit">+41</span>‎ (<a href="/w/index.php?title=Shqip%C3%ABria_n%C3%AB_Luft%C3%ABn_e_Dyt%C3%AB_Bot%C3%ABrore&diff=cur&oldid=2403171" title="">shqyrtim</a>) <i>(38 orë)</i> (2 përdorues aktivë duke e mbikëqyrur)<span class="quickrollback"><a href="#" role="button" title="Restore penultimate editor's revision">rollback</a></span><span class="quickaccept"><a href="#" role="button" title="Accept this pending revision">accept</a></span></li>
- Did you tried to perform rollback on that item and it failed? Nardog (talk) 07:30, 3 April 2022 (UTC)
- Many times. - Klein Muçi (talk) 07:32, 3 April 2022 (UTC)
- How about now? Nardog (talk) 07:34, 3 April 2022 (UTC)
- It works! - Klein Muçi (talk) 07:39, 3 April 2022 (UTC)
- How about now? Nardog (talk) 07:34, 3 April 2022 (UTC)
- Many times. - Klein Muçi (talk) 07:32, 3 April 2022 (UTC)
- Did you tried to perform rollback on that item and it failed? Nardog (talk) 07:30, 3 April 2022 (UTC)
- Thanks, that's... weird. Can you tell me the HTML code of the list item where the rollback fails? (Right click on the bullet item, select "Inspect", locate the
- @Klein Muçi: I've made it so that the relevant data pops up in case of that error. Copy and paste it here. Nardog (talk) 06:58, 3 April 2022 (UTC)
- It's working for me. Try disabling gadgets/scripts one by one. Nardog (talk) 06:31, 3 April 2022 (UTC)
- Another suggestion:
- Can you make the summary popup read "Enter the rollback summary for page [title] (optional):"?
- Or maybe highlight the edit that is being changed while showing that popup. - Klein Muçi (talk) 17:53, 2 April 2022 (UTC)
- Even more suggestions:
- Make the scripts available when viewing page histories and user contributions. - Klein Muçi (talk) 18:28, 2 April 2022 (UTC)
- To be honest, now that I'm able to work more with the script, I'm kinda liking the summary popup. I just wish that it could auto-complete/suggest from past summaries like the default summary works. - Klein Muçi (talk) 08:15, 3 April 2022 (UTC)
- Apparently the said scripts are now (?) available in page histories and user contributions but they act strange. - Klein Muçi (talk) 21:42, 3 April 2022 (UTC)
- I decided against replacing it with the icon on those pages because otherwise it'd obscure how many edits you're reverting. Nardog (talk) 21:49, 3 April 2022 (UTC)
- Oh, so it's deliberate. We're keeping rollback and accept separated then I guess, no? Separated by text I mean. What about accepting/unaccepting notifications, summaries and their histories? Is there any hope for those or did you decide against them as well? (Not hurrying, just curious given what you just wrote.) - Klein Muçi (talk) 22:09, 3 April 2022 (UTC)
- Made the summary input use the same ID as the MW one. Hacky but works I guess. I really don't see the need for accept notifications because the action is far less consequential than rollback and you can always undo it, and the change of the button intuitively signals what action has been done to which item. Nardog (talk) 22:45, 3 April 2022 (UTC)
- Can we have the accepting link also as a text link on those pages then? It's a bit confusing for my eyes in its current state. :/ I believe it's better to learn to tolerate the blue sea in these cases. - Klein Muçi (talk) 22:15, 3 April 2022 (UTC)
- I quite like the checkmark at the end of each line. Note more people have the review right than the rollback right. Again, it's just CSS, so you can override it if you don't like it. Nardog (talk) 22:45, 3 April 2022 (UTC)
- @Nardog, yes but if I'll go on the gadget territory, I intended to make it almost an equal copy to facilitate updates in the future. I'll take your word anyway.
- After your latest change the script is unfortunately again broken. I get "Couldn't retrieve the last editor" for every entry and no summary whatsoever this time.
- Can you please add the accepting possibility even for Special:UnreviewedPages? I was told you don't have it here in EnWiki.
- Can you please add a unique tag for the scripts or maybe make them prepend a short describing sentence like "...made using [Name of script]" in their summaries? I'd like it if more people knew about this and your work certainly deserves recognition.
- - Klein Muçi (talk) 23:03, 3 April 2022 (UTC)
- @Nardog, yes but if I'll go on the gadget territory, I intended to make it almost an equal copy to facilitate updates in the future. I'll take your word anyway.
- I quite like the checkmark at the end of each line. Note more people have the review right than the rollback right. Again, it's just CSS, so you can override it if you don't like it. Nardog (talk) 22:45, 3 April 2022 (UTC)
- Oh, so it's deliberate. We're keeping rollback and accept separated then I guess, no? Separated by text I mean. What about accepting/unaccepting notifications, summaries and their histories? Is there any hope for those or did you decide against them as well? (Not hurrying, just curious given what you just wrote.) - Klein Muçi (talk) 22:09, 3 April 2022 (UTC)
- I decided against replacing it with the icon on those pages because otherwise it'd obscure how many edits you're reverting. Nardog (talk) 21:49, 3 April 2022 (UTC)
- I did. I still get "Can't find last edit." in every roll back. I gave you review privileges again in SqWiki for 1 week so you can test it out for yourself. - Klein Muçi (talk) 15:33, 2 April 2022 (UTC)
- Have you cleared browser cache and reloaded the special page? Is there any change in the errors you're seeing etc.? Nardog (talk) 15:24, 2 April 2022 (UTC)
- Unfortunately, still no. :/ - Klein Muçi (talk) 15:18, 2 April 2022 (UTC)
- It looks like Navigation popups was interfering. How about now? Nardog (talk) 15:05, 2 April 2022 (UTC)
- I believe so, yes. I also have to say that I don't know why but currently the script appears to be broken?! I can't roll back any changes in S:PendingChanges. I keep getting "Can't find title" or "Can't find the last user" notifications on EVERY entry. Can you test it out? Does it work fine for you? - Klein Muçi (talk) 14:19, 2 April 2022 (UTC)
- You mean a notification? Nardog (talk) 14:07, 2 April 2022 (UTC)
- Well, you don't need to make them gadgets, but I certainly wrote them with that intention (using old syntax that passes the MW linter). And if you do, enabling both would essentially have the same effect as combining them into one script because gadgets are loaded all at once. I'll think about your suggestions about summaries. I thought just hitting Enter wouldn't be too much of an obstacle though. Nardog (talk) 07:34, 2 April 2022 (UTC)
- @Nardog, thank you! I had the same train-thought when I suggested using presets, especially the Twinkle part. I'm a bit confused now though:
- (←) QuickAccept now showing on UnreviewedPages. Yeah I noticed the problem and fixed it. Try it again.
- I've made two changes to make advertising the script possible. Now not only the part before but after a custom summary can be configured as a message, so you can put e.g. wherever the script is loaded (your common.js if you're loading it as a user script; the same .js page as the script itself if it's a gadget). Unfortunately the default summary (when you leave the summary prompt blank) cannot be customized. The second option is to set up a tag. Add a tag (e.g.
mw.messages.set({ 'quickrollback-custom-summary': 'Reverted edits by [[Special:Contributions/$1|$1]] ([[User talk:$1|talk]]): $2 ([[INSERT YOUR LINK HERE]])', 'quickrollback-custom-summary-anon': 'Reverted edits by [[Special:Contributions/$1|$1]]: $2 ([[INSERT YOUR LINK HERE]])' });
quickrollback
) and putmw.messages.set('quickrollback-tag', 'quickrollback');
wherever the script is loaded, and it will (hopefully) add the tag to every rollback it performs. This should work even with the default summary. Nardog (talk) 23:27, 3 April 2022 (UTC) - I've tested the tag option but it hasn't worked. Maybe either rollbacks can't be tagged, or the tag itself needs to be configured in a specific way. Nardog (talk) 23:45, 3 April 2022 (UTC)
- Thank you! I'll deal with the advertisement part now (linking with your user script page here) but can't you make the link thing part of the script itself here and link to a documentation page for it in your user space? I mean after hopefully you write one in the future. It would be a step closer to gadget conversion. That's how SWViever does it (and where I got the idea from. (It also uses a tag of its own.) - Klein Muçi (talk) 23:49, 3 April 2022 (UTC)
- If you want to write documentation on how to use the script on sqwiki and link to it in your summaries, that's fine. But I'd prefer if you didn't link to my user page. Nardog (talk) 00:01, 4 April 2022 (UTC)
- @Nardog, are you sure? Currently I have this: Reverted edits by [[Special:Contributions/$1|$1]] ([[User talk:$1|talk]]) using [[w:en:User:Nardog/QuickRollback.js|QuickRollback]]: $2
- If you don't prefer that, I can remove the link altogether and try only for the tag (if that works). - Klein Muçi (talk) 00:07, 4 April 2022 (UTC)
- Yeah, please remove that. I just said I don't. Nardog (talk) 00:13, 4 April 2022 (UTC)
- @Nardog: Link removed. Created tag QuickRollback. Added mw.messages.set('QuickRollback-tag', 'QuickRollback'); in my .js page and unfortunately like you said, it didn't work. Deleted the tag again.
- The summary works fine. The former one looked a bit more fresh but this one doesn't get removed when you temporarily change tabs so maybe it's better.
- Last questions:
- A part of the FlaggedRev extension is also the accuracy level of the edits going from 0 to 2. This comes in the form of having 3 tickspheres when reviewing edits which correspond to the 3 aforementioned accuracy levels. Do you think we can/should implement that as part of your script?
- Are you planning to split the corresponding CSS file or change its name? I'm asking so I can follow up with my .js page.
- After this, I believe we've touched every detail there is in regard to that extension and maybe I can go on forking it as a gadget in SqWiki in the near future. - Klein Muçi (talk) 01:06, 4 April 2022 (UTC)
- Message keys are case-sensitive so
QuickRollback-tag
would have never worked, although it looks like you tried the lowercase version so it doesn't seem to be the only problem. - Oh, I didn't know about the accuracy level thing, it seems unique to certain wikis. How do you think it can be implemented? Should there be a dropdown like watchlist expiry? Or does a user usually pick one level and stick to it?
- Not really. If you're buttonizing one of the two types of links then it seems natural to do the other. Nardog (talk) 09:36, 4 April 2022 (UTC)
- Yes, I did try different variations of it but they didn't work. I'd like to have the tag functionality so if you're ever able to make it work, please notify me.
- Yes, the whole extension feels strange and clunky and that's only made worse by the half-translations and some wrong ones that have been provided throughout the years. We are forced to use it because we need a basic net-like structure to prevent vandalism but if that wasn't the case, we would have moved on from it I believe. We currently have pages in S:UnreviewedPages waiting there for more than 3 years apparently. Talk about wiki!
- Keeping all that in mind, what usually happens is that people rarely know about reviewing in general, let alone the accuracy levels so unfortunately no one uses them. So we have 90% of our pages stuck at level 1, the middle, just because that's the default one provided. I'm still not fully sure myself what changes do they provide and if you can somehow bring more knowledge in that, I'd be grateful. If you can implement it as part of your script, maybe things would change though. Interface changes do prove very useful and maybe I'd start utilizing it way more than I've done so far, like I started reviewing way more than I used to do just because of those buttons added.
- As for the CSS part I was expecting it to be renamed to something like ButtonizeQuickScripts.css, hopefully shorter, (maybe just Buttonize.css?) if it wasn't going to be split. But you can decide on that. - Klein Muçi (talk) 12:55, 4 April 2022 (UTC)
- If even your community doesn't know what to do with the accuracy level thing, then I think not only the script need not incorporate it but also it should probably be removed from the interface altogether like on other wikis. Nardog (talk) 14:09, 4 April 2022 (UTC)
- @Nardog, to be honest, currently I feel the same as you. I keep hoping for an overall revamp of that extension. Until then, your script is the best thing that we currently have. Unless I find any other bugs while working with it, I guess this will be it. (If that happens, I'll contact you personally on your talk page.) Thank you very much for your help! - Klein Muçi (talk) 15:30, 4 April 2022 (UTC)
- If even your community doesn't know what to do with the accuracy level thing, then I think not only the script need not incorporate it but also it should probably be removed from the interface altogether like on other wikis. Nardog (talk) 14:09, 4 April 2022 (UTC)
- Message keys are case-sensitive so
- Yeah, please remove that. I just said I don't. Nardog (talk) 00:13, 4 April 2022 (UTC)
- If you want to write documentation on how to use the script on sqwiki and link to it in your summaries, that's fine. But I'd prefer if you didn't link to my user page. Nardog (talk) 00:01, 4 April 2022 (UTC)
- Thank you! I'll deal with the advertisement part now (linking with your user script page here) but can't you make the link thing part of the script itself here and link to a documentation page for it in your user space? I mean after hopefully you write one in the future. It would be a step closer to gadget conversion. That's how SWViever does it (and where I got the idea from. (It also uses a tag of its own.) - Klein Muçi (talk) 23:49, 3 April 2022 (UTC)
2022 Q2
Category blocking
Hello! I was wondering if it would be possible for someone to develop a script to make it easier to block specific users listed in a category? I would envision this being something like how SPI handles it with check boxes to select specific users. I seem to remember Enterprisey has something similar before for mass blocking, but I can't find it anymore...posting here per Enterprisey. --TheSandDoctor Talk 06:31, 3 April 2022 (UTC)
- @TheSandDoctor: Try this one: User:NguoiDungKhongDinhDanh/Angrenamer.js. NguoiDungKhongDinhDanh 02:09, 5 April 2022 (UTC)
- @NguoiDungKhongDinhDanh: That is a fantastic start & a wonderful birthday present, thank you so much! Would it be possible for it to mimic Twinkle's softerblock by default (Example TP message) with this example summary? --TheSandDoctor Talk 16:03, 5 April 2022 (UTC)
- @TheSandDoctor: Done (diff). NguoiDungKhongDinhDanh 18:37, 5 April 2022 (UTC)
- @NguoiDungKhongDinhDanh: That's exactly what I want. Thank you so much for creating that! That will save me loads of time in the long run. Please let me know if you plan to rename the script or whatnot so that I can make sure I'm still importing the right thing. I'll let you know if I think of any other tweaks. --TheSandDoctor Talk 20:58, 5 April 2022 (UTC)
- @TheSandDoctor: Done (diff). NguoiDungKhongDinhDanh 18:37, 5 April 2022 (UTC)
- @NguoiDungKhongDinhDanh: That is a fantastic start & a wonderful birthday present, thank you so much! Would it be possible for it to mimic Twinkle's softerblock by default (Example TP message) with this example summary? --TheSandDoctor Talk 16:03, 5 April 2022 (UTC)
- @TheSandDoctor: is there are confirmation for each user/mass confirmation built in the script? I would hate for someone to be blocked because they were miscategorized. Headbomb {t · c · p · b} 01:03, 6 April 2022 (UTC)
- @Headbomb: That’s a valid concern. When I use it I manually review each one prior to even checking the box. It just allows me to streamline the process a bit, but the way I use it adds little risk. —TheSandDoctor (mobile) (talk) 04:08, 6 April 2022 (UTC)
Script for signing all unsigned replies on a talk page
Many a wikiarchaeologist browse to talk pages only to find voluminous pre-2010 sections that archive bots will struggle to identify and archive (e.g., Talk:Dale Farm). The only solution is painstaking reverse searching and combing through diffs to then add the {{unsigned}} template. Preferably, it'd be nice to have a script that identifies all talk page sections that do not end with a timestamp, lookup and add the timestamp, and preview the edit for the editor to apply. Cleaner talk pages and happy editors. This request is mentioned in Enterprisey's list above and there might be a headstart in User:Anomie/unsignedhelper (which only applies one comment at a time for those who use the old toolbar), but wanted to make a request for a more permanent solution for this common problem. czar 20:01, 10 April 2022 (UTC)
GAN review user script
- As a note, this request is just for GAR, but if you could do something similar for GAN (new nominations) you'd be my new best friend. I can give you the steps required if this is something you could do. Best Wishes, Lee Vilenski (talk • contribs) 22:05, 10 April 2022 (UTC)
- Sure. Happy to look into GAN promotion. Good idea on the steps, please share when you get a chance. –Novem Linguae (talk) 23:16, 10 April 2022 (UTC)
- We already have a userscript to nominate GAs, so this is just for closing nominations. Looking at what this would take, it's probably better as a userscript. Here's what I've got - let me know if this is something you can do, or if there is something we can pass on to do elsewhere. Here's the list from WP:GANI:
- Sure. Happy to look into GAN promotion. Good idea on the steps, please share when you get a chance. –Novem Linguae (talk) 23:16, 10 April 2022 (UTC)
- As a note, this request is just for GAR, but if you could do something similar for GAN (new nominations) you'd be my new best friend. I can give you the steps required if this is something you could do. Best Wishes, Lee Vilenski (talk • contribs) 22:05, 10 April 2022 (UTC)
Extended content
|
---|
If you determine that the article meets the good article criteria, you may pass it by doing the following:
If you determine that the article does not meet the good article criteria, you may fail it by doing the following:
|
I'd want a button, or instructions to add to the page for it to either pass, or fail. As far as I see it, passing requires:
- Replace the {{GA nominee}} template on the article talk page with
{{GA|~~~~~|topic=|page=}}
or{{GA|~~~~~|subtopic=|page=}}
, topic/subtopic/page should already be filled in, so no need to change. This may also need to be the same {{Article History}} as above, which is quite confusing to do manually. - Update class on {{WikiProject}} to GA.
- The big one is adding it to the suitable place on WP:GA. This is where I'd expect a userscript to be more beneficial, as it could list all of the places in this list, and where you should add the item. These are all in alphabetical order.
For a fail, it's simply just a case of changing {{GA nominee}} to {{Failed GA}}, or article history. Best Wishes, Lee Vilenski (talk • contribs) 14:53, 13 April 2022 (UTC)
- Looks good. I can do this one. You OK with a timeframe of several weeks? I gotta juggle GAR bot above and some other stuff. Also, the next time you do a promotion or two, instead of doing the steps yourself, can you ping me so I can practice? –Novem Linguae (talk) 09:52, 14 April 2022 (UTC)
- Sure. I've asked for a few different places, for a few years, so no drama. Anything you can get for me. I'll do a few reviews soon. Best Wishes, Lee Vilenski (talk • contribs) 10:42, 14 April 2022 (UTC)
- Novem Linguae - mind closing Talk:Washington State Route 292/GA1 for me? Best Wishes, Lee Vilenski (talk • contribs) 12:24, 24 April 2022 (UTC)
- I'll do another one, as I had to close that one. There were three edits involved with the closure, I can send diffs if this is also helpful. Best Wishes, Lee Vilenski (talk • contribs) 06:18, 26 April 2022 (UTC)
- No worries. Yeah let's do another one when it's convenient. –Novem Linguae (talk) 06:22, 26 April 2022 (UTC)
- Talk:Sora Amamiya/GA2 is to be closed. Best Wishes, Lee Vilenski (talk • contribs) 12:15, 9 May 2022 (UTC)
- Alright, I closed that one and took some notes. The fact that sub-subtopics (example: Wikipedia:Good articles/Media and drama#Actors, directors, models, performers, and celebrities) are not indicated in the {{GA}} template is a bit tricky, we will probably need to have the user pick the correct category from a dropdown box. I will probably write a script that places a link in the more menu to decline a GA as a first milestone, and then after that I will move on to promote. Do you want the script to also atop the GA page? –Novem Linguae (talk) 06:27, 10 May 2022 (UTC)
- Yeah, I think that's wise. Best Wishes, Lee Vilenski (talk • contribs) 06:31, 10 May 2022 (UTC)
- Alright, I closed that one and took some notes. The fact that sub-subtopics (example: Wikipedia:Good articles/Media and drama#Actors, directors, models, performers, and celebrities) are not indicated in the {{GA}} template is a bit tricky, we will probably need to have the user pick the correct category from a dropdown box. I will probably write a script that places a link in the more menu to decline a GA as a first milestone, and then after that I will move on to promote. Do you want the script to also atop the GA page? –Novem Linguae (talk) 06:27, 10 May 2022 (UTC)
- Talk:Sora Amamiya/GA2 is to be closed. Best Wishes, Lee Vilenski (talk • contribs) 12:15, 9 May 2022 (UTC)
- No worries. Yeah let's do another one when it's convenient. –Novem Linguae (talk) 06:22, 26 April 2022 (UTC)
- I'll do another one, as I had to close that one. There were three edits involved with the closure, I can send diffs if this is also helpful. Best Wishes, Lee Vilenski (talk • contribs) 06:18, 26 April 2022 (UTC)
- Novem Linguae - mind closing Talk:Washington State Route 292/GA1 for me? Best Wishes, Lee Vilenski (talk • contribs) 12:24, 24 April 2022 (UTC)
- Sure. I've asked for a few different places, for a few years, so no drama. Anything you can get for me. I'll do a few reviews soon. Best Wishes, Lee Vilenski (talk • contribs) 10:42, 14 April 2022 (UTC)
- FYI Firefly, who was planning to do a GAN bot at one point. * Pppery * it has begun... 21:06, 10 May 2022 (UTC)
- Good news. My real life job is calming down, I will probably be able to work on the user script this week. This one will be a bit challenging because I will need to figure out how to do a user interface, but I should be able to crack it. I will probably use Morebits or OOUI. –Novem Linguae (talk) 03:14, 7 June 2022 (UTC)
- Please use OOUI! 🐶 EpicPupper (he/him | talk) 03:16, 7 June 2022 (UTC)
- What do you like about OOUI? –Novem Linguae (talk) 03:20, 7 June 2022 (UTC)
- Same interface as regular MediaWiki, more modern, buttons bigger/easier to read. 🐶 EpicPupper (he/him | talk) 03:31, 7 June 2022 (UTC)
- What do you like about OOUI? –Novem Linguae (talk) 03:20, 7 June 2022 (UTC)
- Please use OOUI! 🐶 EpicPupper (he/him | talk) 03:16, 7 June 2022 (UTC)
- Good news. My real life job is calming down, I will probably be able to work on the user script this week. This one will be a bit challenging because I will need to figure out how to do a user interface, but I should be able to crack it. I will probably use Morebits or OOUI. –Novem Linguae (talk) 03:14, 7 June 2022 (UTC)
Lee Vilenski. Alright, the GANReviewTool user script is mostly done. For passes and fails, it adds {{atop}} and it removes {{GA nominee}}. For passes, it also adds {{GA}} or adds an entry to the {{Article history}}. For fails, it also adds {{FailedGA}}. I haven't coded adding the GA to WP:GA yet, I may work on that tomorrow. The user script is ready for testing, by you, by third parties, and by feeding me GANs to close. Please report all bugs and feature requests. This one could get popular, so would be good to test it thoroughly and iterate on any issues we find. Let me know your thoughts. –Novem Linguae (talk) 08:36, 8 June 2022 (UTC)
Translation script
Hello! I sometimes use Wikipedia to help myself learn new languages. To do that, many times I have to look up in Google certain words from certain sentences to be able to grasp the context. Can we create a script that makes it possible to select a certain word and get the translation for it in a chosen language? For example, in the Latin Wikipedia, in the sentence Novum Eboracum est urbs. (New York is a city.) I can select "urbs" and get shown a tooltip reading "city". Maybe the language of the source gets deducted automatically by the project's name code and the translated language can be set up as a preference by the user somewhere. (Or we can just make it work with English if that's too hard, that would be good enough.) - Klein Muçi (talk) 03:28, 15 April 2022 (UTC)
- There are plenty of browser extensions that allow that on any website, see [1][2]. Nardog (talk) 03:42, 15 April 2022 (UTC)
- Hah, somehow it had never crossed my mind it could be that easy. Precisely what I was looking for, thank you! - Klein Muçi (talk) 09:21, 15 April 2022 (UTC)
- There's also Endo999's GoogleTrans, which can also be enable as a gadget from your preferences page. — Guarapiranga ☎ 06:05, 15 May 2022 (UTC)
- @Guarapiranga, superb script (and superb support from Endo for more than a decade apparently). I'm sticking to the extension for the moment because it can extend further than Wikipedia but if I hadn't been told about it, I would have gone with this script. Thank you! - Klein Muçi (talk) 11:04, 15 May 2022 (UTC)
Image source code viewer
When we go to a file page > click on the image > the image path opens on the browser > we prepend view-source:
to the URL > the source code of the image appears. It is particularly useful when I'm trying to see the code of a svg. It would be helpful if there were a button on every file page, that does all the above steps and takes us directly to that file's source code page. Thanks! —CX Zoom[he/him] (let's talk • C • L) 14:44, 19 April 2022 (UTC)
go to a file page > click on the image > the image path opens on the browser >
right-click > View page source doesn't work for you? Here are a bunch of svg files to try it on.- —Trappist the monk (talk) 15:01, 19 April 2022 (UTC)
- Actually I typically use mobile devices to edit. So I don't have the right click feature. —CX Zoom[he/him] (let's talk • C • L) 17:49, 19 April 2022 (UTC)
@CX Zoom: Here's the code; feel free to copy and paste to wherever you prefer (CC0 if that matters):
$(function() {
$($('.fileInfo')[0]).after(
$('<span>').attr('id', 'viewsvgsource').html(
$('<a>').attr('href', 'view-source:' +
$($('#file a')[0]).attr('href')
).text('view SVG source')
).prepend(' (').append(')')[0]
);
});
NguoiDungKhongDinhDanh 00:34, 20 April 2022 (UTC)
- I tried but it didn't work as expected. Maybe I made some mistake in the script? —CX Zoom[he/him] (let's talk • C • L) 17:35, 20 April 2022 (UTC)
@CX Zoom: I have just learned that view-source:
link cannot be linked using HTML or even location.assign
. I guess we can't do anything then. NguoiDungKhongDinhDanh 19:21, 20 April 2022 (UTC)
- @CX Zoom I've created a script User:BrandonXLF/SVGEditor that allows you to view and edit the source code of an SVG file. Hope it helps! – BrandonXLF (talk) 19:27, 20 April 2022 (UTC)
- Brilliant one. IIRC I have seen something similar. NguoiDungKhongDinhDanh 19:40, 20 April 2022 (UTC)
- Thanks, this is an amazing tool. —CX Zoom[he/him] (let's talk • C • L) 20:39, 20 April 2022 (UTC)
- @BrandonXLF: It works great on en-wiki. Can you also enable it on Commons? Thanks! —CX Zoom[he/him] (let's talk • C • L) 21:03, 20 April 2022 (UTC)
- It should work on the Commons. Just make sure to include the code
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:BrandonXLF/SVGEditor.js&action=raw&ctype=text/javascript');
in your common.js file on the Commons (or a skin specific file) or your global.js to enable it for all projects. – BrandonXLF (talk) 21:25, 20 April 2022 (UTC)
- It should work on the Commons. Just make sure to include the code
- @BrandonXLF: It works great on en-wiki. Can you also enable it on Commons? Thanks! —CX Zoom[he/him] (let's talk • C • L) 21:03, 20 April 2022 (UTC)
Highlight comments on hover
Would it be possible to have a user scripts that allows comments on discussions (think talk pages) to be highlighted once you hover over them with your mouse? That way you can see where a certain comment starts and ends. - Klein Muçi (talk) 00:39, 21 April 2022 (UTC)
- @Klein Muçi: CD does that, but with all comments. NguoiDungKhongDinhDanh 00:53, 21 April 2022 (UTC)
- @NguoiDungKhongDinhDanh, what do you mean with "all comments"?
- CD is good it's just that I am too fond of the reply tool and all I wouldn't want to deactivate it. :/ - Klein Muçi (talk) 01:20, 21 April 2022 (UTC)
- @Klein Muçi: Then try adding this to your .css. NguoiDungKhongDinhDanh 01:36, 21 April 2022 (UTC)
- @NguoiDungKhongDinhDanh, just tried it. Now I understand what you meant with "all comments". It's highlighting them all the time. XD This is a bit confusing for me. I wanted the highlight to happen only when hovering over them. Also it doesn't work on discussion pages that aren't in the talk namespace, like the village pump, etc. = Klein Muçi (talk) 09:24, 21 April 2022 (UTC)
- You could try modifying the css using the
:hover
tag. I tried doing that, but it didn't exactly work. — PerfectSoundWhatever (t; c) 15:16, 30 April 2022 (UTC)
- You could try modifying the css using the
- @NguoiDungKhongDinhDanh, just tried it. Now I understand what you meant with "all comments". It's highlighting them all the time. XD This is a bit confusing for me. I wanted the highlight to happen only when hovering over them. Also it doesn't work on discussion pages that aren't in the talk namespace, like the village pump, etc. = Klein Muçi (talk) 09:24, 21 April 2022 (UTC)
- @Klein Muçi: Then try adding this to your .css. NguoiDungKhongDinhDanh 01:36, 21 April 2022 (UTC)
- That'd be a nice feature (and sounds totally feasible with
:hover
). — Guarapiranga ☎ 05:37, 15 May 2022 (UTC)- Here's a start... Add this to your stylesheet, Klein Muçi:— Guarapiranga ☎ 05:20, 23 May 2022 (UTC)
dl:hover {background:#fff6d5} dd:hover {background:#c8fb7b}
- @Guarapiranga, thank you! That does seem to give the needed effect. I believe there are only 2 things lacking:
- When the general discussion highlight happens the post that actually started the discussion doesn't. It should.
- If the discussion has grown long enough to have outdenting the "script" will break. It doesn't understand outdenting and will treat the outdented part as a new discussion. It shouldn't.
- I'd say it wouldn't understand subsections either (=== Text ===) but I don't know if there is hope to ever understand them because how would it be able to differentiate a discussion from an article then? However I believe something can be done about the 2 points above? - Klein Muçi (talk) 06:26, 23 May 2022 (UTC)
- It also activates in Special:RecentChanges, the table on the right where it shouldn't. I suppose there may be other false positives like this. - Klein Muçi (talk) 12:40, 23 May 2022 (UTC)
- How about that:
p:hover, dl:hover, dd:hover {background:#d7eef4}
- Yeah, that was just a proof of concept. To have a more complete solution, I'm afraid css will not suffice; you'll really need a js script (also to make sure it's only enabled in talk pages). That's bc talk pages are not perfectly structured. Their current structure is like:
<h2>title</h2> <p>OP</p> <dl> <dd>comment</dd> <dd>comment</dd> <dl> <dd>comment</dd> <dd>comment</dd> <dd>comment</dd> </dl> </dl>
- — Guarapiranga ☎ 23:40, 23 May 2022 (UTC)
- @Guarapiranga, this feels like a regress because it only highlights single, individual comments but on the other side, it's not broken like the other option (beside the false positives on the other pages). I'm grateful for your help anyway because anything is better than nothing. Just trying to provide direct comments in hope that they may help someone improve it in the future. - Klein Muçi (talk) 04:13, 24 May 2022 (UTC)
- No worries, Klein Muçi.
- this feels like a regress because it only highlights single, individual comments
So what you're after is for the whole topic, not single comments, to be highlighted upon hovering? Isn't the topic beginning and end clearly marked by their titles (inh2
format)? — Guarapiranga ☎ 04:50, 24 May 2022 (UTC)- @Guarapiranga, originally I was after individual comment highlighting. But after what you gave me, I enjoyed the idea of having a double highlighting feature. One for the full topic (post + comments) and, on top of that, one for individual comments. - Klein Muçi (talk) 05:00, 24 May 2022 (UTC)
- This is the closest I could get to that was:It'll highlight the OP cyan when hovering over it, and yellow the comments below, and it'll highlight cyan a comment when hover it as well as the comments replying to it. Sometimes it breaks when a comment includes multiple lines, and it definitely can't distinguish talk pages from others (but that it highlights paragraphs you're hovering over in article pages is a feature, not a defect 😅). At some point, css did include a
p:hover + dl, dl:hover {background:lightyellow} p:hover, p:hover + p, dd:hover {background:lightcyan}
@document
selector to match an url or part thereof, but it has since been retired and deprecated. Beyond this, js is definitely required. — Guarapiranga ☎ 00:19, 25 May 2022 (UTC)- @Guarapiranga, haha I must say this kinda feels a bit intrusive though, firing up everywhere. I still prefer the first version you provided. But thank you again for all the versions you brought up! :) - Klein Muçi (talk) 00:59, 25 May 2022 (UTC)
- This is the closest I could get to that was:
- @Guarapiranga, originally I was after individual comment highlighting. But after what you gave me, I enjoyed the idea of having a double highlighting feature. One for the full topic (post + comments) and, on top of that, one for individual comments. - Klein Muçi (talk) 05:00, 24 May 2022 (UTC)
- @Guarapiranga, this feels like a regress because it only highlights single, individual comments but on the other side, it's not broken like the other option (beside the false positives on the other pages). I'm grateful for your help anyway because anything is better than nothing. Just trying to provide direct comments in hope that they may help someone improve it in the future. - Klein Muçi (talk) 04:13, 24 May 2022 (UTC)
- How about that:
- It also activates in Special:RecentChanges, the table on the right where it shouldn't. I suppose there may be other false positives like this. - Klein Muçi (talk) 12:40, 23 May 2022 (UTC)
- @Guarapiranga, thank you! That does seem to give the needed effect. I believe there are only 2 things lacking:
- Here's a start... Add this to your stylesheet, Klein Muçi:
User talk page warning to flag up likely THEYCANTHEARYOU problem
(I asked at VPT and was signposted here, so am just copypasting my original query:)
While waiting (!) for the mobile user notification problem (WP:THEYCANTHEARYOU) to be one day maybe (!!) fixed, would it be a) possible and b) good idea to implement in the meantime a warning which automatically appears on the top of the user talk page of a user who is likely to be not getting notifications (ie. edits only or or mostly on an affected mobile device, and does not edit their talk page)?
I realise this would do nothing to help such users receive the said notifications, but it would at least make it easier for the rest of us to identify this as a possible explanation for their lack of response to warnings etc., helping to AGF and not raise blood pressures unduly. I've seen many user talk pages where the attempts at communicating with the user get increasingly desperate, until someone points out this as the likely reason. I just thought maybe that could be done automatically by way of some clever code.
Thanks, -- DoubleGrazing (talk) 11:58, 2 May 2022 (UTC)
- PS: By "automatically" I meant some sort of user-side script which I could opt in and put in my common.js or somewhere. When I then visit a user talk page, the script checks the user's edit history and displays (to me) a warning, flagging up things like 'user has never edited their user talk page' or 'user edits using iOS devices only', or whatever the relevant criteria are. -- DoubleGrazing (talk) 11:59, 2 May 2022 (UTC)
- @DoubleGrazing: I have a script that might do part of what you are looking for: User:Rummskartoffel/talk page usage.js, which displays the time since a user's last edits in certain talk namespaces, along with links to those edits and links to their contributions for the namespaces in question. It doesn't do the other things you're looking for, though. Rummskartoffel 17:55, 8 May 2022 (UTC)
- Thanks @Rummskartoffel, will keep that in mind. Best, -- DoubleGrazing (talk) 06:08, 9 May 2022 (UTC)
Date Format Converter
I would like to suggest a Javascript extension that changes date formats from 1977-01 to January 1977. I am editing articles on Arc Routing and Mixed Chinese postman problem and the book uses the date format yyyy-mm and I would like to automate the process of correctly formatting the dates to month name long yyyy. ScientistBuilder (talk) 19:37, 10 May 2022 (UTC)
- I suggest using
{{subst:#time:F Y|1977-01}}
, which converts to "January 1977" when you save. Nardog (talk) 21:58, 10 May 2022 (UTC)
User script to Grab Youtube, Facebook, and Twitter links from a Wiki Page
Simple. Just grab and take the URls/links from a Wikipedia page with websites from Youtube, Facebook, and Twitter. Any additional sites can be good but these three should be primary. I am thinking of storing and saving them a copy before being deleted or anything bad can happen. Can anyone create an automated userscript for this? Thank you --Likhasik (talk) 16:53, 12 May 2022 (UTC)
- Doing...... Shouldn't take long. Chlod (say hi!) 16:56, 12 May 2022 (UTC)
- Hi lods. Thank you for this. Well, I would say that I am an archivist and I would like to request an automation for sending links to archive.today and ghostarchive.org - both of which save webpages. Probably an extension after grabbing the URLs, then sending them to the archival sites, if possible. Thank you for the initiative. Let me know and please do ping me with "@" --Likhasik (talk) 17:06, 12 May 2022 (UTC)
- @Likhasik: Userscipt can be found at User:Chlod/Scripts/LinkGrab.js. By default, this adds a button to the "More" menu (at the page header) that will copy links to YouTube, Facebook, and Twitter to your clipboard. To change the websites that are copied, place the following before the
importScript
ormw.loader.load
line in for the script in your common.js file. window.lgLinksToFind = [ // Default "youtube.com", "youtu.be", "facebook.com", "twitter.com", // Example: Also copy links to the Washington Post "washingtonpost.com" ]; importScript("User:Chlod/Scripts/LinkGrab.js");
- Let me know if you want anything changed or need anything else. I'll definitely expand this in the future to give it a better interface for choosing websites to get than having to edit the JS file. As for the extension that automatically archives the links: it's beyond the scope for this board (and probably needs more than a userscript, as I don't think either website would allow cross-origin resource sharing with Wikipedia). We do, however, have User:InternetArchiveBot (interface) that can automatically archive outlinks to the Internet Archive (as long as the option was set). Chlod (say hi!) 17:46, 12 May 2022 (UTC)
- @Chlod Can you also please add a "false positive" feedback box (I'm not sure with the name) whenever I click Grab links? Like for example, an article without any of those URLs/Websites. If I click "Grablink", it should give me feedback that there are no links corresponding to it (No YT/FB/Twitter links). Hence not wasting my time confirming if I have the links grabbed.
- Whenever I click grab links, the feedback box shows "Links copied to clipboard" but there are no links copied instead. I just wanted to save time instead of CTRL+V-ing every time to see if there is something copied.
- Also, can you also create a userscript that whenever I click "random article", it will lead me to my preferred topics? I am tired seeing sports articles whenever I click random article which I do not want to edit. Thank you.
- --Likhasik (talk) 03:31, 13 May 2022 (UTC)
- @Likhasik: For the former, Done. For the latter, you may wish to use Special:RandomInCategory and bookmark that instead. Chlod (say hi!) 04:29, 13 May 2022 (UTC)
- Please also add the total numbers of link copied. Better if by Links/URLs themselves with the overall count, of course. (Example: 5 YT links copied; 0 FB links; 2 Twitter etc.) Only for the feedback box
- Also, is there a possibility that I can edit this userscript by myself with my own preferences and Links? Sorry I am new in using a Userscript. Thanks! --Likhasik (talk) 04:42, 13 May 2022 (UTC)
- @Likhasik: Feel free to copy over the userscript to your own userspace (subject to WP:CWW, of course). After that, just change the relevant lines in your
common.js
to use your own version. Chlod (say hi!) 04:45, 13 May 2022 (UTC)- Okay then. Also, please do add the aforementioned request. The number of copied links per site. Thank you --Likhasik (talk) 05:16, 13 May 2022 (UTC)
- @Likhasik: Done. Chlod (say hi!) 05:28, 13 May 2022 (UTC)
- @Chlod Hello and good day. I think the script is broken. It copies links that are not any of those three. It just takes any URLs in the page, including files and images within wikipedia. Please fix. The feedback box is not even cooperating and I'd say still faulty. --Likhasik (talk) 03:20, 15 May 2022 (UTC)
- @Likhasik: Done. Chlod (say hi!) 05:28, 13 May 2022 (UTC)
- Okay then. Also, please do add the aforementioned request. The number of copied links per site. Thank you --Likhasik (talk) 05:16, 13 May 2022 (UTC)
- @Likhasik: Feel free to copy over the userscript to your own userspace (subject to WP:CWW, of course). After that, just change the relevant lines in your
- @Likhasik: For the former, Done. For the latter, you may wish to use Special:RandomInCategory and bookmark that instead. Chlod (say hi!) 04:29, 13 May 2022 (UTC)
- @Likhasik: Userscipt can be found at User:Chlod/Scripts/LinkGrab.js. By default, this adds a button to the "More" menu (at the page header) that will copy links to YouTube, Facebook, and Twitter to your clipboard. To change the websites that are copied, place the following before the
- Hi lods. Thank you for this. Well, I would say that I am an archivist and I would like to request an automation for sending links to archive.today and ghostarchive.org - both of which save webpages. Probably an extension after grabbing the URLs, then sending them to the archival sites, if possible. Thank you for the initiative. Let me know and please do ping me with "@" --Likhasik (talk) 17:06, 12 May 2022 (UTC)
Script that makes autowatchlisting pages temporary
Simple version: Make it so that each page that gets watchlisted, except those created by me, get watchlisted only temporary. Time can be adjustable.
Advanced version: Make it so we have full customization on what exceptions can be and make the time adjustable per category. Allow for adjustable time for specific entries if so needed. - Klein Muçi (talk) 12:09, 15 May 2022 (UTC)
- User:Rummskartoffel/auto-watchlist-expiry should fit your "simple version" criteria, except that you will have to manually select "permanent" using the dropdown when creating pages. Rummskartoffel 21:30, 16 May 2022 (UTC)
- @Rummskartoffel, thank you! I think I've applied your instructions correctly for use outside of EnWiki (was thinking of trying it on my homewiki and if it worked nicely maybe I could use it as a global script on Meta) but it still isn't working. Can you take a look here and see if I'm doing anything wrong?
- And just so other people are clear, what I mean in the advanced version is basically this script + exceptions with customizable times like "make everything temporary for 1 month except pages I delete which need to be watched permanently and pages I create which need to be temporary for 2 weeks". - Klein Muçi (talk) 23:15, 16 May 2022 (UTC)
- @Klein Muçi: You didn't do anything wrong, I forgot to mention the script didn't work with the 2017 source editor, which seems to be the one you're using. But try it again now – adding support for that had been a to-do of mine anyway, and it was surprisingly easy. Rummskartoffel 18:25, 17 May 2022 (UTC)
- @Rummskartoffel, yes, it does work now. Thank you! Is there any possibility you might also take into consideration the exception cases? No problem if not, what you currently gave me was what I've been looking for a long time. - Klein Muçi (talk) 15:51, 18 May 2022 (UTC)
- @Klein Muçi: I don't want to make any promises, but I might give it a shot a few days from now. If I do implement it, I'll be sure to drop you a note. Rummskartoffel 17:06, 18 May 2022 (UTC)
- @Rummskartoffel, thank you, I'd be grateful. :) - Klein Muçi (talk) 21:46, 18 May 2022 (UTC)
- @Klein Muçi: I don't want to make any promises, but I might give it a shot a few days from now. If I do implement it, I'll be sure to drop you a note. Rummskartoffel 17:06, 18 May 2022 (UTC)
- @Rummskartoffel, yes, it does work now. Thank you! Is there any possibility you might also take into consideration the exception cases? No problem if not, what you currently gave me was what I've been looking for a long time. - Klein Muçi (talk) 15:51, 18 May 2022 (UTC)
- @Klein Muçi: You didn't do anything wrong, I forgot to mention the script didn't work with the 2017 source editor, which seems to be the one you're using. But try it again now – adding support for that had been a to-do of mine anyway, and it was surprisingly easy. Rummskartoffel 18:25, 17 May 2022 (UTC)
User Script that searches by URL and text; See example below
For example I want to search for a specific URL: web.mit.edu
As you may know, Wikipedia search engine only searches via text. So in a wiki article, it should contain explicitly the text "web.mit.edu". Hence, the search engine would not show "this" even though it contains the URL.
The user script that I request does search for the URL even it is hyperlinked. Can anyone create one? --Likhasik (talk) 08:29, 18 May 2022 (UTC)
- @Likhasik: An user script is not needed. Simply use Special:LinkSearch, Special:WhatLinksHere or the insource: syntax of CirrusSearch. NguoiDungKhongDinhDanh 08:31, 18 May 2022 (UTC)
- @NguoiDungKhongDinhDanh Does not work. Better if User Script so that I can just search away in the normal Wiki search engine without even opening those links in a new tab. --Likhasik (talk) 08:39, 18 May 2022 (UTC)
- @Likhasik: Did you add "Wikipedia" to the list of namespaces when searching? NguoiDungKhongDinhDanh 08:42, 18 May 2022 (UTC)
- @NguoiDungKhongDinhDanh Does not work. Better if User Script so that I can just search away in the normal Wiki search engine without even opening those links in a new tab. --Likhasik (talk) 08:39, 18 May 2022 (UTC)
Tab Resizing Script?
Hello I edit on a mobile phone and since the mobile skin doesn't have all the features of the vector skin I switched to the vector skin. However the tab and the other stuff on the top of the page are too small for me to press with my big fingers. So I want a user script that allows me to resize the top of the page (tabs, search, preferences, notifications etc). THE Pizzaplayer!TALK TO MEE!! contribs 20:20, 22 May 2022 (UTC)
- Js' 6tabs-vector.js makes'em narrower by changing their text to icons. Perhaps all you need to do is to change the text to be wider. — Guarapiranga ☎ 07:30, 1 June 2022 (UTC)
A script that highlights and helps link unlinked people (and organisations?) in articles
... somewhat similar to those that highlight dab links and help resolve them.
Unfortunately WP:REDLINK policies create a dis-incentive for editors to wikilink people whose notability is uncertain, or that may or may not become notable in the future. The result I see is tons of people who were deemed notable enough to have articles in their name, but that remain (sort of) anonymous in other articles, probably bc they were written before their notability was established. It'd be great if a script could highlight such people (perhaps by simply regexing for proper names, e.g. ([A-Z][a-z\-]+ [A-Z][a-z\-\.]+
, and checking whether their articles exist. The script could then provide the hover snippet of the article with a confirm button to introduce the link. If the linked page is a dab, then if it could help choose the dab link from a dropdown menu, that'd be a bonus.
Is there anything already out there that doesn something like that? Otherwise, I can't imagine it'd be too hard to put it together (I can probably do it, given enough time, sweat and tears). — Guarapiranga ☎ 06:00, 23 May 2022 (UTC)
- How would a script recognize that in "James Wood is a 65-foot tall carpenter", "James Wood" is a person that could potentially be linked, and "tall carpenter" isn't a person that could potentially be linked? Headbomb {t · c · p · b} 06:04, 23 May 2022 (UTC)
- For reference, your regex would highlight the following (in purple). That doesn't seem very useful. Headbomb {t · c · p · b} 06:15, 23 May 2022 (UTC)
- Looks like you figured out how that regex can distinguish James Wood from tall carpenter, Headbomb. But, yeah, it's e.g.; sure it can be improved (to include longer and hyphenated proper names, for instance). I wouldn't have the script simply link all such capitalised groups of words--let alone highlight'em in purple! 😄--but rather underline them (say, in blue), perhaps highlight them in light blue when hovered over, and open a drop down menu with options to either link or ignore them (perhaps a more complete menu would include: link this, link all, ignore this, ignore all, and the alternatives to link to in case of dab). — Guarapiranga ☎ 22:40, 23 May 2022 (UTC)
- For reference, your regex would highlight the following (in purple). That doesn't seem very useful. Headbomb {t · c · p · b} 06:15, 23 May 2022 (UTC)
Script that adds the possibility to give template-replies with 1 button
How I am picturing it: A button appears beside the [[Reply]] link which when pressed opens up a list to choose from with templates such as {{Done}}, {{Read}}, {{Partly done}}, and many more. - Klein Muçi (talk) 12:57, 23 May 2022 (UTC)
- I like it. What about if we kept the reply interface, but just like "@" brings up a list of users to ping, "{" brings up a list of templates like {{done}}? Or we could copy what Confluence does, which is "/" to bring up a list of templates, but I imagine the curly brace would be a lot more familiar to experienced editors. Enterprisey (talk!) 17:00, 23 May 2022 (UTC)
- @Enterprisey, first of all, I think you would be interested in knowing this exists. Maybe you want to have this conversation elsewhere.
- As for your proposal, it is much more elegant than what I had in mind so I like it more but I wouldn't go for the curly brace as that seems too general and I already use that for setting up templates in discussions which I don't think would be part of that preformatted template list we're talking about (for example {{tl}}). I'd feel the same for any kind of brackets for the same reason. From what you proposed, I'd be more inclined towards the slash. - Klein Muçi (talk) 17:18, 23 May 2022 (UTC)
- One of my user scripts changes the ugly [[Reply]] link to a nice friendly icon. Others have done similar things, so perhaps we could push for something like that to become standard. It would then be "tidy" to have a second icon which pops a (user configurable) list of standard replies. Since this second icon would probably be a minority thing, it should probably be kept as a user script and the other changes to the reply/edit gadgets kept as a change request over in MediaWiki or Phab — GhostInTheMachine talk to me 19:47, 23 May 2022 (UTC)
- @GhostInTheMachine, I believe there are already plans to change the text link to an icon. Plans that, although I like buttons instead of links, I wasn't particularly fond of. Having said all that, the "icon vs text" matter looks like it is a bit off topic here, although I do understand the "bigger picture approach", especially given that I've started that aforementioned discussion at MediaWiki. The list of premade standard answers looks like a nice idea (mentors already have such a feature if I'm not wrong) but it is not exactly what I had in mind. I was talking specifically about having all this list + more similar templates incorporated in a dropdown or a popup kind of menu, facilitating things such as informing that I'll respond later, marking things as resolved, agreeing to aforementioned opinions, etc. My idea would be a subset of your idea which also allows for premade free-text presets. All in all, it looks like your idea would help with semi-autoanswering some FAQ, while I'm hoping for a JS helper "similar" to WikiLove to be able to utilize those said templates swiftly. - Klein Muçi (talk) 20:37, 23 May 2022 (UTC)
Disambiguation gadget from plwiki
The plwiki has a disambiguating gadget to help clean up ambiguous links on a page. The original script is Matma Rex's disFixer on enwiki. The interface works fine, but it doesn't seem to apply the requested changes once the edit window is loaded (at least on my setup). Has anyone been able to make it work, or have an alternate? Cheers. — Guarapiranga ☎ 05:01, 25 May 2022 (UTC)
- @Guarapiranga Hi :) I haven't maintained the enwiki version, because I thought that other tools for fixing disambiguation links are popular here – for example Navigation popups does it, and tons of people have that enabled. I haven't looked at it since 2014, it may have been broken by some MediaWiki changes in the meantime. If you'd find it useful, I'll have a look at it tomorrow. There are some differences from the plwiki version, since that one depends on some other gadgets available there. Matma Rex talk 00:03, 26 May 2022 (UTC)
- Aha! I hadn't noticed navpopup had that option. Thanks, Matma Rex. I guess that's also half the solution to an earlier question I had posted here. Cheers. — Guarapiranga ☎ 02:14, 27 May 2022 (UTC)
- Hum... Navpopup's dab option is not working for me either (and showing very similar behaviour to your script, Matma Rex--it opens the edit window with the
autoedit
regex in the url, but no changes are made in the content--which suggests to me in both cases it may be a conflict with my config (preferences, gadgets and scripts)). — Guarapiranga ☎ 02:42, 27 May 2022 (UTC)- @Guarapiranga Oh, this might actually be a simpler problem than I thought. Do you have syntax highlighting enabled? This change should fix it: [3]. Someone could probably make a similar fix to Popups. (Also, I'd like to note that this gadget is 10+ years old and not my finest work. I'll be happy if you find it useful, but it might be a disappointment, and I'm not really interested in reworking it.) Matma Rex talk 23:19, 27 May 2022 (UTC)
- Thanks for that, Matma Rex. Neither of those solutions fixed it, though. It's now pretty clear to me this is unrelated to your script, navpopup, or my setup (as simply loading the autoedit url does nothing to the edit window whether I'm logged in or out). , for instance. — Guarapiranga ☎ 04:07, 28 May 2022 (UTC)
- @Guarapiranga Oh, this might actually be a simpler problem than I thought. Do you have syntax highlighting enabled? This change should fix it: [3]. Someone could probably make a similar fix to Popups. (Also, I'd like to note that this gadget is 10+ years old and not my finest work. I'll be happy if you find it useful, but it might be a disappointment, and I'm not really interested in reworking it.) Matma Rex talk 23:19, 27 May 2022 (UTC)
- Hum... Navpopup's dab option is not working for me either (and showing very similar behaviour to your script, Matma Rex--it opens the edit window with the
- Aha! I hadn't noticed navpopup had that option. Thanks, Matma Rex. I guess that's also half the solution to an earlier question I had posted here. Cheers. — Guarapiranga ☎ 02:14, 27 May 2022 (UTC)
Userscript to periodically reload web.archive.org whenever I am archiving
Hello and I ask you folks if maybe you can help me out. Pardon me if this request is an external one, outside of Wikipedia itself.
So I have this Userscript executor called Tampermonkey which is a chrome extension and unfortunately I cannot code it myself.
Whenever I archive or send links to save in web.archive.org, I get this message "Sorry Job failed" or "Sorry You have already reached the limit of active sessions. Please wait for a few minutes and then try again." I usually archive links manually here in Wikipedia because the InternetArchiveBot is sometimes inefficient when it comes to a lot of requests, as well as personal sites that I visit in the web in general. After several reloads, it accepts the request and successfully archive. I would like just to request if you know or can create a code which automatically reloads the web.archive.org website whenever I am saving to save time instead of revisiting each and reloading it one-by-one. Not automatically but rather within a certain period or with a cooldown for a few seconds a bit.
Thank you and have a great day! --Likhasik (talk) 05:22, 28 May 2022 (UTC)
- @Likhasik: this Tampermonkey script will reload any page under web.archive.org/* after a set amount of time:
- >>> Ingenuity.talk(); 19:59, 28 May 2022 (UTC)
// ==UserScript== // @name Reload web.archive.org // @namespace http://tampermonkey.net/ // @version 0.1 // @description reload web.archive.org // @author You // @match https://web.archive.org/* // @icon https://www.google.com/s2/favicons?domain=tampermonkey.net // @grant none // ==/UserScript== const reloadTime = 15000; // you can change this value to vary how long it will take to reload -- this is 15 seconds window.setTimeout(() => location.reload(), reloadTime);
Point 1st tab to ROOTPAGENAME
I'm always a little confused as to why the 1st tab--Article in mainspace, Template, Project page, etc--while in a talk or subpage point to {{SUBJECTPAGENAME}}, not to {{ROOTPAGENAME}}. Scripting that change should be easy enough; has anyone done it already, or should I endeavour to? Or would anyone like to take a stab at it? — Guarapiranga ☎ 02:39, 31 May 2022 (UTC)
Scripts Panel
I endeavoured to improve upon MusikAnimal's scriptManager with a scripts panel by, rather than having users explicitly declare each script to be 'managed' in their common.js, simply read from their common.js which scripts they disabled. The idea is to complement scriptInstaller in a way that all installed scripts, both enabled and disabled, are everywhere accessible on the left panel (just where MusikAnimal put it), and be able, from any page, to enable, permanently or temporarily, disable and even uninstall any installed script. But, as a js rookie, I hit a wall getting mw js to read common.js as text file. Would anyone here like to have a look and point me in the right direction (please feel free to edit the code there directly too). Cheers. — Guarapiranga ☎ 23:42, 1 June 2022 (UTC)
Hide username
Hello. I would like to be pointed to a userscript that hides my username, which is conspicuously placed in the top right area of the page on the Vector skin. I surprisingly can't find anything except an old Greasemonkey script that doesn't seem to work. Thanks DemonDays64 (talk•contribs) 23:45, 1 June 2022 (UTC) (please ping on reply)
- @DemonDays64: You can do that with CSS:
#pt-userpage { display: none; }
- ...or with JS:
$('#pt-userpage').remove();
- You probably know what to do with these. NguoiDungKhongDinhDanh 23:51, 1 June 2022 (UTC)
- @NguoiDungKhongDinhDanh: hmm i was thinking more like replacing the text with "User" so someone glancing wouldn't see it. I guess replacing inner HTML of that element with JS would work? DemonDays64 (talk•contribs) 10:43, 9 June 2022 (UTC) (please ping on reply)
- @DemonDays64: If you just want to replace the text, use
$('#pt-userpage span').text('User');
. If you also want to and remove the link, use$('#pt-userpage').text('User');
. NguoiDungKhongDinhDanh 12:39, 9 June 2022 (UTC)- @NguoiDungKhongDinhDanh: awesome, works great thanks DemonDays64 (talk•contribs) 06:40, 10 June 2022 (UTC)
- You can do Nardog (talk) 14:30, 9 June 2022 (UTC)
#pt-userpage a::before { content: "User"; } #pt-userpage span { display: none; }
- @DemonDays64: If you just want to replace the text, use
- @NguoiDungKhongDinhDanh: hmm i was thinking more like replacing the text with "User" so someone glancing wouldn't see it. I guess replacing inner HTML of that element with JS would work? DemonDays64 (talk•contribs) 10:43, 9 June 2022 (UTC) (please ping on reply)
Forks search link
I see script forking has sprawled across WP (which is a good thing, and of which I too am guilty of contributing to). Nowadays, whenever installing a new script, finding a bug on a script I use, or longing for some new feature or improvement, I look for forks by simply searching scripts with the same name (don't change the script's name, if you want your fork to be found--and vice-versa!--I guess). I wonder whether we could help each other finding forks by indexing them, as we do with original scripts in WP:US/L and WP:USRANK. One (albeit small) step in that direction would be to simply add a forks link next to the scripts links, as scriptInstaller does with a link to install. I might do this at some point, but wanted to put it out there, in case anyone wishes to leap ahead of me. Cheers. — Guarapiranga ☎ 04:27, 2 June 2022 (UTC)
User logs
Is there a user script that we can use to find the csd log, xfd log, prod log, drafify log of any user, without going to their find their user subpages? For example, we arrive on a user page, and then we see links to the respective logs. Is such a user script available? Itcouldbepossible Talk 05:27, 2 June 2022 (UTC)
- What do you mean by
the csd log, xfd log, prod log, drafify log
? Do you have an example? Nardog (talk) 09:30, 2 June 2022 (UTC)- @Nardog They are logs generated by twinkle. Like this is my CSD log, this is my XFD or AFD log, this is my PROD and this is my draftify log. Could I make myself clear? Itcouldbepossible Talk 14:15, 2 June 2022 (UTC)
- This one would be pretty easy. 1) Do you just want them in the left sidebar under tools? 2) OK to display the link even if the page doesn't exist, or does it need to check if the page exists? I have another script that when visiting user pages adds links to the left menu under tools, called User:Novem Linguae/Scripts/Links.js, that I could use as a base. –Novem Linguae (talk) 06:46, 10 June 2022 (UTC)
- Hi Novem and thanks for replying. Can you customize scripts? You can make it in a way that checks if the pages exist or not. And in the scripts you can add links to the CSD, XFD, AFD, PROD log of any user (if they exist, not as red links), and also to the common.js,global.js and global auth of the user, which already exists in your script. Can you make it that way? I use many of your scripts also. Itcouldbepossible Talk 13:27, 10 June 2022 (UTC)
- @Itcouldbepossible. Hey there. I went ahead and added this feature to User:Novem Linguae/Scripts/Links.js. Feel free to install and try it out. –Novem Linguae (talk) 19:15, 10 June 2022 (UTC)
- @Novem Linguae Wow!!! Thanks a lot. It does work great. I saw the diffs of the edit you made, but did not understand a thing. What talent!! I am using the script now, only that the 'subpages' link is unnecessary, since it is already there in the more menu. What others scripts do you have? I want to try all out. I use your visual editor everywhere script. Thanks for all your hard work and spending time to re-code you script. Itcouldbepossible Talk 15:10, 11 June 2022 (UTC)
- @Itcouldbepossible. My pleasure. Thanks for the barnstar. I don't have a "subpages" link in my "More" menu so maybe that is being placed there by a user script you have installed. You can check out the rest of my user scripts at User:Novem Linguae/Templates/Scripts. Enjoy my friend. –Novem Linguae (talk) 15:57, 11 June 2022 (UTC)
- @Novem Linguae Sorry for not being clear. I was talking about MediaWiki:Gadget-MoreMenu.enwiki.js, which is also available on the Meta Wiki. I was talking about the subpages section under "Page" menu. It looks like this:
- Itcouldbepossible Talk 01:56, 13 June 2022 (UTC)
- @Itcouldbepossible. My pleasure. Thanks for the barnstar. I don't have a "subpages" link in my "More" menu so maybe that is being placed there by a user script you have installed. You can check out the rest of my user scripts at User:Novem Linguae/Templates/Scripts. Enjoy my friend. –Novem Linguae (talk) 15:57, 11 June 2022 (UTC)
- @Novem Linguae Wow!!! Thanks a lot. It does work great. I saw the diffs of the edit you made, but did not understand a thing. What talent!! I am using the script now, only that the 'subpages' link is unnecessary, since it is already there in the more menu. What others scripts do you have? I want to try all out. I use your visual editor everywhere script. Thanks for all your hard work and spending time to re-code you script. Itcouldbepossible Talk 15:10, 11 June 2022 (UTC)
- @Itcouldbepossible. Hey there. I went ahead and added this feature to User:Novem Linguae/Scripts/Links.js. Feel free to install and try it out. –Novem Linguae (talk) 19:15, 10 June 2022 (UTC)
- Hi Novem and thanks for replying. Can you customize scripts? You can make it in a way that checks if the pages exist or not. And in the scripts you can add links to the CSD, XFD, AFD, PROD log of any user (if they exist, not as red links), and also to the common.js,global.js and global auth of the user, which already exists in your script. Can you make it that way? I use many of your scripts also. Itcouldbepossible Talk 13:27, 10 June 2022 (UTC)
- This one would be pretty easy. 1) Do you just want them in the left sidebar under tools? 2) OK to display the link even if the page doesn't exist, or does it need to check if the page exists? I have another script that when visiting user pages adds links to the left menu under tools, called User:Novem Linguae/Scripts/Links.js, that I could use as a base. –Novem Linguae (talk) 06:46, 10 June 2022 (UTC)
- @Nardog They are logs generated by twinkle. Like this is my CSD log, this is my XFD or AFD log, this is my PROD and this is my draftify log. Could I make myself clear? Itcouldbepossible Talk 14:15, 2 June 2022 (UTC)
Access keys cheat sheet
It'd be cool to press alt-shift-? and see a access keys popup cheat sheet. Has anyone done that yet? I couldn't find it here, here or here. — Guarapiranga ☎ 11:31, 2 June 2022 (UTC)
- @Guarapiranga:
$('body').keydown(function(e) { if (!(e.altKey && e.shiftKey && e.key == '?')) return; if (!$('#akcs').length) { $('#bodyContent').after( $('<div>').attr('id', 'akcs').css('display', 'none').html( // Here goes your content (in HTML). ) ); } $('#bodyContent, #akcs').toggle(); });
- And that's basically it. NguoiDungKhongDinhDanh 15:20, 2 June 2022 (UTC)
- Thanks, NguoiDungKhongDinhDanh. Any wm-js tricks to transclude from WP itself instead of typing it out and maintaining it? Like...:
{{#section-h:WP:KBD|List of access keys}}
— Guarapiranga ☎ 06:04, 3 June 2022 (UTC) - NguoiDungKhongDinhDanh, did you mean:
$('<div>').attr('id', 'akcs').css('display', 'none').html(' // Here goes your content (in HTML). ')
Isn't that what you suggested? I'm getting a missing ) after argument error msg. — Guarapiranga ☎ 06:48, 3 June 2022 (UTC)- @Guarapiranga: If you want to transclude the table, you will have to query it from MediaWiki. That is unnecessary. Also, you need to escape single quotes inside the table, or change the outermost ones to backticks (
`
). NguoiDungKhongDinhDanh 07:36, 3 June 2022 (UTC)- Yes! Sorted.
Working now. Thanks, Nguoi. — Guarapiranga ☎ 07:44, 3 June 2022 (UTC)
- Yes! Sorted.
- @Guarapiranga: If you want to transclude the table, you will have to query it from MediaWiki. That is unnecessary. Also, you need to escape single quotes inside the table, or change the outermost ones to backticks (
- Thanks, NguoiDungKhongDinhDanh. Any wm-js tricks to transclude from WP itself instead of typing it out and maintaining it? Like...:
- What I would do: Nardog (talk) 14:51, 3 June 2022 (UTC)
$(() => { let dialog; $('<a>').attr('accesskey', '?').text('This thing').hide().click(() => { if (dialog) { dialog.open({ actions: [] }); return false; } mw.loader.using('oojs-ui-windows', () => { let winMan = new OO.ui.WindowManager(); winMan.$element.appendTo(document.body); dialog = new OO.ui.MessageDialog(); winMan.addWindows([dialog]); $('<table>').addClass('wikitable').css('width', '100%').append( $('[accesskey]').map(function () { return $('<tr>').append( $('<th>').text(this.accessKey.toUpperCase()), $('<td>').text( this.getAttribute('aria-label') || this.textContent || this.value || $(`label[for="${this.id}"]`).text() ) ); }).get() ).appendTo(dialog.text.$element); dialog.open({ actions: [] }); }); return false; }).appendTo(document.body); });
- @Nardog: Nice approach. How do you turn
This thing
off with the same keys? NguoiDungKhongDinhDanh 15:14, 3 June 2022 (UTC)- Huh, I thought Esc was enough. Nardog (talk) 15:19, 3 June 2022 (UTC)
if (dialog.isOpened()) { dialog.close(); } else { dialog.open({ actions: [] }); }
- That didn't work, Nardog (and I didn't tinker with it to find out why, tbh). Your version is a great improvement, though, as it made the cheat sheet context sensitive to current page and current user (by only listing assigned access keys). I tried using the tooltip instead of the element label, though, as it is usually more detailed, with the element name often being replaced with an icon on the screen (as is the case of Js/6tabs-vector users, such as myself), but to no avail. Oddly enough, tooltip yielded the same texts as aria-label--what gives?! — Guarapiranga ☎ 04:39, 4 June 2022 (UTC)
- You replaced lines 4–7 and not 26. A tooltip is
this.title
. I didn't use it because it's often too oblique. If you remove aria-label you get the entire content of the textarea when using it on the edit form btw. Nardog (talk) 06:43, 4 June 2022 (UTC)- You replaced lines 4–7 and not 26.
Right! Sorry. But... still to no avail. What am I still doing wrong? (Esc still working though.) - If you remove aria-label you get the entire content of the textarea when using it on the edit form btw.
I noticed. Not a huge problem, but can we combine it with this.title? My attempt at that--this.title.getAttribute('aria-label')--failed. Miserably. - A tooltip is this.title.
Great! I like the outcome.Only problem now is the box width. What element can I tack a .addClass('oo-ui-window-frame').css('width', '50%') to?
- My bad, the snippet should replace line 5. Again, you shouldn't remove aria-label. Try this. Nardog (talk) 10:09, 4 June 2022 (UTC)
- Perfect! Thanks, Nardog.
(Figured where to tack the css for the box width, btw (used 35em instead).
Cheers. — Guarapiranga ☎ 11:10, 4 June 2022 (UTC)
- Perfect! Thanks, Nardog.
- You replaced lines 4–7 and not 26.
- You replaced lines 4–7 and not 26. A tooltip is
- That didn't work, Nardog (and I didn't tinker with it to find out why, tbh). Your version is a great improvement, though, as it made the cheat sheet context sensitive to current page and current user (by only listing assigned access keys). I tried using the tooltip instead of the element label, though, as it is usually more detailed, with the element name often being replaced with an icon on the screen (as is the case of Js/6tabs-vector users, such as myself), but to no avail. Oddly enough, tooltip yielded the same texts as aria-label--what gives?! — Guarapiranga ☎ 04:39, 4 June 2022 (UTC)
- Huh, I thought Esc was enough.
- @Nardog: Nice approach. How do you turn
- @Guarapiranga: I don't appreciate this. Pasting a snippet here is a gesture that it is meant for you, the requester. If I'd intended it to be advertised like that I would have hosted it in my own userspace. I will not provide any more support on this script. Nardog (talk) 06:36, 5 June 2022 (UTC)
- Terribly sorry, Nardog; I thought I was being appreciative and respectful, giving credit was credit was due. No worries, I removed the topic. I also credited you in the script's help page; pls let me know if you wish to be removed from there too. — Guarapiranga ☎ 07:35, 5 June 2022 (UTC)
- Thanks, I appreciate it. Even though users are meant to install scripts at their own risk and the authors aren't legally liable for anything, hosting and advertising a script still comes with an implicit, informal obligation to ensure it works and causes no damage, which I'm not ready to provide for this script beyond just for you short-term. So I advise you to refrain from hosting or advertising a script that's not tried and tested unless you absolutely know what you're doing. Nardog (talk) 08:36, 5 June 2022 (UTC)
- Terribly sorry, Nardog; I thought I was being appreciative and respectful, giving credit was credit was due. No worries, I removed the topic. I also credited you in the script's help page; pls let me know if you wish to be removed from there too. — Guarapiranga ☎ 07:35, 5 June 2022 (UTC)
Page blanker script
Is there a script that blanks an entire page by click of button? Possibly with a confirmation button just so that a mistaken hit on the button doesn't blank the whole page. Thanks! —CX Zoom[he/him] (let's talk • {C•X}) 18:33, 4 June 2022 (UTC)
- @CX Zoom: See m:User:NhacNy2412/BlankedThePage.js (its fork). However, this script should be bundled in other things as it is quite simple and short; for instance, see this dashboard of mine. NguoiDungKhongDinhDanh 23:18, 4 June 2022 (UTC)