Skip to content

Instantly share code, notes, and snippets.

@carlosefonseca
Created November 22, 2020 20:33
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlosefonseca/33ed32786b530dcb58f7efc2cae70bdc to your computer and use it in GitHub Desktop.
Save carlosefonseca/33ed32786b530dcb58f7efc2cae70bdc to your computer and use it in GitHub Desktop.
Paste this into the dev console in statshunters.com map view and see an animation of your activities.
var setDate = new Date("2019-01-01");
var today = new Date();
var dateDiv = document.getElementById("date")
if (dateDiv === null) {
dateDiv = document.createElement("div")
dateDiv.id = "date"
dateDiv.style = "float: left; margin-left: 30px; margin-top: 15px;"
$("#total").parent().append(dateDiv)
}
var temp1 = $('div.right_panel')[1].__vue__.$parent
function update() {
if (setDate.getTime() >= today) { return }
var x = new Date(setDate)
x.setDate(setDate.getDate() + 1);
setDate = x
temp1.dateTo = setDate;
dateDiv.innerText = setDate.toISOString().substring(0, 10);
setTimeout(update, 200)
}
update()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment