Wikipedia:User scripts/Requests/Archive 7
This is an archive of past discussions about 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 5 | Archive 6 | Archive 7 | Archive 8 | Archive 9 |
User talk page warning to flag up likely THEYCANTHEARYOU problem
(I asked at VPT and was signposted here, so am just copypasting my original query:)
While waiting (!) for the mobile user notification problem (WP:THEYCANTHEARYOU) to be one day maybe (!!) fixed, would it be a) possible and b) good idea to implement in the meantime a warning which automatically appears on the top of the user talk page of a user who is likely to be not getting notifications (ie. edits only or or mostly on an affected mobile device, and does not edit their talk page)?
I realise this would do nothing to help such users receive the said notifications, but it would at least make it easier for the rest of us to identify this as a possible explanation for their lack of response to warnings etc., helping to AGF and not raise blood pressures unduly. I've seen many user talk pages where the attempts at communicating with the user get increasingly desperate, until someone points out this as the likely reason. I just thought maybe that could be done automatically by way of some clever code.
Thanks, -- DoubleGrazing (talk) 11:58, 2 May 2022 (UTC)
- PS: By "automatically" I meant some sort of user-side script which I could opt in and put in my common.js or somewhere. When I then visit a user talk page, the script checks the user's edit history and displays (to me) a warning, flagging up things like 'user has never edited their user talk page' or 'user edits using iOS devices only', or whatever the relevant criteria are. -- DoubleGrazing (talk) 11:59, 2 May 2022 (UTC)
- @DoubleGrazing: I have a script that might do part of what you are looking for: User:Rummskartoffel/talk page usage.js, which displays the time since a user's last edits in certain talk namespaces, along with links to those edits and links to their contributions for the namespaces in question. It doesn't do the other things you're looking for, though. Rummskartoffel 17:55, 8 May 2022 (UTC)
- Thanks @Rummskartoffel, will keep that in mind. Best, -- DoubleGrazing (talk) 06:08, 9 May 2022 (UTC)
Date Format Converter
I would like to suggest a Javascript extension that changes date formats from 1977-01 to January 1977. I am editing articles on Arc Routing and Mixed Chinese postman problem and the book uses the date format yyyy-mm and I would like to automate the process of correctly formatting the dates to month name long yyyy. ScientistBuilder (talk) 19:37, 10 May 2022 (UTC)
- I suggest using
{{subst:#time:F Y|1977-01}}
, which converts to "January 1977" when you save. Nardog (talk) 21:58, 10 May 2022 (UTC)
User script to Grab Youtube, Facebook, and Twitter links from a Wiki Page
Simple. Just grab and take the URls/links from a Wikipedia page with websites from Youtube, Facebook, and Twitter. Any additional sites can be good but these three should be primary. I am thinking of storing and saving them a copy before being deleted or anything bad can happen. Can anyone create an automated userscript for this? Thank you --Likhasik (talk) 16:53, 12 May 2022 (UTC)
- Doing...... Shouldn't take long. Chlod (say hi!) 16:56, 12 May 2022 (UTC)
- Hi lods. Thank you for this. Well, I would say that I am an archivist and I would like to request an automation for sending links to archive.today and ghostarchive.org - both of which save webpages. Probably an extension after grabbing the URLs, then sending them to the archival sites, if possible. Thank you for the initiative. Let me know and please do ping me with "@" --Likhasik (talk) 17:06, 12 May 2022 (UTC)
- @Likhasik: Userscipt can be found at User:Chlod/Scripts/LinkGrab.js. By default, this adds a button to the "More" menu (at the page header) that will copy links to YouTube, Facebook, and Twitter to your clipboard. To change the websites that are copied, place the following before the
importScript
ormw.loader.load
line in for the script in your common.js file. window.lgLinksToFind = [ // Default "youtube.com", "youtu.be", "facebook.com", "twitter.com", // Example: Also copy links to the Washington Post "washingtonpost.com" ]; importScript("User:Chlod/Scripts/LinkGrab.js");
- Let me know if you want anything changed or need anything else. I'll definitely expand this in the future to give it a better interface for choosing websites to get than having to edit the JS file. As for the extension that automatically archives the links: it's beyond the scope for this board (and probably needs more than a userscript, as I don't think either website would allow cross-origin resource sharing with Wikipedia). We do, however, have User:InternetArchiveBot (interface) that can automatically archive outlinks to the Internet Archive (as long as the option was set). Chlod (say hi!) 17:46, 12 May 2022 (UTC)
- @Chlod Can you also please add a "false positive" feedback box (I'm not sure with the name) whenever I click Grab links? Like for example, an article without any of those URLs/Websites. If I click "Grablink", it should give me feedback that there are no links corresponding to it (No YT/FB/Twitter links). Hence not wasting my time confirming if I have the links grabbed.
- Whenever I click grab links, the feedback box shows "Links copied to clipboard" but there are no links copied instead. I just wanted to save time instead of CTRL+V-ing every time to see if there is something copied.
- Also, can you also create a userscript that whenever I click "random article", it will lead me to my preferred topics? I am tired seeing sports articles whenever I click random article which I do not want to edit. Thank you.
- --Likhasik (talk) 03:31, 13 May 2022 (UTC)
- @Likhasik: For the former, Done. For the latter, you may wish to use Special:RandomInCategory and bookmark that instead. Chlod (say hi!) 04:29, 13 May 2022 (UTC)
- Please also add the total numbers of link copied. Better if by Links/URLs themselves with the overall count, of course. (Example: 5 YT links copied; 0 FB links; 2 Twitter etc.) Only for the feedback box
- Also, is there a possibility that I can edit this userscript by myself with my own preferences and Links? Sorry I am new in using a Userscript. Thanks! --Likhasik (talk) 04:42, 13 May 2022 (UTC)
- @Likhasik: Feel free to copy over the userscript to your own userspace (subject to WP:CWW, of course). After that, just change the relevant lines in your
common.js
to use your own version. Chlod (say hi!) 04:45, 13 May 2022 (UTC)- Okay then. Also, please do add the aforementioned request. The number of copied links per site. Thank you --Likhasik (talk) 05:16, 13 May 2022 (UTC)
- @Likhasik: Done. Chlod (say hi!) 05:28, 13 May 2022 (UTC)
- @Chlod Hello and good day. I think the script is broken. It copies links that are not any of those three. It just takes any URLs in the page, including files and images within wikipedia. Please fix. The feedback box is not even cooperating and I'd say still faulty. --Likhasik (talk) 03:20, 15 May 2022 (UTC)
- @Likhasik: Looks like I missed a pair of brackets. Should be fixed now. Chlod (say hi!) 03:35, 15 May 2022 (UTC)
- @Chlod Hello and good day. I think the script is broken. It copies links that are not any of those three. It just takes any URLs in the page, including files and images within wikipedia. Please fix. The feedback box is not even cooperating and I'd say still faulty. --Likhasik (talk) 03:20, 15 May 2022 (UTC)
- @Likhasik: Done. Chlod (say hi!) 05:28, 13 May 2022 (UTC)
- Okay then. Also, please do add the aforementioned request. The number of copied links per site. Thank you --Likhasik (talk) 05:16, 13 May 2022 (UTC)
- @Likhasik: Feel free to copy over the userscript to your own userspace (subject to WP:CWW, of course). After that, just change the relevant lines in your
- @Likhasik: For the former, Done. For the latter, you may wish to use Special:RandomInCategory and bookmark that instead. Chlod (say hi!) 04:29, 13 May 2022 (UTC)
- @Likhasik: Userscipt can be found at User:Chlod/Scripts/LinkGrab.js. By default, this adds a button to the "More" menu (at the page header) that will copy links to YouTube, Facebook, and Twitter to your clipboard. To change the websites that are copied, place the following before the
- Hi lods. Thank you for this. Well, I would say that I am an archivist and I would like to request an automation for sending links to archive.today and ghostarchive.org - both of which save webpages. Probably an extension after grabbing the URLs, then sending them to the archival sites, if possible. Thank you for the initiative. Let me know and please do ping me with "@" --Likhasik (talk) 17:06, 12 May 2022 (UTC)
Translation script
Hello! I sometimes use Wikipedia to help myself learn new languages. To do that, many times I have to look up in Google certain words from certain sentences to be able to grasp the context. Can we create a script that makes it possible to select a certain word and get the translation for it in a chosen language? For example, in the Latin Wikipedia, in the sentence Novum Eboracum est urbs. (New York is a city.) I can select "urbs" and get shown a tooltip reading "city". Maybe the language of the source gets deducted automatically by the project's name code and the translated language can be set up as a preference by the user somewhere. (Or we can just make it work with English if that's too hard, that would be good enough.) - Klein Muçi (talk) 03:28, 15 April 2022 (UTC)
- There are plenty of browser extensions that allow that on any website, see [1][2]. Nardog (talk) 03:42, 15 April 2022 (UTC)
- Hah, somehow it had never crossed my mind it could be that easy. Precisely what I was looking for, thank you! - Klein Muçi (talk) 09:21, 15 April 2022 (UTC)
- There's also Endo999's GoogleTrans, which can also be enable as a gadget from your preferences page. — Guarapiranga ☎ 06:05, 15 May 2022 (UTC)
- @Guarapiranga, superb script (and superb support from Endo for more than a decade apparently). I'm sticking to the extension for the moment because it can extend further than Wikipedia but if I hadn't been told about it, I would have gone with this script. Thank you! - Klein Muçi (talk) 11:04, 15 May 2022 (UTC)
A script that highlights and helps link unlinked people (and organisations?) in articles
... somewhat similar to those that highlight dab links and help resolve them.
Unfortunately WP:REDLINK policies create a dis-incentive for editors to wikilink people whose notability is uncertain, or that may or may not become notable in the future. The result I see is tons of people who were deemed notable enough to have articles in their name, but that remain (sort of) anonymous in other articles, probably bc they were written before their notability was established. It'd be great if a script could highlight such people (perhaps by simply regexing for proper names, e.g. ([A-Z][a-z\-]+ [A-Z][a-z\-\.]+
, and checking whether their articles exist. The script could then provide the hover snippet of the article with a confirm button to introduce the link. If the linked page is a dab, then if it could help choose the dab link from a dropdown menu, that'd be a bonus.
Is there anything already out there that doesn something like that? Otherwise, I can't imagine it'd be too hard to put it together (I can probably do it, given enough time, sweat and tears). — Guarapiranga ☎ 06:00, 23 May 2022 (UTC)
- How would a script recognize that in "James Wood is a 65-foot tall carpenter", "James Wood" is a person that could potentially be linked, and "tall carpenter" isn't a person that could potentially be linked? Headbomb {t · c · p · b} 06:04, 23 May 2022 (UTC)
- For reference, your regex would highlight the following (in purple). That doesn't seem very useful. Headbomb {t · c · p · b} 06:15, 23 May 2022 (UTC)
- Looks like you figured out how that regex can distinguish James Wood from tall carpenter, Headbomb. But, yeah, it's e.g.; sure it can be improved (to include longer and hyphenated proper names, for instance). I wouldn't have the script simply link all such capitalised groups of words--let alone highlight'em in purple! 😄--but rather underline them (say, in blue), perhaps highlight them in light blue when hovered over, and open a drop down menu with options to either link or ignore them (perhaps a more complete menu would include: link this, link all, ignore this, ignore all, and the alternatives to link to in case of dab). — Guarapiranga ☎ 22:40, 23 May 2022 (UTC)
- For reference, your regex would highlight the following (in purple). That doesn't seem very useful. Headbomb {t · c · p · b} 06:15, 23 May 2022 (UTC)
Disambiguation gadget from plwiki
The plwiki has a disambiguating gadget to help clean up ambiguous links on a page. The original script is Matma Rex's disFixer on enwiki. The interface works fine, but it doesn't seem to apply the requested changes once the edit window is loaded (at least on my setup). Has anyone been able to make it work, or have an alternate? Cheers. — Guarapiranga ☎ 05:01, 25 May 2022 (UTC)
- @Guarapiranga Hi :) I haven't maintained the enwiki version, because I thought that other tools for fixing disambiguation links are popular here – for example Navigation popups does it, and tons of people have that enabled. I haven't looked at it since 2014, it may have been broken by some MediaWiki changes in the meantime. If you'd find it useful, I'll have a look at it tomorrow. There are some differences from the plwiki version, since that one depends on some other gadgets available there. Matma Rex talk 00:03, 26 May 2022 (UTC)
- Aha! I hadn't noticed navpopup had that option. Thanks, Matma Rex. I guess that's also half the solution to an earlier question I had posted here. Cheers. — Guarapiranga ☎ 02:14, 27 May 2022 (UTC)
- Hum... Navpopup's dab option is not working for me either (and showing very similar behaviour to your script, Matma Rex--it opens the edit window with the
autoedit
regex in the url, but no changes are made in the content--which suggests to me in both cases it may be a conflict with my config (preferences, gadgets and scripts)). — Guarapiranga ☎ 02:42, 27 May 2022 (UTC)- @Guarapiranga Oh, this might actually be a simpler problem than I thought. Do you have syntax highlighting enabled? This change should fix it: [3]. Someone could probably make a similar fix to Popups. (Also, I'd like to note that this gadget is 10+ years old and not my finest work. I'll be happy if you find it useful, but it might be a disappointment, and I'm not really interested in reworking it.) Matma Rex talk 23:19, 27 May 2022 (UTC)
- Thanks for that, Matma Rex. Neither of those solutions fixed it, though. It's now pretty clear to me this is unrelated to your script, navpopup, or my setup (as simply loading the autoedit url does nothing to the edit window whether I'm logged in or out). This one, for instance. — Guarapiranga ☎ 04:07, 28 May 2022 (UTC)
- @Guarapiranga Oh, this might actually be a simpler problem than I thought. Do you have syntax highlighting enabled? This change should fix it: [3]. Someone could probably make a similar fix to Popups. (Also, I'd like to note that this gadget is 10+ years old and not my finest work. I'll be happy if you find it useful, but it might be a disappointment, and I'm not really interested in reworking it.) Matma Rex talk 23:19, 27 May 2022 (UTC)
- Hum... Navpopup's dab option is not working for me either (and showing very similar behaviour to your script, Matma Rex--it opens the edit window with the
- Aha! I hadn't noticed navpopup had that option. Thanks, Matma Rex. I guess that's also half the solution to an earlier question I had posted here. Cheers. — Guarapiranga ☎ 02:14, 27 May 2022 (UTC)
Userscript to periodically reload web.archive.org whenever I am archiving
Hello and I ask you folks if maybe you can help me out. Pardon me if this request is an external one, outside of Wikipedia itself.
So I have this Userscript executor called Tampermonkey which is a chrome extension and unfortunately I cannot code it myself.
Whenever I archive or send links to save in web.archive.org, I get this message "Sorry Job failed" or "Sorry You have already reached the limit of active sessions. Please wait for a few minutes and then try again." I usually archive links manually here in Wikipedia because the InternetArchiveBot is sometimes inefficient when it comes to a lot of requests, as well as personal sites that I visit in the web in general. After several reloads, it accepts the request and successfully archive. I would like just to request if you know or can create a code which automatically reloads the web.archive.org website whenever I am saving to save time instead of revisiting each and reloading it one-by-one. Not automatically but rather within a certain period or with a cooldown for a few seconds a bit.
Thank you and have a great day! --Likhasik (talk) 05:22, 28 May 2022 (UTC)
- @Likhasik: this Tampermonkey script will reload any page under web.archive.org/* after a set amount of time:
- >>> Ingenuity.talk(); 19:59, 28 May 2022 (UTC)
// ==UserScript== // @name Reload web.archive.org // @namespace http://tampermonkey.net/ // @version 0.1 // @description reload web.archive.org // @author You // @match https://web.archive.org/* // @icon https://www.google.com/s2/favicons?domain=tampermonkey.net // @grant none // ==/UserScript== const reloadTime = 15000; // you can change this value to vary how long it will take to reload -- this is 15 seconds window.setTimeout(() => location.reload(), reloadTime);
Point 1st tab to ROOTPAGENAME
I'm always a little confused as to why the 1st tab--Article in mainspace, Template, Project page, etc--while in a talk or subpage point to {{SUBJECTPAGENAME}}, not to {{ROOTPAGENAME}}. Scripting that change should be easy enough; has anyone done it already, or should I endeavour to? Or would anyone like to take a stab at it? — Guarapiranga ☎ 02:39, 31 May 2022 (UTC)
Tab Resizing Script?
Hello I edit on a mobile phone and since the mobile skin doesn't have all the features of the vector skin I switched to the vector skin. However the tab and the other stuff on the top of the page are too small for me to press with my big fingers. So I want a user script that allows me to resize the top of the page (tabs, search, preferences, notifications etc). THE Pizzaplayer!TALK TO MEE!! contribs 20:20, 22 May 2022 (UTC)
- Js' 6tabs-vector.js makes'em narrower by changing their text to icons. Perhaps all you need to do is to change the text to be wider. — Guarapiranga ☎ 07:30, 1 June 2022 (UTC)
Access keys cheat sheet
It'd be cool to press alt-shift-? and see a access keys popup cheat sheet. Has anyone done that yet? I couldn't find it here, here or here. — Guarapiranga ☎ 11:31, 2 June 2022 (UTC)
- @Guarapiranga:
$('body').keydown(function(e) { if (!(e.altKey && e.shiftKey && e.key == '?')) return; if (!$('#akcs').length) { $('#bodyContent').after( $('<div>').attr('id', 'akcs').css('display', 'none').html( // Here goes your content (in HTML). ) ); } $('#bodyContent, #akcs').toggle(); });
- And that's basically it. NguoiDungKhongDinhDanh 15:20, 2 June 2022 (UTC)
- Thanks, NguoiDungKhongDinhDanh. Any wm-js tricks to transclude from WP itself instead of typing it out and maintaining it? Like...:
{{#section-h:WP:KBD|List of access keys}}
— Guarapiranga ☎ 06:04, 3 June 2022 (UTC) - NguoiDungKhongDinhDanh, did you mean:
$('<div>').attr('id', 'akcs').css('display', 'none').html(' // Here goes your content (in HTML). ')
Isn't that what you suggested? I'm getting a missing ) after argument error msg. — Guarapiranga ☎ 06:48, 3 June 2022 (UTC)- @Guarapiranga: If you want to transclude the table, you will have to query it from MediaWiki. That is unnecessary. Also, you need to escape single quotes inside the table, or change the outermost ones to backticks (
`
). NguoiDungKhongDinhDanh 07:36, 3 June 2022 (UTC)- Yes! Sorted.
Working now. Thanks, Nguoi. — Guarapiranga ☎ 07:44, 3 June 2022 (UTC)
- Yes! Sorted.
- @Guarapiranga: If you want to transclude the table, you will have to query it from MediaWiki. That is unnecessary. Also, you need to escape single quotes inside the table, or change the outermost ones to backticks (
- Thanks, NguoiDungKhongDinhDanh. Any wm-js tricks to transclude from WP itself instead of typing it out and maintaining it? Like...:
- What I would do: Nardog (talk) 14:51, 3 June 2022 (UTC)
$(() => { let dialog; $('<a>').attr('accesskey', '?').text('This thing').hide().click(() => { if (dialog) { dialog.open({ actions: [] }); return false; } mw.loader.using('oojs-ui-windows', () => { let winMan = new OO.ui.WindowManager(); winMan.$element.appendTo(document.body); dialog = new OO.ui.MessageDialog(); winMan.addWindows([dialog]); $('<table>').addClass('wikitable').css('width', '100%').append( $('[accesskey]').map(function () { return $('<tr>').append( $('<th>').text(this.accessKey.toUpperCase()), $('<td>').text( this.getAttribute('aria-label') || this.textContent || this.value || $(`label[for="${this.id}"]`).text() ) ); }).get() ).appendTo(dialog.text.$element); dialog.open({ actions: [] }); }); return false; }).appendTo(document.body); });
- @Nardog: Nice approach. How do you turn
This thing
off with the same keys? NguoiDungKhongDinhDanh 15:14, 3 June 2022 (UTC)- Huh, I thought Esc was enough. Nardog (talk) 15:19, 3 June 2022 (UTC)
if (dialog.isOpened()) { dialog.close(); } else { dialog.open({ actions: [] }); }
- That didn't work, Nardog (and I didn't tinker with it to find out why, tbh). Your version is a great improvement, though, as it made the cheat sheet context sensitive to current page and current user (by only listing assigned access keys). I tried using the tooltip instead of the element label, though, as it is usually more detailed, with the element name often being replaced with an icon on the screen (as is the case of Js/6tabs-vector users, such as myself), but to no avail. Oddly enough, tooltip yielded the same texts as aria-label--what gives?! — Guarapiranga ☎ 04:39, 4 June 2022 (UTC)
- You replaced lines 4–7 and not 26. A tooltip is
this.title
. I didn't use it because it's often too oblique. If you remove aria-label you get the entire content of the textarea when using it on the edit form btw. Nardog (talk) 06:43, 4 June 2022 (UTC)- You replaced lines 4–7 and not 26.
Right! Sorry. But... still to no avail. What am I still doing wrong? (Esc still working though.) - If you remove aria-label you get the entire content of the textarea when using it on the edit form btw.
I noticed. Not a huge problem, but can we combine it with this.title? My attempt at that--this.title.getAttribute('aria-label')--failed. Miserably. - A tooltip is this.title.
Great! I like the outcome.Only problem now is the box width. What element can I tack a .addClass('oo-ui-window-frame').css('width', '50%') to?
- My bad, the snippet should replace line 5. Again, you shouldn't remove aria-label. Try this. Nardog (talk) 10:09, 4 June 2022 (UTC)
- Perfect! Thanks, Nardog.
(Figured where to tack the css for the box width, btw (used 35em instead).
Cheers. — Guarapiranga ☎ 11:10, 4 June 2022 (UTC)- I don't think that's taking any effect. Notice I added
size: 'medium'
. Nardog (talk) 11:18, 4 June 2022 (UTC) - It's still hard for me to see how using tooltips is better. "Watchlist" is far more helpful than "The list of pages you are monitoring for changes". Nardog (talk) 11:20, 4 June 2022 (UTC)
- I don't think that's taking any effect. Notice I added
- Perfect! Thanks, Nardog.
- You replaced lines 4–7 and not 26.
- You replaced lines 4–7 and not 26. A tooltip is
- That didn't work, Nardog (and I didn't tinker with it to find out why, tbh). Your version is a great improvement, though, as it made the cheat sheet context sensitive to current page and current user (by only listing assigned access keys). I tried using the tooltip instead of the element label, though, as it is usually more detailed, with the element name often being replaced with an icon on the screen (as is the case of Js/6tabs-vector users, such as myself), but to no avail. Oddly enough, tooltip yielded the same texts as aria-label--what gives?! — Guarapiranga ☎ 04:39, 4 June 2022 (UTC)
- Huh, I thought Esc was enough.
- @Nardog: Nice approach. How do you turn
- @Guarapiranga: I don't appreciate this. Pasting a snippet here is a gesture that it is meant for you, the requester. If I'd intended it to be advertised like that I would have hosted it in my own userspace. I will not provide any more support on this script. Nardog (talk) 06:36, 5 June 2022 (UTC)
- Terribly sorry, Nardog; I thought I was being appreciative and respectful, giving credit was credit was due. No worries, I removed the topic. I also credited you in the script's help page; pls let me know if you wish to be removed from there too. — Guarapiranga ☎ 07:35, 5 June 2022 (UTC)
- Thanks, I appreciate it. Even though users are meant to install scripts at their own risk and the authors aren't legally liable for anything, hosting and advertising a script still comes with an implicit, informal obligation to ensure it works and causes no damage, which I'm not ready to provide for this script beyond just for you short-term. So I advise you to refrain from hosting or advertising a script that's not tried and tested unless you absolutely know what you're doing. Nardog (talk) 08:36, 5 June 2022 (UTC)
- Terribly sorry, Nardog; I thought I was being appreciative and respectful, giving credit was credit was due. No worries, I removed the topic. I also credited you in the script's help page; pls let me know if you wish to be removed from there too. — Guarapiranga ☎ 07:35, 5 June 2022 (UTC)
GAN review user script
- As a note, this request is just for GAR, but if you could do something similar for GAN (new nominations) you'd be my new best friend. I can give you the steps required if this is something you could do. Best Wishes, Lee Vilenski (talk • contribs) 22:05, 10 April 2022 (UTC)
- Sure. Happy to look into GAN promotion. Good idea on the steps, please share when you get a chance. –Novem Linguae (talk) 23:16, 10 April 2022 (UTC)
- We already have a userscript to nominate GAs, so this is just for closing nominations. Looking at what this would take, it's probably better as a userscript. Here's what I've got - let me know if this is something you can do, or if there is something we can pass on to do elsewhere. Here's the list from WP:GANI:
- Sure. Happy to look into GAN promotion. Good idea on the steps, please share when you get a chance. –Novem Linguae (talk) 23:16, 10 April 2022 (UTC)
- As a note, this request is just for GAR, but if you could do something similar for GAN (new nominations) you'd be my new best friend. I can give you the steps required if this is something you could do. Best Wishes, Lee Vilenski (talk • contribs) 22:05, 10 April 2022 (UTC)
Extended content
|
---|
If you determine that the article meets the good article criteria, you may pass it by doing the following:
If you determine that the article does not meet the good article criteria, you may fail it by doing the following:
|
I'd want a button, or instructions to add to the page for it to either pass, or fail. As far as I see it, passing requires:
- Replace the {{GA nominee}} template on the article talk page with
{{GA|~~~~~|topic=|page=}}
or{{GA|~~~~~|subtopic=|page=}}
, topic/subtopic/page should already be filled in, so no need to change. This may also need to be the same {{Article History}} as above, which is quite confusing to do manually. - Update class on {{WikiProject}} to GA.
- The big one is adding it to the suitable place on WP:GA. This is where I'd expect a userscript to be more beneficial, as it could list all of the places in this list, and where you should add the item. These are all in alphabetical order.
For a fail, it's simply just a case of changing {{GA nominee}} to {{Failed GA}}, or article history. Best Wishes, Lee Vilenski (talk • contribs) 14:53, 13 April 2022 (UTC)
- Looks good. I can do this one. You OK with a timeframe of several weeks? I gotta juggle GAR bot above and some other stuff. Also, the next time you do a promotion or two, instead of doing the steps yourself, can you ping me so I can practice? –Novem Linguae (talk) 09:52, 14 April 2022 (UTC)
- Sure. I've asked for a few different places, for a few years, so no drama. Anything you can get for me. I'll do a few reviews soon. Best Wishes, Lee Vilenski (talk • contribs) 10:42, 14 April 2022 (UTC)
- Novem Linguae - mind closing Talk:Washington State Route 292/GA1 for me? Best Wishes, Lee Vilenski (talk • contribs) 12:24, 24 April 2022 (UTC)
- I'll do another one, as I had to close that one. There were three edits involved with the closure, I can send diffs if this is also helpful. Best Wishes, Lee Vilenski (talk • contribs) 06:18, 26 April 2022 (UTC)
- No worries. Yeah let's do another one when it's convenient. –Novem Linguae (talk) 06:22, 26 April 2022 (UTC)
- Talk:Sora Amamiya/GA2 is to be closed. Best Wishes, Lee Vilenski (talk • contribs) 12:15, 9 May 2022 (UTC)
- Alright, I closed that one and took some notes. The fact that sub-subtopics (example: Wikipedia:Good articles/Media and drama#Actors, directors, models, performers, and celebrities) are not indicated in the {{GA}} template is a bit tricky, we will probably need to have the user pick the correct category from a dropdown box. I will probably write a script that places a link in the more menu to decline a GA as a first milestone, and then after that I will move on to promote. Do you want the script to also atop the GA page? –Novem Linguae (talk) 06:27, 10 May 2022 (UTC)
- Yeah, I think that's wise. Best Wishes, Lee Vilenski (talk • contribs) 06:31, 10 May 2022 (UTC)
- Alright, I closed that one and took some notes. The fact that sub-subtopics (example: Wikipedia:Good articles/Media and drama#Actors, directors, models, performers, and celebrities) are not indicated in the {{GA}} template is a bit tricky, we will probably need to have the user pick the correct category from a dropdown box. I will probably write a script that places a link in the more menu to decline a GA as a first milestone, and then after that I will move on to promote. Do you want the script to also atop the GA page? –Novem Linguae (talk) 06:27, 10 May 2022 (UTC)
- Talk:Sora Amamiya/GA2 is to be closed. Best Wishes, Lee Vilenski (talk • contribs) 12:15, 9 May 2022 (UTC)
- No worries. Yeah let's do another one when it's convenient. –Novem Linguae (talk) 06:22, 26 April 2022 (UTC)
- I'll do another one, as I had to close that one. There were three edits involved with the closure, I can send diffs if this is also helpful. Best Wishes, Lee Vilenski (talk • contribs) 06:18, 26 April 2022 (UTC)
- Novem Linguae - mind closing Talk:Washington State Route 292/GA1 for me? Best Wishes, Lee Vilenski (talk • contribs) 12:24, 24 April 2022 (UTC)
- Sure. I've asked for a few different places, for a few years, so no drama. Anything you can get for me. I'll do a few reviews soon. Best Wishes, Lee Vilenski (talk • contribs) 10:42, 14 April 2022 (UTC)
- FYI Firefly, who was planning to do a GAN bot at one point. * Pppery * it has begun... 21:06, 10 May 2022 (UTC)
- Good news. My real life job is calming down, I will probably be able to work on the user script this week. This one will be a bit challenging because I will need to figure out how to do a user interface, but I should be able to crack it. I will probably use Morebits or OOUI. –Novem Linguae (talk) 03:14, 7 June 2022 (UTC)
- Please use OOUI! 🐶 EpicPupper (he/him | talk) 03:16, 7 June 2022 (UTC)
- What do you like about OOUI? –Novem Linguae (talk) 03:20, 7 June 2022 (UTC)
- Same interface as regular MediaWiki, more modern, buttons bigger/easier to read. 🐶 EpicPupper (he/him | talk) 03:31, 7 June 2022 (UTC)
- What do you like about OOUI? –Novem Linguae (talk) 03:20, 7 June 2022 (UTC)
- Please use OOUI! 🐶 EpicPupper (he/him | talk) 03:16, 7 June 2022 (UTC)
- Good news. My real life job is calming down, I will probably be able to work on the user script this week. This one will be a bit challenging because I will need to figure out how to do a user interface, but I should be able to crack it. I will probably use Morebits or OOUI. –Novem Linguae (talk) 03:14, 7 June 2022 (UTC)
Lee Vilenski. Alright, the GANReviewTool user script is mostly done. For passes and fails, it adds {{atop}} and it removes {{GA nominee}}. For passes, it also adds {{GA}} or adds an entry to the {{Article history}}. For fails, it also adds {{FailedGA}}. I haven't coded adding the GA to WP:GA yet, I may work on that tomorrow. The user script is ready for testing, by you, by third parties, and by feeding me GANs to close. Please report all bugs and feature requests. This one could get popular, so would be good to test it thoroughly and iterate on any issues we find. Let me know your thoughts. –Novem Linguae (talk) 08:36, 8 June 2022 (UTC)
Hide username
Hello. I would like to be pointed to a userscript that hides my username, which is conspicuously placed in the top right area of the page on the Vector skin. I surprisingly can't find anything except an old Greasemonkey script that doesn't seem to work. Thanks DemonDays64 (talk•contribs) 23:45, 1 June 2022 (UTC) (please ping on reply)
- @DemonDays64: You can do that with CSS:
#pt-userpage { display: none; }
- ...or with JS:
$('#pt-userpage').remove();
- You probably know what to do with these. NguoiDungKhongDinhDanh 23:51, 1 June 2022 (UTC)
- @NguoiDungKhongDinhDanh: hmm i was thinking more like replacing the text with "User" so someone glancing wouldn't see it. I guess replacing inner HTML of that element with JS would work? DemonDays64 (talk•contribs) 10:43, 9 June 2022 (UTC) (please ping on reply)
- @DemonDays64: If you just want to replace the text, use
$('#pt-userpage span').text('User');
. If you also want to and remove the link, use$('#pt-userpage').text('User');
. NguoiDungKhongDinhDanh 12:39, 9 June 2022 (UTC)- @NguoiDungKhongDinhDanh: awesome, works great thanks DemonDays64 (talk•contribs) 06:40, 10 June 2022 (UTC)
- You can do Nardog (talk) 14:30, 9 June 2022 (UTC)
#pt-userpage a::before { content: "User"; } #pt-userpage span { display: none; }
- @DemonDays64: If you just want to replace the text, use
- @NguoiDungKhongDinhDanh: hmm i was thinking more like replacing the text with "User" so someone glancing wouldn't see it. I guess replacing inner HTML of that element with JS would work? DemonDays64 (talk•contribs) 10:43, 9 June 2022 (UTC) (please ping on reply)
User logs
Is there a user script that we can use to find the csd log, xfd log, prod log, drafify log of any user, without going to their find their user subpages? For example, we arrive on a user page, and then we see links to the respective logs. Is such a user script available? Itcouldbepossible Talk 05:27, 2 June 2022 (UTC)
- What do you mean by
the csd log, xfd log, prod log, drafify log
? Do you have an example? Nardog (talk) 09:30, 2 June 2022 (UTC)- @Nardog They are logs generated by twinkle. Like this is my CSD log, this is my XFD or AFD log, this is my PROD and this is my draftify log. Could I make myself clear? Itcouldbepossible Talk 14:15, 2 June 2022 (UTC)
- This one would be pretty easy. 1) Do you just want them in the left sidebar under tools? 2) OK to display the link even if the page doesn't exist, or does it need to check if the page exists? I have another script that when visiting user pages adds links to the left menu under tools, called User:Novem Linguae/Scripts/Links.js, that I could use as a base. –Novem Linguae (talk) 06:46, 10 June 2022 (UTC)
- Hi Novem and thanks for replying. Can you customize scripts? You can make it in a way that checks if the pages exist or not. And in the scripts you can add links to the CSD, XFD, AFD, PROD log of any user (if they exist, not as red links), and also to the common.js,global.js and global auth of the user, which already exists in your script. Can you make it that way? I use many of your scripts also. Itcouldbepossible Talk 13:27, 10 June 2022 (UTC)
- @Itcouldbepossible. Hey there. I went ahead and added this feature to User:Novem Linguae/Scripts/Links.js. Feel free to install and try it out. –Novem Linguae (talk) 19:15, 10 June 2022 (UTC)
- @Novem Linguae Wow!!! Thanks a lot. It does work great. I saw the diffs of the edit you made, but did not understand a thing. What talent!! I am using the script now, only that the 'subpages' link is unnecessary, since it is already there in the more menu. What others scripts do you have? I want to try all out. I use your visual editor everywhere script. Thanks for all your hard work and spending time to re-code you script. Itcouldbepossible Talk 15:10, 11 June 2022 (UTC)
- @Itcouldbepossible. My pleasure. Thanks for the barnstar. I don't have a "subpages" link in my "More" menu so maybe that is being placed there by a user script you have installed. You can check out the rest of my user scripts at User:Novem Linguae/Templates/Scripts. Enjoy my friend. –Novem Linguae (talk) 15:57, 11 June 2022 (UTC)
- @Novem Linguae Sorry for not being clear. I was talking about MediaWiki:Gadget-MoreMenu.enwiki.js, which is also available on the Meta Wiki. I was talking about the subpages section under "Page" menu. It looks like this:
- Itcouldbepossible Talk 01:56, 13 June 2022 (UTC)
- @Itcouldbepossible. My pleasure. Thanks for the barnstar. I don't have a "subpages" link in my "More" menu so maybe that is being placed there by a user script you have installed. You can check out the rest of my user scripts at User:Novem Linguae/Templates/Scripts. Enjoy my friend. –Novem Linguae (talk) 15:57, 11 June 2022 (UTC)
- @Novem Linguae Wow!!! Thanks a lot. It does work great. I saw the diffs of the edit you made, but did not understand a thing. What talent!! I am using the script now, only that the 'subpages' link is unnecessary, since it is already there in the more menu. What others scripts do you have? I want to try all out. I use your visual editor everywhere script. Thanks for all your hard work and spending time to re-code you script. Itcouldbepossible Talk 15:10, 11 June 2022 (UTC)
- @Itcouldbepossible. Hey there. I went ahead and added this feature to User:Novem Linguae/Scripts/Links.js. Feel free to install and try it out. –Novem Linguae (talk) 19:15, 10 June 2022 (UTC)
- Hi Novem and thanks for replying. Can you customize scripts? You can make it in a way that checks if the pages exist or not. And in the scripts you can add links to the CSD, XFD, AFD, PROD log of any user (if they exist, not as red links), and also to the common.js,global.js and global auth of the user, which already exists in your script. Can you make it that way? I use many of your scripts also. Itcouldbepossible Talk 13:27, 10 June 2022 (UTC)
- This one would be pretty easy. 1) Do you just want them in the left sidebar under tools? 2) OK to display the link even if the page doesn't exist, or does it need to check if the page exists? I have another script that when visiting user pages adds links to the left menu under tools, called User:Novem Linguae/Scripts/Links.js, that I could use as a base. –Novem Linguae (talk) 06:46, 10 June 2022 (UTC)
- @Nardog They are logs generated by twinkle. Like this is my CSD log, this is my XFD or AFD log, this is my PROD and this is my draftify log. Could I make myself clear? Itcouldbepossible Talk 14:15, 2 June 2022 (UTC)
Script to click on backlinks on common.js files
Is there any script that can be used to click on the 'backlinks' that are available in the common.js files? Copying the whole link and opening it elsewhere is a little time consuming. If it is not there, then can such a thing be made? Itcouldbepossible Talk 14:19, 23 June 2022 (UTC)
- User:Erutuon/scripts/CodeLinks should do what you want. Rummskartoffel 16:38, 23 June 2022 (UTC)
- Thanks, the script solved my problems. Itcouldbepossible Talk 08:04, 24 June 2022 (UTC)
- @RummskartoffelOops, forgot the ping! Itcouldbepossible Talk 08:04, 24 June 2022 (UTC)
Forks search link
I see script forking has sprawled across WP (which is a good thing, and of which I too am guilty of contributing to). Nowadays, whenever installing a new script, finding a bug on a script I use, or longing for some new feature or improvement, I look for forks by simply searching scripts with the same name (don't change the script's name, if you want your fork to be found--and vice-versa!--I guess). I wonder whether we could help each other finding forks by indexing them, as we do with original scripts in WP:US/L and WP:USRANK. One (albeit small) step in that direction would be to simply add a forks link next to the scripts links, as scriptInstaller does with a link to install. I might do this at some point, but wanted to put it out there, in case anyone wishes to leap ahead of me. Cheers. — Guarapiranga ☎ 04:27, 2 June 2022 (UTC)
- @Guarapiranga, I typically add
// Fork of [[foo]]
at the top, adding it to WLH. ― Qwerfjkltalk 21:20, 26 June 2022 (UTC)
Scripts Panel
I endeavoured to improve upon MusikAnimal's scriptManager with a scripts panel by, rather than having users explicitly declare each script to be 'managed' in their common.js, simply read from their common.js which scripts they disabled. The idea is to complement scriptInstaller in a way that all installed scripts, both enabled and disabled, are everywhere accessible on the left panel (just where MusikAnimal put it), and be able, from any page, to enable, permanently or temporarily, disable and even uninstall any installed script. But, as a js rookie, I hit a wall getting mw js to read common.js as text file. Would anyone here like to have a look and point me in the right direction (please feel free to edit the code there directly too). Cheers. — Guarapiranga ☎ 23:42, 1 June 2022 (UTC)
- @Guarapiranga, I'm sure there's a better way, but if all else fails, you could just use the parse/expandtext modules on or
{{(subst:)User:PAGE}}
Qwerfjkltalk 21:25, 26 June 2022 (UTC){{(subst:)#invoke:Page|getContent|User:PAGE|as=raw}}
- Thanks for the suggestions, Qwerfjkl (is that really :), or is it an autocorrected smiley?), but, naturally, the script is in js, not wikicode. What I'm looking for is something more along the lines of what Nardog was talking about here though. — Guarapiranga ☎ 22:24, 26 June 2022 (UTC)
A script to remove dates and regroup edits in the watchlist
I don't have much use for the dates in the watchlist, and would like to regroup the edits by page. Hiding the dates is easy enough with css (h4 {display: none}
), but regrouping the edits by page doesn't seem to trivial. Does anyone have a script for that? I had a look at The_Transhumanist's WatchlistSorter, which regroups by namespace, but it's targeted at the old (non-enhanced watchlist). Can the same be done with the new watchlist, or am I stuck with meddling with the old one? Cheers. — Guarapiranga ☎ 02:07, 29 July 2022 (UTC)
- @Guarapiranga, click the gear button on the right-hand side and then "group results by page"? czar 03:59, 29 July 2022 (UTC)
- Yes, I have that on, Czar, so the edits are grouped by date then by page. But I have no use for the date grouping; I just see the same page repeated on various dates. I feel there must be an easy way of resorting the
<td>
entries, once the<h4>
dates are removed, and merging them bytitle
orhref
. — Guarapiranga ☎ 04:15, 29 July 2022 (UTC)
- Yes, I have that on, Czar, so the edits are grouped by date then by page. But I have no use for the date grouping; I just see the same page repeated on various dates. I feel there must be an easy way of resorting the
- Removing the dates is phab:T10681. See also related tasks.
- I suspect if you want to fuss with it today you will need to deal in the old view. IznoPublic (talk) 14:56, 30 July 2022 (UTC)
Timestamp anchors in talk pages
I've been using Evad37's excellent TimestampDiffs script to effectively link comments in talk pages, but what would be most useful, instead of sending the reader to a diff page, is simply put anchors in the timestamps, and be able to link them in the comment. Is there a script already that does that? I couldn't find any at either WP:USLIST or WP:USRANK. Incidentally, it seems to me that this would be an easier job than what Evad37 did in TimestampDiffs, as the script wouldn't have to parse the history page at all. If it could jig the css to shade the linked comment, that'd be a bonus! — Guarapiranga ☎ 23:51, 20 July 2021 (UTC)
- That makes little sense. Such links won't work unless everyone installs the same script. Nardog (talk) 23:54, 20 July 2021 (UTC)
- Could the anchor links perhaps be made accessible to anyone by putting a templatestyle on the page? — Guarapiranga ☎ 01:54, 21 July 2021 (UTC)
- No, anchors cannot be added via CSS. Nardog (talk) 02:22, 21 July 2021 (UTC)
- Right! Pity timestamps aren't anchored already. — Guarapiranga ☎ 05:56, 21 July 2021 (UTC)
- ... like that. — Guarapiranga ☎ 06:09, 21 July 2021 (UTC)
- That would result in invalid HTML if multiple comments were made within the same minute on the same page. You may give them unique IDs with serial numbers, but then that would result in links pointing to different comments than intended after they are archived. Besides, it's hardly useful to jump to a signature, which is at the very bottom of the comment. But on the flip side, it's often not easy to determine with certainty where a comment begins. Talk pages are in such chaos that I've come to feel any attempt to improve the experience client-side is a fool's errand... Nardog (talk) 17:58, 21 July 2021 (UTC)
- ... like that. — Guarapiranga ☎ 06:09, 21 July 2021 (UTC)
- Right! Pity timestamps aren't anchored already. — Guarapiranga ☎ 05:56, 21 July 2021 (UTC)
- No, anchors cannot be added via CSS. Nardog (talk) 02:22, 21 July 2021 (UTC)
- Could the anchor links perhaps be made accessible to anyone by putting a templatestyle on the page? — Guarapiranga ☎ 01:54, 21 July 2021 (UTC)
- I just realised c:Convenient Discussions already does that! So there, TWIMC, that answers my question:
Is there a script already that does that?
There is: c:Convenient Discussions. — Guarapiranga ☎ 06:30, 21 July 2021 (UTC) - @Guarapiranga Hi, it appears the reply tool subscribe function gives a link like this (from the notification panel): https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)?markasread=226456919&markasreadwiki=enwiki#c-Rummskartoffel-2021-08-28T11:53:00.000Z-Shushugah-2021-08-27T22:10:00.000Zto
Not sure if this helps. ― Qwerfjkltalk 12:01, 28 August 2021 (UTC) - I guess this is Done. See m:User:ESanders (WMF)/commentlinks.js. NguoiDungKhongDinhDanh 13:49, 18 March 2022 (UTC)
- And Bawl does this as well, using the same format/method as Convenient Discussions. And comments that were posted with Bawl have their signature wrapped in a span that also works as an anchor. — Alexis Jazz (talk or ping me) 18:59, 13 August 2022 (UTC)
Category blocking
Hello! I was wondering if it would be possible for someone to develop a script to make it easier to block specific users listed in a category? I would envision this being something like how SPI handles it with check boxes to select specific users. I seem to remember Enterprisey has something similar before for mass blocking, but I can't find it anymore...posting here per Enterprisey. --TheSandDoctor Talk 06:31, 3 April 2022 (UTC)
- @TheSandDoctor: Try this one: User:NguoiDungKhongDinhDanh/Angrenamer.js. NguoiDungKhongDinhDanh 02:09, 5 April 2022 (UTC)
- @NguoiDungKhongDinhDanh: That is a fantastic start & a wonderful birthday present, thank you so much! Would it be possible for it to mimic Twinkle's softerblock by default (Example TP message) with this example summary? --TheSandDoctor Talk 16:03, 5 April 2022 (UTC)
- @TheSandDoctor: Done (diff). NguoiDungKhongDinhDanh 18:37, 5 April 2022 (UTC)
- @NguoiDungKhongDinhDanh: That's exactly what I want. Thank you so much for creating that! That will save me loads of time in the long run. Please let me know if you plan to rename the script or whatnot so that I can make sure I'm still importing the right thing. I'll let you know if I think of any other tweaks. --TheSandDoctor Talk 20:58, 5 April 2022 (UTC)
- @TheSandDoctor: Done (diff). NguoiDungKhongDinhDanh 18:37, 5 April 2022 (UTC)
- @NguoiDungKhongDinhDanh: That is a fantastic start & a wonderful birthday present, thank you so much! Would it be possible for it to mimic Twinkle's softerblock by default (Example TP message) with this example summary? --TheSandDoctor Talk 16:03, 5 April 2022 (UTC)
- @TheSandDoctor: is there are confirmation for each user/mass confirmation built in the script? I would hate for someone to be blocked because they were miscategorized. Headbomb {t · c · p · b} 01:03, 6 April 2022 (UTC)
- @Headbomb: That’s a valid concern. When I use it I manually review each one prior to even checking the box. It just allows me to streamline the process a bit, but the way I use it adds little risk. —TheSandDoctor (mobile) (talk) 04:08, 6 April 2022 (UTC)
- TheSandDoctor, as an additional tool you might want to try Bawl. It won't help if you need to block hundreds of users, but you can block users one-by-one relatively quickly: go to the talk page of the user in question, open Bawl (new section or comment), press the magnifying glass, pick a block duration, optionally check "sending email" and/or "editing own talk page", enter some message (you can add your favorite block templates as custom inserts to insert those with one click) and submit.
Main advantages: no need to visit Special:Block separately, no need to leave the page, no need to look up and/or copy-paste and/or remember some substitution template for your favorite block template, a diff link for your edit to the talk page gets included in the block reason. — Alexis Jazz (talk or ping me) 19:40, 13 August 2022 (UTC)
Page blanker script
Is there a script that blanks an entire page by click of button? Possibly with a confirmation button just so that a mistaken hit on the button doesn't blank the whole page. Thanks! —CX Zoom[he/him] (let's talk • {C•X}) 18:33, 4 June 2022 (UTC)
- @CX Zoom: See m:User:NhacNy2412/BlankedThePage.js (its fork). However, this script should be bundled in other things as it is quite simple and short; for instance, see this dashboard of mine. NguoiDungKhongDinhDanh 23:18, 4 June 2022 (UTC)
- CX Zoom, User:Alexis Jazz/Bawl/Custom inserts and replacements#Page blanking — Alexis Jazz (talk or ping me) 21:25, 13 August 2022 (UTC)
A user script to make formatted edit requests
See this request. If there were a script that somehow made it easier to submit requests formatted like that, I'm sure people would like it. Enterprisey (talk!) 06:47, 1 October 2021 (UTC)
- @Enterprisey Since edits are usually done in a sandbox, it's easy to generate a Special:ComparePages link that shows the diff – a while ago, I created Template:Sandboxed edit request to facilitate doing this easily. Not sure how a script can help. – SD0001 (talk) 07:43, 1 October 2021 (UTC)
- Yeah, the idea is to show the diff table itself, to avoid having to click on a link. Enterprisey (talk!) 01:51, 2 October 2021 (UTC)
- It would be nice if, for simple edit requests (not just template requests), You could use the script to "edit" the articles, but instead of saving the edit, it would post a formatted edit request. ― Qwerfjkltalk 07:20, 2 October 2021 (UTC)
- That sounds like quite an idea. Parallely, it would be good to have a tool for responders to apply the suggested edit in two clicks (one for generating the edit, another for confirming it). – SD0001 (talk) 09:01, 4 October 2021 (UTC)
- @SD0001 Hopefully, that could be implemented in the.main edit request script, User:Jackmcbarn/editProtectedHelper. ― Qwerfjkltalk 17:57, 25 October 2021 (UTC)
- That sounds like quite an idea. Parallely, it would be good to have a tool for responders to apply the suggested edit in two clicks (one for generating the edit, another for confirming it). – SD0001 (talk) 09:01, 4 October 2021 (UTC)
- @Enterprisey, @SD0001: I found Module:Diff, which might help. ― Qwerfjkltalk 09:44, 1 April 2022 (UTC)
- Enterprisey, not a script, but {{Request edit button}} can be helpful. — Alexis Jazz (talk or ping me) 18:22, 13 August 2022 (UTC)
- Interesting, that's handy. Enterprisey (talk!) 01:10, 14 August 2022 (UTC)
FormattedEditRequest.js
@Enterprisey, SD0001, and Qwerfjkl: See User:NguoiDungKhongDinhDanh/FormattedEditRequest.js. Sometimes it gets stuck when encountering JS pages/Lua modules like User:Alexis Jazz/Bawl-test.js or Module:Citation/CS1 (I don't know why yet), but in general it does work. NguoiDungKhongDinhDanh 19:58, 1 April 2022 (UTC)
- @NguoiDungKhongDinhDanh: Yet again, the copy function doesn't work for me :( . If it helps, I have some code at User:Qwerfjkl/scripts/copy.js that seems to work for me. Thanks for putting the time in to make this! ― Qwerfjkltalk 20:51, 1 April 2022 (UTC)
- @Qwerfjkl: I guess that's because your browser doesn't support
navigator.clipboard.writeText()
(caniuse). Let's see what I can do... NguoiDungKhongDinhDanh 20:57, 1 April 2022 (UTC) - @Qwerfjkl: Try again. If this doesn't work I'll have to create a third button. NguoiDungKhongDinhDanh 21:27, 1 April 2022 (UTC)
- @NguoiDungKhongDinhDanh: The cactions link doesn't appear any more. ― Qwerfjkltalk 21:37, 1 April 2022 (UTC)
- @Qwerfjkl: It won't appear when you're at a non-exist or editable page. Also, you should be viewing the page. NguoiDungKhongDinhDanh 21:40, 1 April 2022 (UTC)
- @NguoiDungKhongDinhDanh: Template:If then show work for you? ― Qwerfjkltalk 21:42, 1 April 2022 (UTC)
- @Qwerfjkl: Surprisingly no. Try again now. NguoiDungKhongDinhDanh 21:47, 1 April 2022 (UTC)
- Thanks, it works now. ― Qwerfjkltalk 21:51, 1 April 2022 (UTC)
- @Qwerfjkl: Surprisingly no. Try again now. NguoiDungKhongDinhDanh 21:47, 1 April 2022 (UTC)
- @NguoiDungKhongDinhDanh: Template:If then show work for you? ― Qwerfjkltalk 21:42, 1 April 2022 (UTC)
- @Qwerfjkl: It won't appear when you're at a non-exist or editable page. Also, you should be viewing the page. NguoiDungKhongDinhDanh 21:40, 1 April 2022 (UTC)
- @NguoiDungKhongDinhDanh: The cactions link doesn't appear any more. ― Qwerfjkltalk 21:37, 1 April 2022 (UTC)
- @Qwerfjkl: I guess that's because your browser doesn't support
Script to automatically change citoid generated citations to cs2
After citoid generates a cs1 citation from a link and after the user presses the "insert" button, the script would automatically change the template name to citation instead of cite news/books/url Aaron Liu (talk) 17:43, 13 August 2022 (UTC)
{{cite url}}
is a redirect to{{cite web}}
. Does citoid actually create{{cite url}}
templates? It probably shouldn't...- Changing the template name from cs1
{{cite <whatever>}}
to cs2{{citation}}
is problematic. There are a lot of cs1 templates and cs1-look-a-like wrapper-templates that may break because{{citation}}
does not natively support all cs1-template formatting. Instead of changing the template name, it might be better to add|mode=cs2
to the cs1 (or cs1-look-a-like) template (many wrapper templates support this parameter). Doing this will cause Module:Citation/CS1 to render the citation using cs2 styling. Of course, if you are getting your citoid template from ve, wouldn't it save a step to just have ve create a{{citation}}
template in the first place? - —Trappist the monk (talk) 18:08, 13 August 2022 (UTC)
- No, my mistake.
- Citoid generated ones won't be broken by citation
- (last sentence) That's a bit tricky, see Wikipedia:Village pump (proposals) § Add citation style 2 to the visual editor Aaron Liu (talk) 18:20, 13 August 2022 (UTC)
-
- Crikey; only
{{cite book}}
,{{cite journal}}
,{{cite news}}
, and{{cite web}}
? And this from the 'flagship' editor? Yet another reason to not use ve. - I guess it depends on where the template is when it is converted. If the template is converted before it is placed in the article then I suspect that you are correct that there won't be any issues. If the conversion happens after placement, the script must then somehow know which template(s) you want converted.
- Still, if you want cs2 style,
|mode=cs2
is available in the TemplateData for{{cite book}}
and you can add the parameter to{{cite journal}}
,{{cite news}}
, and{{cite web}}
. - —Trappist the monk (talk) 19:11, 13 August 2022 (UTC)
- Crikey indeed. I don't have the permissions though. Aaron Liu (talk) 19:24, 13 August 2022 (UTC)
- Crikey; only
- Aaron Liu, Trappist the monk, Citoid gets its information from MediaWiki:Citoid-template-type-map.json and the templatedata from the templates listed there. See for example the
"maps": { "citoid": {
section from {{Cite web}}.
Bawl uses m:Web2Cit and gets its information from Wikipedia:Citemap.json. I'm not sure what you expect, but maybe a module could be written to achieve it. — Alexis Jazz (talk or ping me) 21:24, 14 August 2022 (UTC)
Also move articles and sub-categories when moving a category
Do you guys have any scripts that combine Cat-a-lot and SpecialːMove?
UnnamedUser 20:43, 17 July 2021 (UTC)
- <jk>No, you idiot. Go and write one for your own.</jk> NguoiDungKhongDinhDanh 13:47, 18 March 2022 (UTC)
- NguoiDungKhongDinhDanh, if you forced/forked User:Alexis Jazz/LuckyRename to run on categories it might actually accidentally do this. — Alexis Jazz (talk or ping me) 18:52, 13 August 2022 (UTC)
- That sounds eerily nice. If I have some free times I'll try. NguoiDungKhongDinhDanh 08:15, 15 August 2022 (UTC)
Script that adds the possibility to give template-replies with 1 button
How I am picturing it: A button appears beside the [[Reply]] link which when pressed opens up a list to choose from with templates such as {{Done}}, {{Read}}, {{Partly done}}, and many more. - Klein Muçi (talk) 12:57, 23 May 2022 (UTC)
- I like it. What about if we kept the reply interface, but just like "@" brings up a list of users to ping, "{" brings up a list of templates like {{done}}? Or we could copy what Confluence does, which is "/" to bring up a list of templates, but I imagine the curly brace would be a lot more familiar to experienced editors. Enterprisey (talk!) 17:00, 23 May 2022 (UTC)
- @Enterprisey, first of all, I think you would be interested in knowing this exists. Maybe you want to have this conversation elsewhere.
- As for your proposal, it is much more elegant than what I had in mind so I like it more but I wouldn't go for the curly brace as that seems too general and I already use that for setting up templates in discussions which I don't think would be part of that preformatted template list we're talking about (for example {{tl}}). I'd feel the same for any kind of brackets for the same reason. From what you proposed, I'd be more inclined towards the slash. - Klein Muçi (talk) 17:18, 23 May 2022 (UTC)
- One of my user scripts changes the ugly [[Reply]] link to a nice friendly icon. Others have done similar things, so perhaps we could push for something like that to become standard. It would then be "tidy" to have a second icon which pops a (user configurable) list of standard replies. Since this second icon would probably be a minority thing, it should probably be kept as a user script and the other changes to the reply/edit gadgets kept as a change request over in MediaWiki or Phab — GhostInTheMachine talk to me 19:47, 23 May 2022 (UTC)
- @GhostInTheMachine, I believe there are already plans to change the text link to an icon. Plans that, although I like buttons instead of links, I wasn't particularly fond of. Having said all that, the "icon vs text" matter looks like it is a bit off topic here, although I do understand the "bigger picture approach", especially given that I've started that aforementioned discussion at MediaWiki. The list of premade standard answers looks like a nice idea (mentors already have such a feature if I'm not wrong) but it is not exactly what I had in mind. I was talking specifically about having all this list + more similar templates incorporated in a dropdown or a popup kind of menu, facilitating things such as informing that I'll respond later, marking things as resolved, agreeing to aforementioned opinions, etc. My idea would be a subset of your idea which also allows for premade free-text presets. All in all, it looks like your idea would help with semi-autoanswering some FAQ, while I'm hoping for a JS helper "similar" to WikiLove to be able to utilize those said templates swiftly. - Klein Muçi (talk) 20:37, 23 May 2022 (UTC)
- Klein Muçi, Enterprisey, GhostInTheMachine, User:Alexis Jazz/Bawl/Custom inserts and replacements#Tell users to read the FAQ in two clicks/taps? — Alexis Jazz (talk or ping me) 20:38, 13 August 2022 (UTC)
- @Alexis Jazz, that's a nice thing to have and a good step towards my idea above. :) - Klein Muçi (talk) 10:09, 15 August 2022 (UTC)
Script that makes autowatchlisting pages temporary
Simple version: Make it so that each page that gets watchlisted, except those created by me, get watchlisted only temporary. Time can be adjustable.
Advanced version: Make it so we have full customization on what exceptions can be and make the time adjustable per category. Allow for adjustable time for specific entries if so needed. - Klein Muçi (talk) 12:09, 15 May 2022 (UTC)
- User:Rummskartoffel/auto-watchlist-expiry should fit your "simple version" criteria, except that you will have to manually select "permanent" using the dropdown when creating pages. Rummskartoffel 21:30, 16 May 2022 (UTC)
- @Rummskartoffel, thank you! I think I've applied your instructions correctly for use outside of EnWiki (was thinking of trying it on my homewiki and if it worked nicely maybe I could use it as a global script on Meta) but it still isn't working. Can you take a look here and see if I'm doing anything wrong?
- And just so other people are clear, what I mean in the advanced version is basically this script + exceptions with customizable times like "make everything temporary for 1 month except pages I delete which need to be watched permanently and pages I create which need to be temporary for 2 weeks". - Klein Muçi (talk) 23:15, 16 May 2022 (UTC)
- @Klein Muçi: You didn't do anything wrong, I forgot to mention the script didn't work with the 2017 source editor, which seems to be the one you're using. But try it again now – adding support for that had been a to-do of mine anyway, and it was surprisingly easy. Rummskartoffel 18:25, 17 May 2022 (UTC)
- @Rummskartoffel, yes, it does work now. Thank you! Is there any possibility you might also take into consideration the exception cases? No problem if not, what you currently gave me was what I've been looking for a long time. - Klein Muçi (talk) 15:51, 18 May 2022 (UTC)
- @Klein Muçi: I don't want to make any promises, but I might give it a shot a few days from now. If I do implement it, I'll be sure to drop you a note. Rummskartoffel 17:06, 18 May 2022 (UTC)
- @Rummskartoffel, thank you, I'd be grateful. :) - Klein Muçi (talk) 21:46, 18 May 2022 (UTC)
- @Klein Muçi: I don't want to make any promises, but I might give it a shot a few days from now. If I do implement it, I'll be sure to drop you a note. Rummskartoffel 17:06, 18 May 2022 (UTC)
- @Rummskartoffel, yes, it does work now. Thank you! Is there any possibility you might also take into consideration the exception cases? No problem if not, what you currently gave me was what I've been looking for a long time. - Klein Muçi (talk) 15:51, 18 May 2022 (UTC)
- @Klein Muçi: You didn't do anything wrong, I forgot to mention the script didn't work with the 2017 source editor, which seems to be the one you're using. But try it again now – adding support for that had been a to-do of mine anyway, and it was surprisingly easy. Rummskartoffel 18:25, 17 May 2022 (UTC)
- Klein Muçi, Bawl is smarter than average when it comes to watchlisting. It will never decrease watch time, so if you manually put your own pages on your watchlist without expiration they won't be touched. Bawl also supports additive watch expiration: have N days added to the expiration with every edit. So if you edit a page more than once you watch it for longer. — Alexis Jazz (talk or ping me) 20:33, 13 August 2022 (UTC)
- @Alexis Jazz, it sure looks interesting and I'll give Bawl a more thorough look very soon after typing this comment. I believe however that the "lite" feeling Rummskartoffel's script offers in watchlisting suits me personally better given that my main aim is to keep it from growing too much (make it hard to add things to it because I rarely use it) while the way you describe Bawl makes you think that it has been devised with the contrary on the mind, although I do understand that it can be very well used for both sides. - Klein Muçi (talk) 10:14, 15 August 2022 (UTC)
Highlight comments on hover
Would it be possible to have a user scripts that allows comments on discussions (think talk pages) to be highlighted once you hover over them with your mouse? That way you can see where a certain comment starts and ends. - Klein Muçi (talk) 00:39, 21 April 2022 (UTC)
- @Klein Muçi: CD does that, but with all comments. NguoiDungKhongDinhDanh 00:53, 21 April 2022 (UTC)
- @NguoiDungKhongDinhDanh, what do you mean with "all comments"?
- CD is good it's just that I am too fond of the reply tool and all I wouldn't want to deactivate it. :/ - Klein Muçi (talk) 01:20, 21 April 2022 (UTC)
- @Klein Muçi: Then try adding this to your .css. NguoiDungKhongDinhDanh 01:36, 21 April 2022 (UTC)
- @NguoiDungKhongDinhDanh, just tried it. Now I understand what you meant with "all comments". It's highlighting them all the time. XD This is a bit confusing for me. I wanted the highlight to happen only when hovering over them. Also it doesn't work on discussion pages that aren't in the talk namespace, like the village pump, etc. = Klein Muçi (talk) 09:24, 21 April 2022 (UTC)
- You could try modifying the css using the
:hover
tag. I tried doing that, but it didn't exactly work. — PerfectSoundWhatever (t; c) 15:16, 30 April 2022 (UTC)
- You could try modifying the css using the
- @NguoiDungKhongDinhDanh, just tried it. Now I understand what you meant with "all comments". It's highlighting them all the time. XD This is a bit confusing for me. I wanted the highlight to happen only when hovering over them. Also it doesn't work on discussion pages that aren't in the talk namespace, like the village pump, etc. = Klein Muçi (talk) 09:24, 21 April 2022 (UTC)
- @Klein Muçi: Then try adding this to your .css. NguoiDungKhongDinhDanh 01:36, 21 April 2022 (UTC)
- That'd be a nice feature (and sounds totally feasible with
:hover
). — Guarapiranga ☎ 05:37, 15 May 2022 (UTC)- Here's a start... Add this to your stylesheet, Klein Muçi:— Guarapiranga ☎ 05:20, 23 May 2022 (UTC)
dl:hover {background:#fff6d5} dd:hover {background:#c8fb7b}
- @Guarapiranga, thank you! That does seem to give the needed effect. I believe there are only 2 things lacking:
- When the general discussion highlight happens the post that actually started the discussion doesn't. It should.
- If the discussion has grown long enough to have outdenting the "script" will break. It doesn't understand outdenting and will treat the outdented part as a new discussion. It shouldn't.
- I'd say it wouldn't understand subsections either (=== Text ===) but I don't know if there is hope to ever understand them because how would it be able to differentiate a discussion from an article then? However I believe something can be done about the 2 points above? - Klein Muçi (talk) 06:26, 23 May 2022 (UTC)
- It also activates in Special:RecentChanges, the table on the right where it shouldn't. I suppose there may be other false positives like this. - Klein Muçi (talk) 12:40, 23 May 2022 (UTC)
- How about that:
p:hover, dl:hover, dd:hover {background:#d7eef4}
- Yeah, that was just a proof of concept. To have a more complete solution, I'm afraid css will not suffice; you'll really need a js script (also to make sure it's only enabled in talk pages). That's bc talk pages are not perfectly structured. Their current structure is like:
<h2>title</h2> <p>OP</p> <dl> <dd>comment</dd> <dd>comment</dd> <dl> <dd>comment</dd> <dd>comment</dd> <dd>comment</dd> </dl> </dl>
- — Guarapiranga ☎ 23:40, 23 May 2022 (UTC)
- @Guarapiranga, this feels like a regress because it only highlights single, individual comments but on the other side, it's not broken like the other option (beside the false positives on the other pages). I'm grateful for your help anyway because anything is better than nothing. Just trying to provide direct comments in hope that they may help someone improve it in the future. - Klein Muçi (talk) 04:13, 24 May 2022 (UTC)
- No worries, Klein Muçi.
- this feels like a regress because it only highlights single, individual comments
So what you're after is for the whole topic, not single comments, to be highlighted upon hovering? Isn't the topic beginning and end clearly marked by their titles (inh2
format)? — Guarapiranga ☎ 04:50, 24 May 2022 (UTC)- @Guarapiranga, originally I was after individual comment highlighting. But after what you gave me, I enjoyed the idea of having a double highlighting feature. One for the full topic (post + comments) and, on top of that, one for individual comments. - Klein Muçi (talk) 05:00, 24 May 2022 (UTC)
- This is the closest I could get to that was:It'll highlight the OP cyan when hovering over it, and yellow the comments below, and it'll highlight cyan a comment when hover it as well as the comments replying to it. Sometimes it breaks when a comment includes multiple lines, and it definitely can't distinguish talk pages from others (but that it highlights paragraphs you're hovering over in article pages is a feature, not a defect 😅). At some point, css did include a
p:hover + dl, dl:hover {background:lightyellow} p:hover, p:hover + p, dd:hover {background:lightcyan}
@document
selector to match an url or part thereof, but it has since been retired and deprecated. Beyond this, js is definitely required. — Guarapiranga ☎ 00:19, 25 May 2022 (UTC)- @Guarapiranga, haha I must say this kinda feels a bit intrusive though, firing up everywhere. I still prefer the first version you provided. But thank you again for all the versions you brought up! :) - Klein Muçi (talk) 00:59, 25 May 2022 (UTC)
- This is the closest I could get to that was:
- @Guarapiranga, originally I was after individual comment highlighting. But after what you gave me, I enjoyed the idea of having a double highlighting feature. One for the full topic (post + comments) and, on top of that, one for individual comments. - Klein Muçi (talk) 05:00, 24 May 2022 (UTC)
- @Guarapiranga, this feels like a regress because it only highlights single, individual comments but on the other side, it's not broken like the other option (beside the false positives on the other pages). I'm grateful for your help anyway because anything is better than nothing. Just trying to provide direct comments in hope that they may help someone improve it in the future. - Klein Muçi (talk) 04:13, 24 May 2022 (UTC)
- How about that:
- It also activates in Special:RecentChanges, the table on the right where it shouldn't. I suppose there may be other false positives like this. - Klein Muçi (talk) 12:40, 23 May 2022 (UTC)
- @Guarapiranga, thank you! That does seem to give the needed effect. I believe there are only 2 things lacking:
- Here's a start... Add this to your stylesheet, Klein Muçi:
- Klein Muçi, Guarapiranga, Bawl can now highlight comments on click. (not hover) Open the settings, advanced tab, "Highlight comments on click". Hover has proven more problematic due to how I canceled out the highlighting of subsequent comments in the same element. — Alexis Jazz (talk or ping me) 17:07, 15 August 2022 (UTC)