Wikipedia:User scripts/Requests

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
User script requests

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[edit]

Some ideas[edit]

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)
  • A user script to give you a browser push notification when you get a Wikipedia notification
  • 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
  • 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.
  • Replace page titles in watchlist & user contribs pages w/ their shortcuts for readability


Done

GUYWAN ( t · c ) 19:33, 5 December 2019 (UTC)[reply]

2020[edit]

2021 Q1[edit]

2021 Q2[edit]

Script for coordinates[edit]

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 • TalkContribs 17:28, 28 June 2021 (UTC)[reply]

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)[reply]
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 • TalkContribs 13:25, 9 November 2021 (UTC)[reply]
@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. Face-smile.svg Chlod (say hi!) 08:14, 12 January 2022 (UTC)[reply]

2021 Q3[edit]

Also move articles and sub-categories when moving a category[edit]

Do you guys have any scripts that combine Cat-a-lot and SpecialːMove?
UnnamedUser 20:43, 17 July 2021 (UTC)[reply]

<jk>No, you idiot. Go and write one for your own.</jk> NguoiDungKhongDinhDanh 13:47, 18 March 2022 (UTC)[reply]

Timestamp anchors in talk pages[edit]

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

That makes little sense. Such links won't work unless everyone installs the same script. Nardog (talk) 23:54, 20 July 2021 (UTC)[reply]
Could the anchor links perhaps be made accessible to anyone by putting a templatestyle on the page? — Guarapiranga  01:54, 21 July 2021 (UTC)[reply]
No, anchors cannot be added via CSS. Nardog (talk) 02:22, 21 July 2021 (UTC)[reply]
Right! Pity timestamps aren't anchored already. — Guarapiranga  05:56, 21 July 2021 (UTC)[reply]
... like that. — Guarapiranga  06:09, 21 July 2021 (UTC)[reply]
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)[reply]
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)[reply]
c:User:Jack who built the house/Convenient DiscussionsQwerfjkltalk 20:05, 23 July 2021 (UTC)[reply]
@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)[reply]
I guess this is  Done. See m:User:ESanders (WMF)/commentlinks.js. NguoiDungKhongDinhDanh 13:49, 18 March 2022 (UTC)[reply]

Contraction fixer[edit]

I'd like a user script that turns contractions into proper phrasing per MOS:CONTRACTION. Should be easy to code. WIKINIGHTS talk 16:11, 9 August 2021 (UTC)[reply]

Taking up the mantle of an almost completed peer review javascript bot[edit]

Hi all. Hope that you're well during these crazy times. I know this is technically a bot request but owing to the use of Javascript User:GreenC pointed me here. I was wondering if someone could take over a JavaScript bot request from a user who's now retired? (Wikipedia:Bots/Requests for approval/AWMBot 2)

Short summary of the problem is - old peer reviews are linked using CURRENTPAGENAME/ArchiveX. That means though when a page gets renamed, the link is lost. We have now about 680 broken reviews in this manner and a user created an almost complete javascript bot to fix it (code available via the bot request). There was only one slight problem which was that sometimes duplicate parameters got inserted into the fixed up peer review template. If you had time I'd be very very grateful to have this fixed up. Once this is done I plan to insert the peer review links into all the outstanding old peer reviews but can't do this until the broken ones are fixed up.

Fingers crossed! Tom (LT) (talk) 07:16, 19 August 2021 (UTC)[reply]

Help request[edit]

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

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 to search parameter. Jeeputer (talk) 13:14, 25 September 2021 (UTC)[reply]
@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)[reply]

restore the Wikipedia Citation Tool for Google Books[edit]

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

2021 Q4[edit]

A user script to make formatted edit requests[edit]

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

@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)[reply]
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)[reply]
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)[reply]
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)[reply]
@SD0001 Hopefully, that could be implemented in the.main edit request script, User:Jackmcbarn/editProtectedHelper. ― Qwerfjkltalk 17:57, 25 October 2021 (UTC)[reply]
@Enterprisey, @SD0001: I found Module:Diff, which might help. ― Qwerfjkltalk 09:44, 1 April 2022 (UTC)[reply]

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

@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)[reply]
@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)[reply]
@Qwerfjkl: Try again. If this doesn't work I'll have to create a third button. NguoiDungKhongDinhDanh 21:27, 1 April 2022 (UTC)[reply]
@NguoiDungKhongDinhDanh: The cactions link doesn't appear any more. ― Qwerfjkltalk 21:37, 1 April 2022 (UTC)[reply]
@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)[reply]
@NguoiDungKhongDinhDanh: Template:If then show work for you? ― Qwerfjkltalk 21:42, 1 April 2022 (UTC)[reply]
@Qwerfjkl: Surprisingly no. Try again now. NguoiDungKhongDinhDanh 21:47, 1 April 2022 (UTC)[reply]
Thanks, it works now. ― Qwerfjkltalk 21:51, 1 April 2022 (UTC)[reply]

Rotating through lists[edit]

