CodeJam does not have filter by country feature — annoying, what to do?
Difference between en6 and en7, changed 1 character(s)
CodeJam is a great platform with interesting problems. But I think I'm not the only one who is annoyed because you can not filter all the participants from your country. That feature can help you to find your friends who are participating too, but you can find them if you know their username beforehand.↵

I have found a work-around solution for that. ↵

-  Copy this ↵

<spoiler summary="BLAHBLAH">↵
javascript:const country=prompt().toLowerCase(),button=document.querySelector(".ranking-table-pagination-chevron-right").parentElement.parentElement,getHash=()=>{return Array.from(document.getElementsByClassName("penalty-time")).reduce((e,t)=>e+=t.innerText,"")};let answer=[];const doCurPage=()=>{const e=Array.from(document.getElementsByTagName("img")).filter(e=>(e.src||"").toLowerCase().includes(country)).map(e=>e.parentElement.innerText);console.log(e),answer=[...new Set([...answer,...e])],console.clear(),console.log(answer)};let hash=getHash();const hashChanges=()=>new Promise(e=>{const t=getHash();t!=hash?(hash=t,e()):setTimeout(()=>{hashChanges().then(e)},500)}),loop=async()=>{doCurPage(),button.click(),await hashChanges(),loop()};loop();↵
</spoiler>↵

 ↵

- Create a new bookmark on your browser with the above url↵

- Then visit CodeJam leaderboard page, e.g. [2020 CodeJam Qualification Round](https://codingcompetitions.withgoogle.com/codejam/round/000000000019fd27) (you can do it even in incognito mode, if you are suspicious about the security)
.

- When the page finished loading, click the bookmark you just added.↵

- There will be a window &mdash; write the name of your country there e.g. ("Sweden", "Armenia", "India").↵

- Open the browser console `F12` &mdash; you'll see the list of participants from your country growing step by step.↵

- The list will gradually increase in size with more pages parsed. Look for familiar people :)↵

- If you are happy at some point and don't want to continue, type `debugger` in the console, and freely explore the list.↵

An example of output: (for "India").↵
![ ](/predownloaded/8a/27/8a27abd7bffa07e867a3650e901c06349a461000.png)↵

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en8 English RubenAshughyan 2020-04-04 22:11:54 1 Tiny change: ' above url\n\n- Then' -> ' above url.\n\n- Then'
en7 English RubenAshughyan 2020-04-04 16:57:39 1 Tiny change: ' security)\n\n- When' -> ' security).\n\n- When'
en6 English RubenAshughyan 2020-04-04 14:58:01 1 Tiny change: 'e the list\n\nAn exa' -> 'e the list.\n\nAn exa'
en5 English RubenAshughyan 2020-04-04 14:47:35 124
en4 English RubenAshughyan 2020-04-04 14:44:21 13
en3 English RubenAshughyan 2020-04-04 14:43:39 7
en2 English RubenAshughyan 2020-04-04 14:42:59 81
en1 English RubenAshughyan 2020-04-04 14:40:21 1963 Initial revision (published)