PoliMiner Tournament Random Picks JS functions

Permalink

As said in the broadcast of the first pick on X (replay here), the method for picking selection was using a "last man standing" approach.

The procedure was:

  1. A browser window was opened.
  2. From the announce post, the console was opened to execute JS code.
  3. The code was pasted.
  4. A function to remove all elements from the page but the top players table to make room was called from the console.
  5. Another function was called to filter players from the table and leave only those that were active since 2 days before the pick.
  6. Another function was called to randomize the table and improve randomness.
  7. The function to select a random user from the table was called, removing one by one to everyone but one. That was the winner.

Here's the JS code that is being used for picking the winners:

Our website uses jQuery, and we relied on it to build the functions in the code below.

Copy
Please wait...

You can run it in the same way we did on the broadcast:

  1. Open your browser. Note: only works on a desktop PC!
  2. Go to the tournament announce post: https://policromix.com/poliminer-launch-tournament
  3. Open the console by hitting the F12 key or Ctrl-Shift-i or Cmd-Option-C on mac.
  4. Copy the JS code above and paste it on the console.
  5. Play with it 😊

Note: the sole purpose of the script above is to serve as a transparent and verifiable way for us to pick a random user for the event prize. It is disclosed "as is", without any hidden details, without any warranty of any kind.