I just create the Go portal. In it, I created a box showing the top international title holders. The code for that is: {{#lst:List of top title holders in Go|titleholders}}. To make this work I added a section "titleholders" to part of the article List of top title holders in Go. This seems to work fine. Now, what I'd like to do, and I can't seem to figure out how to make it work, is to rotate through the various lists of title holders in the article List of top title holders in Go. For example, the next list in the article is for "Continental" title holders. I know how to display that list with appropriate code, i.e., {{#lst:List of top title holders in Go|Continental titleholders}} with an appropriate section label for that list. The problem is how to make a template or other script in the portal that will allow switching form one list to the next. It would be a bit like a slide show, as with {{Transclude linked excerpts as random slideshow}} except I need it to be clear when you select one list or another. Ideally, I would create a horizontal list of links for "International", "Continental", "China", etc., and the reader could click on the type and the list would automatically update. Alternatively, there could be a left/right arrow above the list and the reader could simply click to advance through each list with an appropriate label appearing above the list. I would appreciate any help understanding how this can be done. Coastside (talk) 06:39, 9 October 2021 (UTC)[reply]

Autohighlighting specific characters. (Greek)[edit]

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

Add WikiProject templates to subcategories[edit]

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

I think EarwigBot Task 14 may be what you are looking for. – Rummskartoffel 11:32, 11 October 2021 (UTC)[reply]

GUI for voting[edit]

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

PS: Please ping in case of answers. - Klein Muçi (talk) 20:53, 11 October 2021 (UTC)[reply]

Cross wiki POTD[edit]

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

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

External Link to internal link[edit]

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

@Itcouldbepossible: See m:User:TMg/autoFormatter#Internal links. ― Qwerfjkltalk 13:01, 26 December 2021 (UTC)[reply]
@Qwerfjkl Ok thanks. ― ItcouldbepossibleTalk 14:53, 26 December 2021 (UTC)[reply]
@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)[reply]
@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)[reply]
@Qwerfjkl Thanks for the user script. I have installed it to my global.js page. ― ItcouldbepossibleTalk 07:12, 27 December 2021 (UTC)[reply]
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)[reply]
I don't think so (you can test it yourself). Sorry for the late reply! ― Qwerfjkltalk 21:06, 12 January 2022 (UTC)[reply]

2022 Q1[edit]

Opening pages in new tab with modifier key[edit]

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

Sounds like a good plan to me. .mw-searchSuggest-link appears to be the class you need to add target="_blank" to. Maybe do a DOMNodeInserted 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)[reply]
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)[reply]
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)[reply]
Hacky but works:
$(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');
});
Nardog (talk) 14:48, 8 January 2022 (UTC)[reply]
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:
$(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');
    }
});
Thanks! ― Levi_OPTalk 13:55, 10 January 2022 (UTC)[reply]
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)[reply]

Script for reporting people on WP:AIV?[edit]

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

WP:TWINKLE has this. The menu item is TW -> ARV -> AIV. –Novem Linguae (talk) 15:03, 10 January 2022 (UTC)[reply]
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)[reply]
You can turn of all modules apart from ARV at the Twinkle preferences page. ― Qwerfjkltalk 16:20, 10 January 2022 (UTC)[reply]
Ah. I didn't realize that you could just disable all modules besides the one. Thanks! ― Levi_OPTalk 16:23, 10 January 2022 (UTC)[reply]
@Levi OP: I'm fairly sure RedWarn can also do this, if you click on the 3 horizontal dots, then Report [user] to AIV. ― Qwerfjkltalk 18:13, 10 January 2022 (UTC)[reply]
Ah, thanks so much. Forgot that this menu existed. ― Levi_OPTalk 18:16, 10 January 2022 (UTC)[reply]

script that removes the languages on the sidebar[edit]

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

You can just hide it in your CSS:
#p-lang {
	display: none;
}
Nardog (talk) 17:46, 11 January 2022 (UTC)[reply]
oh. thanks for telling me! Desktop.INI 17:55, 11 January 2022 (UTC)[reply]

Script for WP:NOTBROKEN and MOS:SECTLINK[edit]

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

A script that does nothing beneficial[edit]

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

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)[reply]
The code in {{Randomquote}} would probably work fine for Panini!. – Jonesey95 (talk) 15:29, 13 January 2022 (UTC)[reply]
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)[reply]
I just purged the page a few times and got items 12 (slippery), 16 (empty variable), and 17 (cat gibberish), among others. I think it's working. – Jonesey95 (talk) 19:01, 13 January 2022 (UTC)[reply]

Special:PendingChanges - Rollback option[edit]

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

Shortcut preferences toggle buttons[edit]

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

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)[reply]
@CX Zoom:
OOjs UI icon check-constructive.svg Done with User:Qwerfjkl/scripts/VEtoggle. ― Qwerfjkltalk 21:50, 14 February 2022 (UTC)[reply]
Thank you very much, Qwerfjkl. Thanks Jonesey95. ---CX Zoom(he/him) (let's talk|contribs) 09:04, 15 February 2022 (UTC)[reply]

Interlanguage linking on minerva[edit]

A script that will do the same thing described here. Thanks. —Yahya (talkcontribs.) 09:30, 19 February 2022 (UTC)[reply]

This seems to be already possible by enabling the advanced mode in Special:MobileOptions. Nardog (talk) 15:25, 30 March 2022 (UTC)[reply]

Save Changes[edit]

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 (talkcontribs) 04:33, 28 February 2022 (UTC)[reply]

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

Limit time on Wikipedia[edit]

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

@CX Zoom:
OOjs UI icon check-constructive.svg Done with User:Qwerfjkl/scripts/wikibreak.. ― Qwerfjkltalk 18:33, 10 March 2022 (UTC)[reply]
@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)[reply]

