Блог пользователя ItsTHEAvro

Автор ItsTHEAvro, 23 месяца назад, По-английски

Motivation:

I feel more motivated and competitive when I see my friends are also doing CP on Codeforces. But it's hard to check who is online or when they were online by going to each of my friend's profile. So I've written this userscript to show the last online status of my friends in the table in the My friends page.

Result:

Before
After

Usage

This userscript uses the Codeforces API to retrieve the last online time for each username in the friends list, and then calculates the elapsed time in years, months, weeks, days, and hours. As it repeats this process for every username in the friends list, there is some delay (~1 sec). I'm not quite sure how to fix that. If you have some ideas regarding this please feel free to share them with me. Also, please share your thoughts on this script. I'm interested in hearing your perspective.

  • Проголосовать: нравится
  • +121
  • Проголосовать: не нравится

»
23 месяца назад, # |
  Проголосовать: нравится +24 Проголосовать: не нравится

Happy stalking fellow Competitive Programmers

»
23 месяца назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится

I really liked it!

I think it would be better if it shows online now (in green), just like in our profiles.

  • »
    »
    23 месяца назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    Hey! Glad that you liked it. The api returns when someone was last online in seconds. There is no discrete option like "Online now" or not. I think codeforces has a time period of 10 minutes when the user info is shown as "Online Now" but I am not sure about that. I can make the script show "Online Now" if the time is under 10 minutes but I think the current option is better for now. Thank you for your suggestion though!

  • »
    »
    23 месяца назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I use script with this option and with sorting by time