Izkda / GuessThe.Game rewind

// ==UserScript==
// @name         GuessThe.Game rewind
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Allows you to play the puzzle games from previous days
// @author       Izkda
// @license      MIT
// @match        https://guessthe.game/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=guessthe.game
// @grant        none
// @require      https://raw.githubusercontent.com/schickling/timemachine/master/timemachine.js
// @run-at document-start
// ==/UserScript==

(function() {
    'use strict';
    timemachine.reset();
    var baseDate = new Date('2022-05-15');
    var puzzleSelected = window.prompt("Enter the # of the puzzle that you want to play:","1") - 1;

    if (puzzleSelected == null || puzzleSelected < 0){
        timemachine.reset();
    }else{
        baseDate.setTime(baseDate.getTime()+(puzzleSelected*864e5));

    timemachine.config({
       dateString: baseDate.toISOString()});
    }
})();