Skip to content

Instantly share code, notes, and snippets.

@Tibowl
Tibowl / improved-24urenloop.user.js
Last active October 23, 2019 15:32
Better leaderboard for 24 urenloop
// ==UserScript==
// @name Better 24 urenloop leaderboard
// @version 0.2
// @description Improve leaderboard by adding team numbers & lap difference
// @author Tibo
// @match http://*.24urenloop.be/
// @grant none
// ==/UserScript==
(function() {
var possibleRank = [8931, 1201, 1156, 5061, 4569, 4732, 3779, 4568, 5695, 4619, 4912, 5669, 6586];
// Not changed since 1/8/2016
// var possibleRank = [[], [], [], [], [], [], [], [], [], [], [], [], [], []];
var possibleUserKey = [];
function checkMedal(decriptKey, api_medal) {
var medals = api_medal / (decriptKey + 1853) - 157;
return medals == Math.floor(medals) && medals >= 0 && medals < 50;
}
function checkRate(decriptKey, userKey, api_rate) {