User talk:PleaseStand/User info
Gadgetize and Global Gadgetize
[edit]Hi. I highly value this script, it makes many of my tasks more efficient. It's a great counterpart to the User:Pyrospirit/metadata script (gadget) for mainspace-pages. I'd like to suggest/encourage 2 things:
- Turn this into a local Gadget, for larger scale testing, and potential site-default implementation.
- Make it work globally. (Also requested via bugzilla:58405)
- I've tried just copying or importing the javascript to other wikis, but that doesn't work. Could you change whatever needed, to make it function cross-wiki as well as Navpopups does? (See list of places navpops is used).
Much thanks, –Quiddity (talk) 21:28, 17 May 2014 (UTC)
- @Quiddity: Sorry for the delayed reply. I'm working on a new version of the script (User:PleaseStand/userinfo-dev.js), intended to be more easily localizable (using MediaWiki's JS message functions, and not hardcoding names of user groups). I would appreciate your feedback on the new output format so I can move forward on this. PleaseStand (talk) 12:59, 7 July 2014 (UTC)
- @PleaseStand: No worries on the delay - Wiki-speed is either hyper-fast or ohgodsobusysomanyprojects. :)
- Re: The rewrite:
- Wooo! Good plan, good timing, good pipe separators.
- thousands separator - Ie. 39034 vs 39,034 vs 39.034 vs 39 034 - for long numbers, please separate them with a comma (or if you want to get fancy, with a localizable [comma/decimal/thinspace] ;)
- siteSub - I'm guessing you've not added the default siteSub, to prevent linewrap? It'd be good to mention that in the documentation, and provide a snippet of CSS/JS for any users that really want to add it back. (I like that it has been replaced, but others might not).
- potential addition - A link to SUL Info, perhaps from the account-age, or just as a link at the end. (Or a JS snippet, for users to optionally add).
- Other than that, I think it's great, and ready to be brought live and to wider attention. HTH. –Quiddity (talk) 17:04, 7 July 2014 (UTC)
console errors
[edit]Hi, I'm getting a few console errors. I'm not sure if they're easy fixes?
- "Use of "addOnloadHook" is deprecated. Use jQuery instead."
- "Use of "sajax_init_object" is deprecated. Sajax is deprecated, use jQuery.ajax or mediawiki.api instead."
- "Use of "sajax_debug_mode" is deprecated. Sajax is deprecated, use jQuery.ajax or mediawiki.api instead."
Hope that helps. –Quiddity (talk) 04:03, 29 June 2014 (UTC)
- @PleaseStand: Ah, I found mw:ResourceLoader/JavaScript_Deprecations mentioned elsewhere. Hopefully that helps. :) –Quiddity (talk) 01:03, 6 July 2014 (UTC)
- @Quiddity: Fixed User:PleaseStand/userinfo.js yesterday. I had already fixed User:PleaseStand/userinfo-dev.js (see above). PleaseStand (talk) 12:59, 7 July 2014 (UTC)
Question about using
[edit]@PleaseStand:I would like to know if it is possible to update the code for the thing to make it be able to be used on the Simple Wikipedia. --Clarkcj12 (talk) 08:38, 12 January 2015 (UTC)
- @Clarkcj12: It should work everywhere. You just need to load it via your local user/common.js or your global.js like so (or use the userinfo-dev.js version, as mentioned above). :) Quiddity (talk) 19:32, 10 June 2015 (UTC)
- @Quiddity: I had this same question. I've tried to add the script at Simple accodring the instructions. But both User talk:PleaseStand/User info and Wikipedia:Metadata gadget remain redlinked. Did I do it wrong? Please see: Simple:User:Msannakoval/common.js. Thanks. Msannakoval (talk) 22:25, 15 February 2016 (UTC)
- @Msannakoval: Just replace what you have there, with this line:
- @Quiddity: I had this same question. I've tried to add the script at Simple accodring the instructions. But both User talk:PleaseStand/User info and Wikipedia:Metadata gadget remain redlinked. Did I do it wrong? Please see: Simple:User:Msannakoval/common.js. Thanks. Msannakoval (talk) 22:25, 15 February 2016 (UTC)
mw.loader.load('//wiki.riteme.site/w/index.php?title=User:PleaseStand/userinfo.js&action=raw&ctype=text/javascript');
- Or alternatively, add it at m:User:Msannakoval/global.js (and remove it from Enwiki).
- (The metadata script won't work at Simple, because they don't use the same talkpage banner system that Enwiki does, so just remove that line).
- HTH! Quiddity (talk) 22:27, 16 February 2016 (UTC)
- That helps a lot! Thanks, Quiddity. I've asked you about Wikipedia:Metadata gadget at your talk page here, since it seems off-topic to this user talk page. Really appreciate your help. Msannakoval (talk) 12:04, 17 February 2016 (UTC)
Gender
[edit]Can the template be updated to accommodate those of the Wikipedia community that are transgender? Thanks. Allen (Morriswa) (talk) 11:04, 12 January 2015 (UTC)
- The MediaWiki software currently only gives the userpreferences for: * (I prefer not to say) * She edits wiki pages * He edits wiki pages, so it wouldn't be possible in this script, until that changes.
- That issue being actively discussed at the moment, in phab:T61643 (Provide further options than only binary gender) with much discussion about what is needed, and how it would work in all our various languages. Quiddity (talk) 23:27, 14 January 2015 (UTC)
- There's a pronoun setting in the Preferences now, though I'm not sure how to grab at it with JS at present. — SMcCandlish ☏ ¢ 😼 10:28, 18 November 2019 (UTC)
Internationalization?
[edit]@PleaseStand: It'd be nice if the script detected the interface language and displayed in the correct language. I can volunteer to translate it into Portuguese and Esperanto, if you'd like. ~★ nmaia d 17:33, 25 November 2018 (UTC)
- Yeah, can someone make a workaround for this, so we can import the global script with internationalized strings instead of our own modified version (tr:MediaWiki:Gadget-HizliBilgi.js)?--evrifaessa ❯❯❯ talk 13:00, 27 August 2020 (UTC)
Uploaded files
[edit]It'd be neat if the script also pulled the amount of uploaded files, potentially becoming more useful than bots like User:UploadStatsBot. ~★ nmaia d 13:51, 3 April 2019 (UTC)
Show edit information for correct wiki
[edit]I use this on Wiktionary, and noticed one oddity there. The "x edits" link points to edit information for wiki.riteme.site
rather than en.wiktionary.org
I think changing the line "&project=wiki.riteme.site&uselang=en\">" +
to "&project=" + mw.config.get("wgServerName") + "&uselang=en\">" +
would fix this. — Eru·tuon 06:14, 10 January 2019 (UTC)
- +1. I came here to ask for the same feature enhancement. --BDavis (WMF) (talk) 03:03, 4 July 2019 (UTC)
Experimental overhaul
[edit]- The following discussion is closed. Please do not modify it. Subsequent comments should be made in a new section. A summary of the conclusions reached follows.
Since this seems to be unmaintained for a while now, I've forked it to meta:User:SMcCandlish/userinfo.js.
- Fixes the hardcoding of wiki.riteme.site, reported (with fix) above by Erutuon. I've tested that this works; when I view a user who has accounts on Meta and on en.Wikipedia, I see different user groups reported.
- Adds every user group I could identify (in English). Several added ones are definitely working (interface-admin, etc.), though some do not seem to be (e.g. ombudsman). I'm not sure if this is because of a problem in the list of groups, or because the group in question is not in fact in use on the wikis at which I tried it. For example, I looked at users listed in meta:Ombudsman commission, and none show up with this tool as being in the ombudsman group, so it may be that the user group has been "retired" even though the role has not. Anyway, I added some groups that seem to be in use only on Meta, WikiData, and Commons, as well as global ones, and new ones. I left user and autoconfirmed as suppressed (we don't actually need to see those, since they're automatic – either upon account creation or not long after, respectively). Also added a non-English group in use on pt.Wikipedia. @Erutuon and BDavis (WMF): pinging two users who asked about some of this.
To transclude this in your own local Special:MyPage/common.js (or your meta:Special:MyPage/global.js, as I did): add this to it:
mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User:SMcCandlish/userinfo.js&action=raw&ctype=text/javascript');
Obviously, I have no particular need to keep my fork alive, if PleaseStand comes back and wants to re-consolidate the code.
— SMcCandlish ☏ ¢ 😼 10:32, 18 November 2019 (UTC)
- @SMcCandlish: Hmm, the edit count link doesn't work; fortunately, the URL format has apparently been simplified to
https://xtools.wmflabs.org/ec/<domain>/<username>
. — Eru·tuon 16:49, 18 November 2019 (UTC)- Updated. It was actually working to get the count, but when you clicked on it, it wanted to you to re-enter the site and user name. Now it will go directly to the user counts page at the right site. I also fixed a group name typo. — SMcCandlish ☏ ¢ 😼 22:51, 19 November 2019 (UTC)
Should probably also move any further discussion of this fork to it's own talk page. I don't know if PleaseStand is getting spammed with e-mail about edits to watched pages. — SMcCandlish ☏ ¢ 😼 22:51, 19 November 2019 (UTC)
Users experiencing error with this script
[edit]Many users appear to be using this skin on the mobile Minerva skin. For instance if I visit https://m.mediawiki.org/wiki/User:Vito_Genovese and run the script there I get Uncaught TypeError: fh is null. The reason is you document.getElementById('firstHeading') however on mobile Minerva this has the ID section_0. Can you provide an early return statement to avoid the error? Thanks in advance! Jdlrobson (talk) 22:22, 6 August 2020 (UTC)
Suppressor vs Oversighter?
[edit]Hi PleaseStand! I'm wondering if there's a difference between these two categories that are added by your script? If there's not, could we change to just be "Oversighter"? ––FormalDude talk 08:42, 29 March 2022 (UTC)
Edit request 5 May 2022
[edit]This edit request to User:PleaseStand/userinfo.js has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
To keep the code consistent with the intention expressed in L116, please add
'named': false,
after L119. See Wikipedia:Village pump (technical) § New "named" group (permalink).
Also, the inclusion of a "suppress" group, mapped to "suppressor", predates there actually being a group of that name. As alluded to in the section above, that only happened recently, with the former "oversighter" group becoming "suppressor" within MW but not in enwiki policy contexts. Since all other groups are referred to by their local names, I think it would be more consistent to delete L139 here and change L125 (L126 after the change above) to
suppress: "oversighter",
Pinging User:PleaseStand on the off chance they're available. -- Tamzin[cetacean needed] (she/they) 12:37, 5 May 2022 (UTC)
- Note: Looks like the "named" group is being disabled on WMF wikis for now, but it would still be good to handle this before it is eventually enabled when IP masking comes into effect, so I'll leave this request up. See phab:T307675. -- Tamzin[cetacean needed] (she/they) 12:47, 5 May 2022 (UTC)
- Actually wait, Tim said on IRC that the name "named" might be renamed. So scratch that part for now. But the second half of this stands. -- Tamzin[cetacean needed] (she/they) 12:50, 5 May 2022 (UTC)
- @Tamzin I'm not exactly sure (a) what you ended up wanting to change here (you went back and forth a bit) (b) why we need to change someone else's personal script file, which appears to be a fork of several other script files. — xaosflux Talk 13:24, 5 May 2022 (UTC)
- @Xaosflux: Well, as for the why, a lot of folks use this script; it's top 30 for active users according to Wikipedia:User scripts/Most imported scripts. I've no comment on the
name
thing, but the change to the OS group should be done to keep up original intent and things working as expected; I did the same to my fork a few months back. ~ Amory (u • t • c) 15:10, 5 May 2022 (UTC)
- @Xaosflux: Well, as for the why, a lot of folks use this script; it's top 30 for active users according to Wikipedia:User scripts/Most imported scripts. I've no comment on the
- @Tamzin I'm not exactly sure (a) what you ended up wanting to change here (you went back and forth a bit) (b) why we need to change someone else's personal script file, which appears to be a fork of several other script files. — xaosflux Talk 13:24, 5 May 2022 (UTC)
- Actually wait, Tim said on IRC that the name "named" might be renamed. So scratch that part for now. But the second half of this stands. -- Tamzin[cetacean needed] (she/they) 12:50, 5 May 2022 (UTC)
- OK, if its heavily used then sure I guess @Amorymeltzer - I notice you have:
'oversight': 'oversighter', 'suppress': 'oversighter',
- In your script, the former shouldn't be needed? — xaosflux Talk 15:25, 5 May 2022 (UTC)
- Yeah, that's right. Can't recall if I just missed it or couldn't be arsed at the time. But yes. ~ Amory (u • t • c) 15:45, 5 May 2022 (UTC)
- @Xaosflux: Sorry about the whiplash here. Yes, to clarify, I'm requesting both halves of what I said originally: the first in anticipation of the "named" group whenever it goes into effect, the second as discussed above. -- Tamzin[cetacean needed] (she/they) 21:32, 5 May 2022 (UTC)
- Done — xaosflux Talk 13:07, 6 May 2022 (UTC)
Thought you should know
[edit]Your script might not be the issue, but I getting this File:Double vision.png where the user information and gender markers are being displayed twice, not to mention File:Needs fixing.png which is displaying multiple "Scripts" headers in my sidebar (I have taken this to the author, just for the record Now can this be fixed?). I get it, this is not drastic stuff, but annoying. Thank you very much, - FlightTime (open channel) 17:29, 21 June 2022 (UTC)
- @FlightTime: Did it get resolved? If not, I'd just note that it is because you've installed this script twice. Look at your Special:MyPage/common.js, Special:MyPage/vector.js and meta:Special:MyPage/global.js in meta. You can remove one instance and it'll resolve. —CX Zoom[he/him] (let's talk • {C•X}) 10:07, 28 November 2022 (UTC)
- OMG, I'm dumb :P Thank you very much for seeing that, yes, it did fix the issue.:) - FlightTime (open channel) 21:30, 28 November 2022 (UTC)
getMessages()
[edit]Hi PleaseStand, I think it's better to use mw.Api.getMessages() to get system messages instead of getJSON.
You only need to load the system messages that are related to the user's permissions, there is no need to load all the permissions. -- Gerges (talk) 11:06, 22 November 2024 (UTC)