48

Preview

Note: The date is locale-based. Screenshot is in UTC

What is LegacyProfiles? (install, unminified)

LegacyProfiles brings back user info removed from profiles in a recent profile update. It is powered by StackExchange API and inspired by this post.

Specifically, it allows you to see the user creation date, profile view count and when the user was last seen.

Browser Support

IE Chrome Firefox Safari Edge Opera
✔️ 6+ ✔️ ✔️ ✔️ 5.1+ ✔️ 12.1+ ✔️ 11.5+

Additional Information

License

Suggestions/Issues

MIT License Suggestions and issues should be raised as an answer in this post

Changelog

  • v2.2
  • v2.1
    • Added support for Stack Exchange sites in a different language (bug report)
  • v2.0
  • v1.8
    • Updated human readable format engine (implemented in v1.3) to use singular when appropriate
  • v1.7
    • Fixed over-aggressive regex implemented in v1.5
  • v1.6
    • Fixed Greasemonkey bug (as reported here and here)
  • v1.5
    • Better API quota conservation, only fetches user details when the current tab is the user's profile
  • v1.4
    • Revised selector
  • v1.3
    • Now displays how long ago the user was last seen in human readable format (e.g., "5 hours ago")
  • v1.2
    • Added API key, up request limit from 300 to 10000
  • v1.1
    • Icon color fixup

Languages/libraries used:

Spectric
  • 1,665
  • 5
  • 15
  • Also couldn't get it to work in Greasemonkey. Works in Tampermonkey. FF 90.0.2, Ubuntu 20.04 – HolyBlackCat Aug 08 '21 at 16:21
  • @HolyBlackCat and DocBrown: Thanks for the report, the Greasemonkey issue has been patched in v1.6 – Spectric Aug 11 '21 at 02:49
  • 11
    BTW: All of the major userscript manager will automatically check for updates, if the URL from which the userscript is installed returns a script with a higher version. The "normal" expectation is that you just create a single file within your GitHub repository which is the userscript. New versions are just additional commits on that repository which update that single file, with all prior versions available in the commit history. In other words, having separate files/directories for "v1.4", "v1.5", "v1.6", etc. is detrimental, preventing the userscript manager from doing automatic updates. – Makyen Aug 11 '21 at 03:09
  • Is it intentional that the "Member since" is put into the profile? It seems to have been put back by Stack using "Member for" with the exact time in a tooltip. – Little Nuts Sep 06 '21 at 10:08
  • Tampermonkey issues some warnings about undefined globals and about unexpected assignments and sequences in a return statement. Adding /* globals jQuery, $ */ and /* eslint-disable no-return-assign, no-sequences */ helps to suppress these warning. – Martin R Nov 05 '21 at 09:05
  • Thanks for this. I'm wondering if it's possible to swap the positions of month and day in the Member for/Last seen dates? [unfounded complaint from a UK user here :p] – ə̷̶̸͇̘̜́̍͗̂̄︣͟ Nov 17 '21 at 08:40
  • @TheSimpliFire The format of the date is based on your browser's locale. – Spectric Nov 25 '21 at 04:27
  • 1
    @Spectric: Is there a reason that the extended in formation is displayed on a user's Profile page, but not on the Activity page? – Martin R Dec 07 '21 at 08:17
  • 1
    @MartinR the profile information list was originally only available on the Profile page. Only after the update was it also visible on the Activity page. I just haven't bothered to change it. – Spectric Dec 07 '21 at 15:15
  • 1
    This might interest you https://meta.stackexchange.com/q/372956/196432 (you probably have seen it already). – Martin R Dec 16 '21 at 14:20
  • @MartinR thanks for the notice! I'll make sure that my userscripts will continue functioning after the change. :) Thanks again. – Spectric Dec 16 '21 at 17:07
  • 1
    P.S. Git tags allows one to version specific commits via git tag v4.2 and then git push --tags. This way, one does not need to maintain multiple folders with different versions since the tags already do that (and with other benefits). – Mateen Ulhaq Jan 25 '22 at 11:09
  • @Sambhav.K You can install the userscript via the instructions here: https://github.com/SpectricSO/stack-scripts/blob/main/how-to-install.md – Spectric Jun 04 '22 at 01:42
  • @Spectric hmmm. Any free resources as it is not accessible on Safari, or Mac? – Sambhav Khandelwal Jun 05 '22 at 05:38
  • TamperMonkey is not free so it would be good if u can suggest a free one. – Sambhav Khandelwal Jun 05 '22 at 05:44
  • @Sambhav.K Did a quick search, this open source Safari userscript manager looks like it has some promise: https://github.com/quoid/userscripts – zcoop98 Jun 06 '22 at 15:12
  • Ok. I did install it and from the extension, I created a new js script and then added that code. But, still I don't get that – Sambhav Khandelwal Jun 06 '22 at 15:36
  • Common open source alternatives to Tampermonkey are Violentmonkey and the original Greasemonkey. Of note is that TM is not "not free", it's just not open source. – Oleg Valter is with Ukraine Jun 06 '22 at 15:37
  • Oh. I am sorry it works fine now. I had forgotten to save the script. Thanks – Sambhav Khandelwal Jun 06 '22 at 15:37
  • 2
    @OlegValteriswithUkraine No, Tampermonkey for Safari 12+ is literally not free; it's $1.99 on the macOS App Store. It surprised me too; it's free on all other platforms. I'd assume that fee is used largely to cover Apple's dev fee to list it on the store. – zcoop98 Jun 06 '22 at 15:46
  • 1
    @zcoop98 ha! Interesting, wow – Oleg Valter is with Ukraine Jun 06 '22 at 15:47

