Skip to content

Instantly share code, notes, and snippets.

@lewdev
Created February 6, 2019 20:19
Show Gist options
  • Save lewdev/4e92fccfebdf39462ba9c324b9991443 to your computer and use it in GitHub Desktop.
Save lewdev/4e92fccfebdf39462ba9c324b9991443 to your computer and use it in GitHub Desktop.
Allows you to completely reload the YouTube page and start where you left off. Create a shortcut and enter this into the "URL" field.
javascript: (function () {
var re = window.location.href.match(/v=([^\?&"'>]+)/g);
if (re && re.length > 0) {
window.location='https://youtu.be/' + re[0].split('=')[1] + "?t=" + Math.round(document.getElementById('movie_player').getCurrentTime());
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment