This question previously described a leaderboard snippet which no longer exists. I am leaving this question here for historical purposes. Thank you to all who contributed.
2 Answers
First of all, we appreciate the effort. I have some concerns, though:
I'm not sure that having the snippet hosted externally and using an iframe is a good idea. The reason is that having the code be a copy/paste snippet allows it to work without adding a dependency on an external site that may or may not continue to be maintained.
A possible mitigation or solution to this is that someone besides you should have access to update the source code of your snippet. The moderators of this site, for example.
This doesn't remove the dependency on repl.it, but it does remove the dependency on your remaining active.
-
\$\begingroup\$ I'm definitely going to be moving to GitHub soon, and I'll make the repo a team effort (and include moderators on the project if they so widh). \$\endgroup\$– moltarzeApr 26, 2019 at 19:25
-
1\$\begingroup\$ @connectyourcharger The repl.it dependency can be easily moved to Github Pages, since everything in client-side. btw,
<pre>
is a block element, you should use<code>
instead for inline code. \$\endgroup\$ Apr 27, 2019 at 11:57
Previous issues fixed!
Some other thoughts though:
- Perhaps split the two leaderboards into two tabs for ease of access? Scrolling all the way to the second leaderboard is rather annoying.
- Winners by language should be sorted by language name rather than byte count
- When the question is not tagged code-golf perhaps "Score" would be a better descriptor for the final column instead of "Byte Count"
- A position column (like 1st, 2nd, 3rd etc.) would be good.
-
\$\begingroup\$ Very interesting with that first one. It could be an issue with one of the titles (like it not being formatted correctly). I'm going to add some
console.log
calls to make it easier to debug. Will report back shortly... \$\endgroup\$– moltarzeApr 26, 2019 at 10:32 -
\$\begingroup\$ Aha! The contender appears to be this question, as it is not a standard question title format. I just added a simple
try
/catch
block so that the answer is not included in the table. Simple fix, thanks for noticing :) \$\endgroup\$– moltarzeApr 26, 2019 at 10:36 -
\$\begingroup\$ As for the
Hello World
question, we'll have to see about that. It may just be a bug in the recursive fetching. \$\endgroup\$– moltarzeApr 26, 2019 at 10:47 -
1\$\begingroup\$ I found the issue with the Hello World question, I'll implement a fix later. Thanks for pointing it out! \$\endgroup\$– moltarzeApr 26, 2019 at 10:59
-