Skip to content

Instantly share code, notes, and snippets.

@tomchiverton
Last active March 26, 2021 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomchiverton/7e9020d98f144de6038c5f48026eee68 to your computer and use it in GitHub Desktop.
Save tomchiverton/7e9020d98f144de6038c5f48026eee68 to your computer and use it in GitHub Desktop.
https://www.formula1.com/en/f1-live.html
For dev console:
$.cookie('login-session', JSON.stringify({ data:{subscriptionToken:{ SubscriptionStatus :'active' }} }) )
window.jwt_decode = function( ){return { SubscriptionStatus :'active' } }
break @ webservice.js:2602
// subscriptionToken in cookie should be a base64 encoded JWT but unclear where checks
webservice.js:9255
timing.DM.REGISTERED = true;
timing.DM.sessiontype="R";
timing.DM.MODE = true;
$.cookie('login-session', JSON.stringify({ data:{subscriptionToken:{ SubscriptionStatus :'active' }} }) )
this:
// function readCookie(){
// var ret = true;
// timing.DM.REGISTERED = true;
// timing.DM.MODE = ret;
// return ret;
// }
/*** OLD
function readCookie() {
var ret = false;
if (window.jQuery && $.cookie) {
if ($.cookie("account-info")) {
timing.DM.REGISTERED = true;
var aI = JSON.parse($.cookie("account-info"));
ret = (aI.data && aI.data.subscriptionStatus && aI.data.subscriptionStatus === 'active');
timing.DM.MODE = ret;
}
}
return ret;
}*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment