Skip to content

Instantly share code, notes, and snippets.

@zendulu
zendulu / racenet-minified.js
Last active September 1, 2025 02:47
EA Sports WRC Club script. You can use this script to help navigate EA Sports WRC Racenet clubs. Join Barrel rollers discord: https://discord.gg/barrelrollers and See: https://discord.com/channels/612903610061422592/1153198692401164349/1339769793481408592 for instructions on how to use. minified version of https://gist.github.com/zendulu/568d342…
function getOptions(token=false){const options={headers:{accept:"application/json, text/plain, */*","accept-language":"en-US,en;q=0.6","content-type":"application/json"},referrer:"https://racenet.com/",referrerPolicy:"strict-origin-when-cross-origin",method:"GET",credentials:"include"};if(token!==false){options.headers.authorization=`Bearer ${token}`}return options}function strings(name){switch(name){case"STAGE_INFO_SHOW":return"Show Stages";case"STAGE_INFO_HIDE":return"Hide Stages";default:return"Unhandled"}}function consts(name){switch(name){case"SECONDS_IN_DAY":return 86400;case"SECONDS_IN_HOUR":return 3600;case"SECONDS_IN_MINUTE":return 60}}async function getBearer(){const url="https://web-api.racenet.com/api/identity/refresh-auth";const options=getOptions();options.method="POST";options.body='{"clientId":"RACENET_1_JS_WEB_APP","grantType":"refresh_token","refreshToken":"","redirectUri":"https://racenet.com/oauthCallback","authCode":"","codeVerifier":""}';const response=await fetch(url,options);const data
@zendulu
zendulu / racenet.js
Last active September 1, 2025 02:43
Get Racenet WRC2023 clubs in finish order.
function getOptions(token = false) {
const options = {
headers: {
accept: "application/json, text/plain, */*",
"accept-language": "en-US,en;q=0.6",
"content-type": "application/json",
},
referrer: "https://racenet.com/",
referrerPolicy: "strict-origin-when-cross-origin",
method: "GET",