8 Answers8

7

Here is what I see (but maybe I am not looking at the right place):

Baluc

After updating the script, creating a key, and a Ctrl + Shift + L (local storage) to enter said key:

Note: This step is no longer necessary since version 1.2+ includes an API key BalusC2

Well done!

Spectric
  • 1,665
  • 5
  • 15
VonC
  • 171
  • 4
7

I like the idea, but I would prefer for it to be on the second column on my profile, like this:

one

Which IMHO looks much nicer than the current version:

two

Looking at the source of your script, this can be achieved changing this specific selector from this:

$('#user-card ul:not(.s-prose ul)').first().append(HTML);

To this:

$('#user-card ul:not(.s-prose ul):eq(-1)').append(HTML);

The -1 here instead of 1 is because on profiles different than your own there is no second column, so -1 just selects the last column regardless.

Marco Bonelli
  • 211
  • 1
  • 4
6

The last seen field has been restored recently with a reduced granularity. As a consequence, two “Last seen” fields are presented if LegacyProfiles is active:

enter image description here

My suggestion is to replace the standard field instead, if that is possible.

Spectric
  • 1,665
  • 5
  • 15
Martin R
  • 161
  • 1
  • 3
  • 3
    I actually considered implementing this when the profiles were just updated, but I wasn't sure whether the users would like it. Looks like a good idea; I'll implement it in 2.2 – Spectric Nov 03 '21 at 13:55
  • 1
    @Spectric: There is a typo in the script: “profile viewss” – Martin R Nov 15 '21 at 14:51
5

Unfortunately, it doesn't work for me (I use Windows 10). I downloaded "Unminified", Version 1.3, then I opened the windows file explorer and double clicked on the file (6 KB). Then I get asked if I want to open the file, I say "yes" and then it says "microsoft jscript error 800A03EA". Is the tool supposed to be used differently? Are any instructions available?

Filippo
  • 151
  • 2
  • 9
    Install a userscript manager in your browser (Greasemonkey for Firefox, Tampermonkey for other browsers), then click one of the install links. You will automatically be prompted to install the userscript. – Spectric Aug 08 '21 at 15:29
4

It would be great if this worked in Stack Overflow for Teams, for example in Charcoal and SOBiotics.

Spectric
  • 1,665
  • 5
  • 15
Rob
  • 201
  • 1
  • 3
  • 6
  • 1
    Try this beta which should work for Teams. If it works well I'll make it v2.3. Thanks for the suggestion! – Spectric Oct 08 '22 at 19:40
  • @Spectric, It doesn't work on another user's profile. My profile says both that I haven't visited for four months and that I have visited for 14 consecutive days; that's impossible. PS: I'm sure I installed it correctly, partly because of the bug, but would it be better if the version was incremented to 2.21; so the upgrade is more obvious. --- Thanks for trying. – Rob Oct 08 '22 at 21:14
  • 1
    Thanks! I've taken a look into it. It's showing you the last seen for the main site (stackoverflow.com: I'll try to fix that, although I don't think this data is accessible team-specifically), Also, LegacyProfiles doesn't change the 'visited for' part. – Spectric Oct 08 '22 at 21:21
  • @Spectric, It may be defaulting to using the Stack Overflow main (Screenshot), but it's completely broken on other sites. My main Meta profile (Screenshot) doesn't show it working for me or on your profile. – Rob Oct 08 '22 at 21:59
  • @Spectric, Regarding this comment, https://stackoverflow.help/en/articles/4385859-stack-overflow-for-teams-api and the unnecessary workaround https://stackoverflow.com/a/68311795/3648282 – Rob Oct 09 '22 at 01:59
  • @Spectric, Teams has changed its URL and the format of its profile page again: https://stackoverflowteams.com/c/sobotics/users/46/?tab=profile https://stackoverflowteams.com/c/charcoal/users/94/?tab=profile – Rob Nov 19 '22 at 15:35
2

The script no longer works on Russian SO.

For example, try looking at this profile.

Spectric
  • 1,665
  • 5
  • 15
HolyBlackCat
  • 211
  • 1
  • 6
2

I am currently using your Legacy profiles but cannot utilise the search users' functionality when doing so. This error occurs only on Safari.

Spectric
  • 1,665
  • 5
  • 15
  • 1
    Which userscript manager are you using in Safari? I had problems with a free userscript manager and then purchased Tampermonkey, which works fine so far. (That is my personal experience, I am not affiliated with any of these software products.) – Martin R Jun 11 '22 at 18:05
  • Try and see if this works. Otherwise, it appears to be a problem with the userscript manager. – Spectric Jun 11 '22 at 20:51
  • Ok @Spectric will try it out in the evening and let u know – Sambhav Khandelwal Jun 12 '22 at 05:43
1

I can't delete any of my profiles with my script anymore.

  • I tried disabling all other scripts: this doesn't work.
  • I tried disabling the LegacyProfiles script: this work.

When I have LegacyProfiles enabled, the button "Delete profile" is disabled even if checkbox is enabled:

screenshot