I hacked time in Chrome for a demo video
dev.to·11h·
Discuss: DEV
Flag this post

How I made Chrome believe a full workday passed in seconds to record a Timesheetr demo video.

I wanted to demo how easy it is to add entries to Timesheetr, use the keyboard shortcuts, and basically show how it would be used throughout the day to track timesheets.

Problem: I couldn’t just wait for the whole day to pass and screen-capture the process over 8 hours. So I had to make Chrome think that time had changed in between my timesheet entries.

See, when you add an entry in Timesheetr, it automatically ends the previous one at the time of the new entry and calculates its duration.

My demo would have been terrible if every entry had the same timestamp.

So, using a few lines of JavaScript in Chrome’s DevTools, I overrode the browser’s Date object to make my app think …

Similar Posts

Loading similar posts...