yak_ex's blog

By yak_ex, 8 years ago, In English,

This is my second user.js script for Codeforces. If you install this script (Updated: 1.6: 2015/05/05), you can see standings like as follows:

You need to wait for seconds until standings are colorized. The order and decoration are set by my arbitrary feeling. If you want to change them, please edit the script directly. It is quite easy. The latest code is also at github.

On my environment, the user.js script works with the following browser:

  • Firefox 3.6.17 with Greasemonkey 0.9.2
  • Opera 11.10
  • Chrome 12.0 (This is a development version but I think stable versions also work as well.)

Updated (0.02):

Now this script is applicable for division-specific standings and room standings. For room standings, I would be glad if you make some comments...

New feature is added. If you click a colored cell, tiny red triangles appear at the top-left corners of the cells colored in the same way. The following example is the case for clicking "Java". Clicking a marked cell, the marks disappears. It is not necessary to click cells in the top table. Cells in the actual standings table are also clickable. To clear mark, it is not necessary to click the same cell when marking. To click a marked cell is enough.

 

Updated (1.1):

Added OCaml and Scala support. This is just an updated thing. The reason why version jumps up is because Chrome recognizes version 0.0x as 1.0 and rejects update prior to 1.1.

Updated (1.2: 2012/06/05):

Record marked languages into cookie. So, they are persistent, at least, between reloads. The configuration is shared by all standings in a domain (e.g. www.codeforces.com). Thanks to suggestion by iTwin.

Updated (1.3: 2012/06/05):

I didn't notice the comments that Java 6, Java 7 and Perl are not highlighted. Now, they are highlighted.

Updated (1.4: 2013/05/07):

Add new languages (Python -> Python 2 and Python 3, C# -> Mono C# and MS C#, D, and Go).

Updated (1.5: 2014/06/01):

Add new languages (Java 8 and JavaScript).

Updated (1.6: 2015/05/05):

Add new languages (GNU C++11 (unified with GNU C++0x), GNU C11 and PyPy (unified with 2 and 3)).

 
 
 
 
  • Vote: I like it
  • +90
  • Vote: I do not like it

8 years ago, # |
  Vote: I like it +5 Vote: I do not like it
Amazing! Both idea and implementation are superb! The only thing I am thinking about: it's very easy to edit your script so that it works in rooms as well. Wouldn't it be considered as a cheat in competitions because you can, for example, just ignore all java solutions if you don't know java?
  • 8 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Yes, It's very easy. :)
    You should add working addresses:
    http://codeforces.ru/contest/*/room/*
    http://codeforces.com/contest/*/room/*
    in settings.

    OR
    lines
    // @include        http://codeforces.com/contest/*/room/*
    // @include        http://codeforces.ru/contest/*/room/*
    in script
8 years ago, # |
  Vote: I like it +9 Vote: I do not like it
Can you modify script so that it colors opened solutions? This feature would be useful when somebody consequently views room's programs for challenge. Thanks.
8 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Thank you for comments, mmaxio, pank.dm and freopen.

Though I can't remember the actual representation of the room standing table during a contest, it is likely that this script is usable during contest. It might be considered as a cheat. I, however, keep to present this script at this point for the following reasons.

  • This script just emphasizes information already included in the standings table.
    • Hovering cursor on cells pop-up such information. 
  • What I can do is anyone can do.
    • To withdraw this script is not so meaningful.
    • To keep public here, others can discuss and judge this kind of stuffs.

>freopen

Again, I can't remember the actual representation of the room standing table during a contest. Therefore, I can't modify this script for your request right now, even from technical point of view. 

8 years ago, # |
  Vote: I like it 0 Vote: I do not like it
two new languges were added, OCaml and Scala.
Can you update your userscript? For the color of these two languages, I suggest to use the same as Hasell.
  • 8 years ago, # ^ |
    Rev. 2   Vote: I like it +5 Vote: I do not like it

    Thank you for the suggestion.

    I agree on the colors with you because they are functional programming languages.

    The script is updated. The version number jumps up to 1.1 because Chrome recognizes version 0.0x as 1.0.   Only the update is that OCaml and Scala are added.

    The script and images on my server have been already updated but this blog entry has not been updated yet because editing the entry causes errors, right now. If the errors are fixed, this entry itself will be updated, also. You can obtain the script also from https://github.com/yak1ex/cf_userjs

8 years ago, # |
  Vote: I like it 0 Vote: I do not like it
Thx! Nice script!
We r waiting for updates!
»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Perl isn't highlighted

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Has problem with Java solutions Maybe "Java 6" and "Java 7" are different ?

  • »
    »
    8 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Previous Java solutions are labeled by "Java 6" in their cells. Add this line in the source file. ~~~~~ [ 'Java 6', 'l-java-6', 'background-color: #ffccff !important; border: dashed #6666ff;' ] ~~~~~

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Who can I disable this script without removing it from chromium? Is there any checkbox for this purpose?

  • »
    »
    7 years ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Tools -> Extensions -> toggle the «Enabled» checkbox // Chromium 18.0.1025.151

»
7 years ago, # |
Rev. 6   Vote: I like it 0 Vote: I do not like it

How can I install a script on MozFirefox 4.0 ?

UPD: If it is not too long please tell me how? Cause I hate googling in some cases , for example in this case I didn't even know that I could intall scripts on my browser.

UPD: now MozFirefox 11.0 .

»
10 months ago, # |
  Vote: I like it +3 Vote: I do not like it

can you update the script for the new c++ versions?

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How can we build this app? I can't do it. Please help me?