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

Автор Luma, история, 6 лет назад, По-английски

Hello Codeforces!

I made the user script to append the form to submit on Codeforces problem pages.

Sorry, this supports only modern browsers like Chrome and Firefox.

greasyfork link : https://greasyfork.org/en/scripts/371117-cf-fast-submit

Install

Install UserScript runner like Tampermonk and Greasymonkey to your browser.

(Sorry, I couldn't make it work well with Greasymonkey.)

Then, open install link and click install.

Usage

You can use it as you can see it on the submit page's form.

Specification

  • Support contest, gym and problemset problem pages.
  • Problem selection will be auto-selected and disabled. Problem ID is calculated from URL.
  • This tool gets form from the submit page using Ajax.
  • This tool never connect the other site.
  • If we open the submit page right away after the contest starts, we can't select the problem ID (because there's no option somehow).
    But don't worry. This script automatically retry if there's no option.
  • If 30 minutes left and you submit, this script automatically re-generate the form because sometimes the token expires.
    This script will drop neither your code nor file selection.

Comment

I implemented it as not disturbing users.

If you found some technical issues, rights issues or something anxious, please let me know that.

I welcome any feedback! (You know vs.? Please share in comments!)

Disclaimer of warranty

Use of this tool is at your sole risk. In no event will I be reliable to any party for any damages of any type.

Screenshots

Links


Great. So cool.

This tool is here thanks to Codeforces.

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

»
6 лет назад, # |
Rev. 3   Проголосовать: нравится +8 Проголосовать: не нравится

thx for great work

»
6 лет назад, # |
Rev. 2   Проголосовать: нравится +12 Проголосовать: не нравится

I am getting this error:

Ignoring @match pattern http*://codeforces.com/contest/*/problem/* because: Error: @match: Invalid protocol (http*:) specified.

Is it only for http?

  • »
    »
    6 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    Thanks. I fixed! Please update and check it out.

    EDIT: hmmm.... I checked using Chrome with tampermonkey, but nothing wrong with old version. Please let me know your environment. And is it fixed?

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

      Now I could download the script but it does not work. I'm using Firefox Quantum.

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

        Sorry, I couldn't make a support.
        I confirmed that it works well with Tampermonkey and Firefox.

        sorry for inconvenience.

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

    Sorry for my slow debugging.

    I tried it on Firefox with Greasymonkey and confirmed that it doesn't work.

    I'm checking the way to fix it...

»
6 лет назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

Now I could download the script but it does not work either. I'm using Chrome73

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

    Thanks for feedback! I use the same version with Windows.
    It's strange...
    What problem page did you open?
    How doesn't it work? (Could you see the form or not?)

    Could you tell me what dev tool says? (CTRL + SHIFT + I, open Console tab)

    Thank you.

»
6 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Luma (previous revision, new revision, compare).

»
6 лет назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

Nippon language wakaranai

»
6 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Luma (previous revision, new revision, compare).

»
6 лет назад, # |
Rev. 3   Проголосовать: нравится +8 Проголосовать: не нравится

Yesterday(4.13),When I took part in edu Contest,it couldn't work that jumped into submit page.But it can work out of Contest.

  • »
    »
    6 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

    Thanks for a comment.

    Hmmm, the old version (v1.1) was working well... Sorry, but I didn't test new version on the running contest. I'll try to test it on some contest.

    EDIT: I tested on virtual contest, but it works well.

    Sorry, but I couldn't test until the real contest is running.

    • »
      »
      »
      6 лет назад, # ^ |
      Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

      Maybe Its my computer's matter.

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

        Some participants report similar issues.

        And now, I recall that I must write additional code to support ECR. (Seeing git log, wow, there's answer.)

        I'm fixing...

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

        Fixing has been done.

        If you use v1.1, please update.

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

      When I made (thanx to CountZero) tool like this the problem during real contest was longer load of codeforces pages — I had to increase some delays between transitions between pages, inserting of code and submit and so on. But even with these delays submit is much faster then manually

»
6 лет назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

Really Impressive

»
6 лет назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

It's a good one!!

»
6 лет назад, # |
  Проголосовать: нравится +12 Проголосовать: не нравится

Sorry, there was the bug that in ECR this script doesn't generate complete form.

Now, I fixed for the ECR.

AND IF THERE'S UNEXPECTED THROWN ERROR, THIS TOOL WILL REMOVE THE INCOMPLETE FORM FOR RELIABILITY.

Thank you for your feedback! Enjoy coding!

»
6 лет назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

Not working when questions are of like C1, C2!
here

»
6 лет назад, # |
Rev. 2   Проголосовать: нравится +6 Проголосовать: не нравится

Version 2.4 Update Notice

Very sorry for the unexpected behavior in the problem like "C1", "C2".

I apologize that this tool may have annoyed some participants.

That was fixed.

You may have seen the many generated forms.

Deleting the form on error was not complete.

This is also fixed.

Maybe, some saw the form generates many forms right away after the contest.

Above behavior caused this. And this was also fixed.

Thank you for using this tool and commenting.

EDIT : Sorry, I screwed up. I updated on the contest running. I'll keep in mind not to annoy participants.

»
5 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Found a bug! I had submitted a code in java 11. But when I am going to a problem fast submit is not working. But after switching back to java 1.8 from submit page, fast submit works. I guess java 11 is new and some mapping are missing or something. There are errors in console from fast submit also!

»
5 лет назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

Hi Luma! This tool has stopped working for me recently! Is there any fix/solution? Thanks!

  • »
    »
    5 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится +13 Проголосовать: не нравится

    You can edit the script yourself, in extensionMap, add 61: 'program.cpp' (61 is the id of C++64, which was recently added)

    By the way, huge thanks to the author, it's a very convenient tool!

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

When I try to install using the link, a file named cf-append-form.user.js opens on firefox and on chrome the same file is downloaded. What is the fix for this ?

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

    Have you installed tampermonkey ? Did you tried another scripts and how did you got?

    BTW, according above comments, this tool is not working now.

    Thank you for all your patience. I will try to fix the problem and improve this.

    Give me a little more moment to fix this tool.

»
5 лет назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

Now I released new version 2.6

I just updated for new added languages. (I haven't tried these languages yet... )

Sorry for being too late to update. It's ok if you are using the other owner's ( or your own ) version.

I'm planning to change to store the language information in local ( called localStorage ) and automatically merge them.

And more, I changed the parameters used judging when to retry to generate the form. It may have been a little heavy... ( 300ms interval try and up to 400 times ) Now I updated it to 1000ms interval and up to 10 times.

If you don't like that, please edit the parameters ( you can find them soon ) by yourself ( at your own risk, of course )

Thanks. Enjoy competing ! I'm going to participate next Kotlin contest (maybe).

»
5 лет назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

Luma can you make it so that once you press the submit button, it will automatically open a new "status" page on codeforces. Whenever I press the submit button, the problem gets redirected to the status page. I want it on a different page so that I can still read the problem. Maybe make it an option or smth like that.

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

    Seems nice! Hm, can't prevent redirecting to "status".

    Why don't you opening new problem window ?

    1. window.open(url) to open new tab.
    2. location.href that is URL of that page.
    3. You can see the function preSubmit () in the script.

    Then prepend window.open(location.href) to preSubmit() function.

    I hope this help you.

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

      Where do I do this?

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

        Click Tampermonkey extension icon and ...

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

        Ah, little buggy.

        Ok, I will implement.

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

        Published new version.

        First, please update to 2.7 visiting Greasyfork.

        Go dashboard as I described the comment before. And enable the feature by editing this line to true (and of course save it).

        For who do not want this: Nothing to do. default behavior has been not changed.

»
4 года назад, # |
Rev. 4   Проголосовать: нравится 0 Проголосовать: не нравится

Luma Really Lovely tool man , exactly what I was looking for . However I just want a little modification in my side that I dont want it to get auto focused on the submission and instead let me have the page as it is, would be much of the help from ur side !

»
4 года назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

Hi Luma, userscript doesn't work for site in russian at all.

»
4 года назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

it would be great if it does in problem set too

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Hey Luma, the extension works well, thanks for making it! However, even after I have uninstalled it, whenever I open a problem, it automatically scrolls down a little, and to be honest that is quite frustrating. Can you please tell me if there is a fix for this? Thanks!

»
3 года назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

Great work!! But few questions are taking too much time to load. Is everyone having the same problem

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

It doesn't work with Russian version of tasks. Only with English version. But I figured out that if you remove the 70th line (first "return false" in checkRequirements) of the script it works well!

»
3 года назад, # |
Rev. 6   Проголосовать: нравится 0 Проголосовать: не нравится

Hi! does anyone know why my cf-fast submit isn't working? It was working until yesterday but now it isn't as shown in the picture below :(

 UPD : I Changed my lang from C++ 20 to C++ 17 and it worked but why?

UPD2 : Fixed :)

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

https://github.com/LumaKernel/cf-fast-submit/raw/master/main.user.js

I've updated and retired to update greasyfork so please install from GitHub raw content (above URL) to get latest. And I had noticed and struggled to solve this problem (updates on codeforces) and came up with some solutions but I recently do not have chances to play codeforces...

For Russians support, you may use https://github.com/LumaKernel/cf-fast-submit/pull/5 . I'll maybe merge it in some form in the future....

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

Is it working for you guys? Not working for me since yesterday, it was alright before that

»
9 месяцев назад, # |
  Проголосовать: нравится -8 Проголосовать: не нравится

it is work on Microsoft edge?

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

This suddenly not working today (11th May, 2024). I have been using it from last 2 years, does anyone facing same issue ?

»
3 недели назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

is it down right now ?

it's not working in the chrome as well as in the brave browser from last week as of today (2/dec/24).