Accept changes on Special:RecentChanges[edit]

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

@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)[reply]
@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)[reply]
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)[reply]
@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)[reply]
@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)[reply]
@Nardog, now it seems perfect! The request may be considered resolved.
Some side missions:
  1. Can we add a l18n/translation possibility to its strings?
  2. 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.
  3. 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)[reply]
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)[reply]
... 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)[reply]
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)[reply]
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)[reply]
@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)[reply]
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)[reply]
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)[reply]
@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:
  1. 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.
  2. 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)[reply]
... 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)[reply]
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)[reply]
@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)[reply]
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)[reply]
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)[reply]
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)[reply]
@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)[reply]
() 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 (OOjs UI icon arched-arrow-rtl.svg) as I don't find it "curvy" enough. So I used OOjs UI icon editUndo-ltr.svg instead. But you can use whatever image anyway since it's just CSS. Nardog (talk) 02:13, 2 April 2022 (UTC)[reply]
@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:
  1. Should I have both scripts to have the same functionality I had before you split them?
  2. 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.
  3. 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)[reply]
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)[reply]
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 and rollback, respectively, for the scripts, but you can also specify something that only admins have, like delete, to deter non-admins from enabling it, for example. You can also make enabling the gadget impossible without also loading Navigation popups by adding ext.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)[reply]
@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)[reply]
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)[reply]
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)[reply]
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)[reply]
You mean a notification? Nardog (talk) 14:07, 2 April 2022 (UTC)[reply]
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)[reply]
It looks like Navigation popups was interfering. How about now? Nardog (talk) 15:05, 2 April 2022 (UTC)[reply]
Unfortunately, still no. :/ - Klein Muçi (talk) 15:18, 2 April 2022 (UTC)[reply]
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)[reply]
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)[reply]
It's working for me. Try disabling gadgets/scripts one by one. Nardog (talk) 06:31, 3 April 2022 (UTC)[reply]
@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)[reply]
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)[reply]
@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)[reply]
@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)[reply]
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:
<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&amp;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&amp;diff=cur&amp;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 (talk) 07:10, 3 April 2022 (UTC)[reply]
@Nardog:
<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&amp;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>&lrm; (<a href="/w/index.php?title=Shqip%C3%ABria_n%C3%AB_Luft%C3%ABn_e_Dyt%C3%AB_Bot%C3%ABrore&amp;diff=cur&amp;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>
- Klein Muçi (talk) 07:23, 3 April 2022 (UTC)[reply]
Did you tried to perform rollback on that item and it failed? Nardog (talk) 07:30, 3 April 2022 (UTC)[reply]
Many times. - Klein Muçi (talk) 07:32, 3 April 2022 (UTC)[reply]
How about now? Nardog (talk) 07:34, 3 April 2022 (UTC)[reply]
It works! - Klein Muçi (talk) 07:39, 3 April 2022 (UTC)[reply]
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)[reply]
Even more suggestions:
Make the scripts available when viewing page histories and user contributions. - Klein Muçi (talk) 18:28, 2 April 2022 (UTC)[reply]
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)[reply]
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)[reply]
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)[reply]
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)[reply]
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)[reply]
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)[reply]
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)[reply]
@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.
  1. 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.
  2. Can you please add the accepting possibility even for Special:UnreviewedPages? I was told you don't have it here in EnWiki.
  3. 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)[reply]
() 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.
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]])'
});
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. quickrollback) and put mw.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)[reply]
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)[reply]
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)[reply]
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)[reply]
@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)[reply]
Yeah, please remove that. I just said I don't. Nardog (talk) 00:13, 4 April 2022 (UTC)[reply]
@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:
  1. 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?
  2. 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)[reply]
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)[reply]
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)[reply]
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)[reply]
@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)[reply]

Category blocking[edit]

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

@TheSandDoctor: Try this one: User:NguoiDungKhongDinhDanh/Angrenamer.js. NguoiDungKhongDinhDanh 02:09, 5 April 2022 (UTC)[reply]
@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)[reply]
@TheSandDoctor:  Done (diff). NguoiDungKhongDinhDanh 18:37, 5 April 2022 (UTC)[reply]
@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. Face-smile.svg --TheSandDoctor Talk 20:58, 5 April 2022 (UTC)[reply]
@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)[reply]
@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)[reply]

Script for signing all unsigned replies on a talk page[edit]

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

Translation script[edit]

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

There are plenty of browser extensions that allow that on any website, see [1][2]. Nardog (talk) 03:42, 15 April 2022 (UTC)[reply]
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)[reply]