chiragjn's blog

By chiragjn, history, 8 years ago, In English

Last night I hacked together a simple web extension for Chrome/Firefox to enable collapsing/expanding comment-replies threads.

I find it a bit annoying to scroll through long hierarchies of comments to get to bottom of page comments but that is my personal opinion. Would definitely like this kind of functionality baked into Codeforces.

The extension is open source and you can find the source here: https://github.com/chiragjn/codeforces-comments-collapser

Should I publish it to the Chrome Web Store/ Mozilla Store ?

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

| Write comment?
»
7 years ago, # |
  Vote: I like it +11 Vote: I do not like it

Works good enough as Greasemonkey/Tampermonkey script. A lot of CF users have started spamming images so I also added

    $('.comment .ttypography img:not(.tex-formula)').each(function(index, image) {
        if (image.src.endsWith(".gif")) {
            image.style = "max-width: 5%;max-height: 5.0%;";
        } else {
            image.style = "max-width: 10%;max-height: 10.0%;";
        }
    });