Skip to content

Commit

Permalink
Allow adjust Santa's location using a query parameter. (#202)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Brewer <[email protected]>
  • Loading branch information
lancehalberd and Chris Brewer authored Aug 8, 2024
1 parent f3ba7bb commit 30a15a1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions static/entrypoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -775,4 +775,16 @@ configureCustomKeys(loaderElement);
global.setState({trackerOffset});
};

// Outside of production, allow adjusting Santa's location using a query parameter.
if (window.location.hostname !== 'santatracker.google.com') {
try {
const params = new URLSearchParams(window.location.search);
const testLocation = params.get('adjustSanta');
if (testLocation >= 0 && testLocation <= 1) {
window.santaApp.adjustSanta(testLocation);
}
} catch (e) {
// ignore
}
}
}());

0 comments on commit 30a15a1

Please sign in to comment.