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.
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. Rummskartoffel17:55, 8 May 2022 (UTC)
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)
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)
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 or mw.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.
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)
@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)
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)
@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)
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)
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 Rextalk00:03, 26 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 Rextalk23: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)
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.
@Likhasik: this Tampermonkey script will reload any page under web.archive.org/* after a set amount of time:
// ==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==constreloadTime=15000;// you can change this value to vary how long it will take to reload -- this is 15 secondswindow.setTimeout(()=>location.reload(),reloadTime);
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!!contribs20:20, 22 May 2022 (UTC)
$('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();});
@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 (`). NguoiDungKhongDinhDanh07:36, 3 June 2022 (UTC)
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?
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)
@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)
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)
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)
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:
Extended content
Passing
If you determine that the article meets the good article criteria, you may pass it by doing the following:
Replace the {{GA nominee}} template on the article talk page with {{GA|~~~~~|topic=|page=}} or {{GA|~~~~~|subtopic=|page=}}
The five tildes supply the date of the review. Fill in the |topic= and |page= number of the review by copying both parameter values from the replaced template. (The topic parameter refers to the topic values found here; the template automatically converts GA nominee subtopics into GA topics. The page parameter should be the number of the review subpage; that is, the n in {{Talk:ArticleName/GAn}} – a number only; no letters.)
Update any {{WikiProject}} templates on the article talk page by changing the |class= parameter value to "GA", as in {{WikiProject|...|class=GA}}
Save the page. A bot will add the good article icon to the article, will remove the nomination from the GA nominations page, and will use {{GANotice}} to let the nominator know that the article has passed. Do not add the icon manually unless the bot fails to function properly.
Be sure the review page justifies how the article meets the good article criteria. You may also leave a personal note of congratulations for the nominator.
If you determine that the article does not meet the good article criteria, you may fail it by doing the following:
Replace the {{GA nominee}} template on the article talk page with {{FailedGA|~~~~~|topic=|page=}}
The five tildes supply the date of the review. Fill in the |topic= and |page= number of the review by copying both parameter values from the replaced template. (The topic parameter refers to the topic values found here; the template automatically converts GA nominee subtopics into GA topics. The page parameter should be the number of the review subpage; that is, the n in {{Talk:ArticleName/GAn}} – a number only; no letters.)
Save the page. A bot will remove the nomination from the GA nominations page and will use {{GANotice}} to let the nominator know that the article has failed.
Be sure the review page specifies what needed to be done to the article for it to meet the good article criteria. You may also leave a personal note of encouragement for the nominator, urging them to renominate the article once the problems have been addressed.
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.
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.
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)
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)
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)
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? ItcouldbepossibleTalk05:27, 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. ItcouldbepossibleTalk13:27, 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. ItcouldbepossibleTalk15:10, 11 June 2022 (UTC)
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? ItcouldbepossibleTalk14:19, 23 June 2022 (UTC)
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)
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
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)
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 by title or href. — Guarapiranga☎04:15, 29 July 2022 (UTC)
Removing the dates is phab:T10681. See also related tasks.