Skip to content

What's it going to take to fix the Scroll To Comment feature? (Wuks, looking at you)

DrCyanide··2 votes·3,038 views

Seriously, that feature is so inconsistent it's annoying. It feels like over half the time it takes too long to kick in, so I scroll there myself, then when I'm done reading and trying to scroll back to the top of the page it scrolls me back down to the comment, fighting my attempts to scroll back up the whole way down! Can this be made to kick in faster or be canceled if you've already scrolled down to that comment?

4 Comments

ModPeriscope2 votes

Wuks, you should also fix the match history site.

(That's entirely out of your control, but it's 2018. I wan't to open up a match history in a new tab).

DrCyanide1 votes

{quoted}

(That's entirely out of your control, but it's 2018. I wan't to open up a match history in a new tab).

I KNOW, RIGHT!!! And of course it loses your spot when you click in to check if that's the match you're looking for. The match history page really wasn't designed for anything older than your last 20 matches or so.

Modi1 votes

{quoted}

Wuks, you should also fix the match history site.

(That's entirely out of your control, but it's 2018. I wan't to open up a match history in a new tab).

So, being the enterprising developer that I am, I took a look. It looks to be built as a home-grown SPA framework, that works something like Angular, but not quite the same.

I have created a script that needs to be run before codex.js is run:

https://pastebin.com/fEXBJHAu

What this paste does:

  1. Overrides the function Jsoop.define (which allows us a hook into the functions of other parts of the application).
  2. Overrides the original implementation for Codex.history.view.summary.GameSummary.onElClick to pass the event object into the event handler.
  3. Overrides the original implementation for Codex.history.helper.View.onHistoryGameSummaryClick, to use the event object's properties, namely whether or not the ctrl button was pressed when clicking, to either: act normal (when ctrlnot pressed during click) or open in new tab (with ctrl pressed during click).

If you execute this script just before codex.js executes, then you can ctrl + click on match history items to open them in new tabs. Regular clicks work as normal. Teaching you how to run the code in the pastebin just before codex.js is executed is not in the scope of this exercise :-)

I wish I had SnagIt, Fraps, or an alternative to show you the code in action. Alright, I'm off to bed...enough tinkering for one night.

ModAttysu The Poro1 votes

I forwarded the feedback to Wuks, but in general there are certain limitations we have to fixing things on the Boards. I'm not very sure if this is something we can influence but it doesn't hurt to see!

More from Discuss the Boards

More by DrCyanide