Wikipedia:User scripts/Requests/Archive 6
This is an archive of past discussions on Wikipedia:User scripts. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current main page. |
Archive 1 | ← | Archive 4 | Archive 5 | Archive 6 | Archive 7 | Archive 8 | Archive 9 |
Please Read the FAQ
I hope this doesn't seem bitey, but it would be so helpful to have a script that could let me answer/close a post with a kindly-worded "Please read the FAQ" message on articles that are getting huge numbers of redundant posts for days and weeks on end after a major incident. It's a major time-waster for editors. —valereee (talk) 18:42, 11 November 2020 (UTC)
- Valereee, is this just a script to reply to a person on a talk page with that message, your signature, maybe a ping, and using the proper indent? Does the script need to add {{archivetop}}{{archivebottom}} around it? Any other requirements? –Novem Linguae (talk) 14:03, 10 December 2020 (UTC)
- Novem Linguae, ideally it would be able to answer and close a discussion or semi-protected edit request, in the case of a semi-protected edit request also mark it answered, but not archive it. I usually don't archive early as I'm hoping other new editors coming in to make similar requests will see there are already ten on the page and maybe not ask after all. :) —valereee (talk) 15:32, 10 December 2020 (UTC)
- Some sort of language like, "Hi, and welcome to Wikipedia. The edit you're requesting has been discussed multiple times. For more information, see the FAQ at the top of this page. Thank you!" —valereee (talk) 15:33, 10 December 2020 (UTC)
- In progress User:Novem_Linguae/Scripts/edit-request-read-faq.js –Novem Linguae (talk) 17:37, 10 December 2020 (UTC)
- Sorry. I haven't had as much time to work on this as I would like. I will try to finish this when I get some free time. Also, I ran across another tool that doesn't do exactly this, but might be helpful for quickly replying to edit requests: User:Jackmcbarn/editProtectedHelper –Novem Linguae (talk) 07:32, 28 December 2020 (UTC)
- @Novem Linguae, that .js -- is that safe to install and try, or were you saying it's not quite ready for prime time yet? —valereee (talk) 11:09, 12 June 2021 (UTC)
- Done. Valereee. Hello there! I'm happy to report that I spent a few hours on it this morning and got it working. Feel free to install and use. It probably has some bugs, please check carefully each time you use it, and please report any buggy diffs. Happy editing. –Novem Linguae (talk) 14:03, 12 June 2021 (UTC)
- Wow, thanks! Will do! —valereee (talk) 14:05, 12 June 2021 (UTC)
- Done. Valereee. Hello there! I'm happy to report that I spent a few hours on it this morning and got it working. Feel free to install and use. It probably has some bugs, please check carefully each time you use it, and please report any buggy diffs. Happy editing. –Novem Linguae (talk) 14:03, 12 June 2021 (UTC)
- @Novem Linguae, that .js -- is that safe to install and try, or were you saying it's not quite ready for prime time yet? —valereee (talk) 11:09, 12 June 2021 (UTC)
- Some sort of language like, "Hi, and welcome to Wikipedia. The edit you're requesting has been discussed multiple times. For more information, see the FAQ at the top of this page. Thank you!" —valereee (talk) 15:33, 10 December 2020 (UTC)
- Novem Linguae, ideally it would be able to answer and close a discussion or semi-protected edit request, in the case of a semi-protected edit request also mark it answered, but not archive it. I usually don't archive early as I'm hoping other new editors coming in to make similar requests will see there are already ten on the page and maybe not ask after all. :) —valereee (talk) 15:32, 10 December 2020 (UTC)
- @Valereee: I think this one is relevant and probably may be reused: User:Enterprisey/reply-link. You can configure it in your commons.js to point out to the FAQ like so:
window.replyLinkPreloadPingTpl = "Please, READ [[Wikipedia:FAQ]]";
. AXONOV (talk) ⚑ 09:46, 14 May 2021 (UTC)- An addition to DannyS712's User:DannyS712/DiscussionCloser.js ? Cabayi (talk) 10:31, 14 May 2021 (UTC)
Wikilink News Citations
The idea would be to identify a list common sources in the publication= field of a news citation, and use the script to wikilink them to the relevant page.
For example, Reuters to Reuters or New York Times to The New York Times. — Preceding unsigned comment added by RoanokeVirginia (talk • contribs) 10:28, 7 June 2021 (UTC)
- There is no
|publication=
parameter in cs1|2. When Reuters or AP or AFP or other news agencies are directly referenced, their name goes in|work=
. When The New York Times or San Francisco Chronicle or other news papers are referenced, their names (without italic markup) go in|newspaper=
(or optionally,|work=
). When citing a news source that is using work from a news agency (Reuters, AP, AFP, etc), the agency name goes in|agency=
and the news source name goes in the appropriate 'work' parameter. None of these types of names belong in|publisher=
. - I would otherwise object to this script because, in general, wikilinking every news source name just because it is a news source name seems to me to be sea-of-blue-like clutter. Wikilink news sources that are not familiar so that readers can easily evaluate that source's reliability;
common sources
, like the two you mentioned, do not need to be wikilinked to establish their reliability. - —Trappist the monk (talk) 15:08, 14 June 2021 (UTC)
External to internal links
A script for changing external links to internal links if applicable. ― Qwerfjkl | 𝕋𝔸𝕃𝕂 (please use {{reply to|Qwerfjkl}}
on reply) 20:32, 23 June 2021 (UTC)
- meta:User:TMg/autoFormatter claims to fix this problem. You can find a list of pages at CheckWiki error 90. – Jonesey95 (talk) 21:46, 23 June 2021 (UTC)
Previous warnings
It would be a timesaver for me to have a script that would show me previous "month year" sections heads on user talks, which is commonly how warnings are sectioned, maybe allowing me to limit to just the past year or two. I usually scan the section heads in the history, but I'm sure I miss things, and others probably do too: Special:Permalink/1030562622#User:Ulises142 - When a user receives three final warnings, and yet continues vandalizing. It would be good if this caught section heads that were later changed. —valereee (talk) 18:31, 26 June 2021 (UTC)
FUR
I want a script that adds FURs of the user's choice, similar to WP:FURME. --Kailash29792 (talk) 17:44, 13 February 2021 (UTC)
- +1 this would be amazingly useful. Just a simple script to fill in the parameters of {{logo fur}} would even be useful. — Berrely • Talk∕Contribs 18:54, 1 July 2021 (UTC)
Mass-patrolling at Special:NewPages
I'd like a script that allows a user to select multiple unpatrolled pages at Special:NewPages and mark them as patrolled, without leaving the page. This would be useful in patrolling, for example, talk namespaces, where the vast majority of creations are good and can be quickly patrolled without going to the page itself. Elli (talk | contribs) 20:01, 6 July 2021 (UTC)
Script requests
Copied from User talk:DannyS712#Script requests
Please can you make these scripts (ordered by prority):
- A copy-vio check for AfC (similar to User:DannyS712/copyvio-check)
A one-click undo button(User:BrandonXLF/AJAXUndo)- (If possible) A script which replaces alert notifications and input boxes with text boxes (because alert notifications don't appear for me)
Thanks! ―Qwerfjkltalk 18:45, 11 July 2021 (UTC)
Thank links in talk pages
Is there, or could there be, a script that puts thanks links on talk pages? Evad37's excellent TimestampDiffs already puts the diff link on each comment date; I'd imagine picking the oldid from that to put on a (thanks) link would be a breeze, no? — 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚 (talk) 06:03, 12 May 2021 (UTC)
- @Guarapiranga Aren't there a couple of tools around that do this already? One I know is c:User:Jack who built the house/Convenient Discussions. – SD0001 (talk) 12:55, 28 May 2021 (UTC)
- Just now I've disabled Discussion Tools to try this, @SD0001. So far: Wow! — Guarapiranga ☎ 06:24, 21 July 2021 (UTC)
GAN User script
Hi! I'll preface this and say my coding knowledge is very basic. I did make an effort to complete this myself, but I'm better at forking existing scripts than writing a new one. Some of this is quite personal to me, but easy enough to make this more useful to more editors. This would only be of help to serial nominators of GANs though! Here's what I've been looking to get:
When attempting to nominate an article for WP:GAN, you need to {{subst:GAN|subtopic=X}} on talk page. I'd like to add this, plus some additional actions in one go.
- {{subst:GAN|subtopic=X}} onto talk page of article being edited. Maybe a pop-up box for |subtopic, and |note.
- Adds page to User:Lee Vilenski/GANs or, substitute the user's page. Create if not already exists. I think this is [[{{{USERPAGE}}}/GANs]] - you'd know better than I.
- Potentially the most difficult, it watchlists /GA# page, such as Talk:2020 World Snooker Championship/GA1 or Talk:League of Legends/GA2 for example.
For future enhancement, most Wikiprojects have a nominations pane, it'd be nice for this to automatically add to these if possible (probably needs some sort of case-by-case addition.
In addition, something that closes GANs might also be good. To do:
- Close the discussion on the GAN page.
- Change {{GAN|subtopic=X|nominator=Y|page=Z|etc.}} to {{GA|subtopic=X|page=Z|~~~~~}} or {{failed GA|subtopic=X|page=Z|~~~~~}} on talk page of article dependent if GAN passes or fails.
- Change ratings on all WikiProjects to GA (or leave alone if failed).
- List article at WP:GA - this may need a drop down as to where it needs to go within the lists.
I think this is quite an ask, but if anyone wants to help me work on this, let me know. I'm happy to give some more specific steps if wanted :). Best Wishes, Lee Vilenski (talk • contribs) 09:56, 23 November 2020 (UTC)
- @Lee Vilenski: Interesting. For creating nominations, I already have a DYK-helper.js and GAR-helper.js. Would love to complete the collection by bundling in GAN, FAC, FAR, etc. A GAN nomination script is pretty straightforward but the unusual thing is actually #2 since every person may have their personal GAN log formatted in a different way and we wouldn't know. One way to go about it is to make it an opt-in function which blindly appends
* [[Article name]]
to the page, leaving it upon the user to ensure that such an addition would fit into the formatting of the page. - As for a closure script, I think it also needs to handle options like WP:GAN/I#HOLD and WP:GAN/I#2O?
- Also, since you say
did make an effort to complete this myself
is that code available so that i can take parts from it? – SD0001 (talk) 18:15, 23 November 2020 (UTC)- I didn't get it far enough into doing so. I spent a little bit of time, and panicked at the scripting that is far above my head! I suppose the thing about #2 is that it wouldn't be too difficult to change the place, and I would likely just set my nominations page to transcribe.Best Wishes, Lee Vilenski (talk • contribs) 18:38, 23 November 2020 (UTC)
- @Lee Vilenski: Done for first part. See User:SD0001/GAN-helper.js. For logging, you can specify page name and the log entry in the interface. – SD0001 (talk) 21:09, 23 November 2020 (UTC)
- That is some quick fantastic work! I've asked some friends to also test this out as I don't have anything written to nominate now. The interface looks fantastic. Best Wishes, Lee Vilenski (talk • contribs) 21:17, 23 November 2020 (UTC)
- Ha, I mostly just copied stuff from GAR-helper and changed things here and there ... – SD0001 (talk) 21:24, 23 November 2020 (UTC)
- That is some quick fantastic work! I've asked some friends to also test this out as I don't have anything written to nominate now. The interface looks fantastic. Best Wishes, Lee Vilenski (talk • contribs) 21:17, 23 November 2020 (UTC)
- @Lee Vilenski: Done for first part. See User:SD0001/GAN-helper.js. For logging, you can specify page name and the log entry in the interface. – SD0001 (talk) 21:09, 23 November 2020 (UTC)
- I didn't get it far enough into doing so. I spent a little bit of time, and panicked at the scripting that is far above my head! I suppose the thing about #2 is that it wouldn't be too difficult to change the place, and I would likely just set my nominations page to transcribe.Best Wishes, Lee Vilenski (talk • contribs) 18:38, 23 November 2020 (UTC)
Hi SD0001 - I've been using your script a lot, it's been super helpful. I wonder if you'd be interested in something for closing GANs. Here's the list that I would want it to do:
- Close the discussion on the GAN page, either pass or fail.
- Change {{GAN|subtopic=X|nominator=Y|page=Z|etc.}} to {{GA|subtopic=X|page=Z|~~~~~}} or {{failed GA|subtopic=X|page=Z|~~~~~}} on talk page of article dependent if GAN passes or fails.
- Change ratings on all WikiProjects to GA (or leave alone if failed).
- List article at WP:GA - this may need a drop down as to where it needs to go within the lists. I think this is the hardest bit, but let me know what you think.
Currently, I think this is the most strenuous part of the review process, as you generally have to edit at least three pages at the bare minimum just to close the GAN. When I close, I currently use discussion closer and rater to do the work, but I think this could be a lot more convenient. Is this something we could automate? There's a lot of people who do hundreds of reviews, and this might just make it a little bit more streamlined. Best Wishes, Lee Vilenski (talk • contribs) 19:39, 23 July 2021 (UTC)
Vector/Timeless background color customizer script
So i want to change my background colors from the basic grey and white and due to my limited knowledge of javascript, i cannot figure out any of that stuff. I want a script that adds a button to the menu (pop-down on Timeless) and allows you to change 4 of the colors, 1 for The top bar. 1 for the secondary background (the grey portion), 1 for the main background (the thing where the text stands) and 1 for the text itself. MoonlightVectorTalk page 17:47, 6 October 2021 (UTC)
Contraction fixer
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)
Taking up the mantle of an almost completed peer review javascript bot
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)
Rotating through lists
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)
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)
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)
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)
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
- Convenient Discussions allows this ―Qwerfjkltalk 06:22, 17 July 2021 (UTC)
- 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.
- 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)A user script that redirects accidental navigation to 404's ending in a slash (say, Foo/) to the normal page (Foo)In diffs, show previews for both the old and new versions (with anchors to allow jumping)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)
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)
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)
- Ah. I didn't realize that you could just disable all modules besides the one. Thanks! ― Levi_OPTalk 16:23, 10 January 2022 (UTC)
- @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)
- Ah, thanks so much. Forgot that this menu existed. ― Levi_OPTalk 18:16, 10 January 2022 (UTC)
- @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)
- Ah. I didn't realize that you could just disable all modules besides the one. Thanks! ― Levi_OPTalk 16:23, 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)
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 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; }
- oh. thanks for telling me! Desktop.INI 17:55, 11 January 2022 (UTC)
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)
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)
- 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)
- 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)
Save Changes
I would like to be able to save my changes without having to publish changes on https://en.wiki.x.io/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)
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)
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.wiki.x.io/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.wiki.x.io 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)
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.wiki.x.io/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)
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)