Skip to content

Instantly share code, notes, and snippets.

@brachkow
Last active November 8, 2024 13:36
Show Gist options
  • Save brachkow/77c066e8076d96988b8d7c82dcdf39b6 to your computer and use it in GitHub Desktop.
Save brachkow/77c066e8076d96988b8d7c82dcdf39b6 to your computer and use it in GitHub Desktop.
Bookmarklets
javascript:(function() {
window.open('https://archive.is/?run=1&url=' + encodeURIComponent(window.location.href));
})();
javascript:(function() {
var url = window.location.href;
var match = url.match(/watch\?v=([a-zA-Z0-9_-]+)/);
if (match) {
var videoId = match[1];
var embedUrl = 'https://www.youtube.com/embed/' + videoId;
window.location.href = embedUrl;
} else {
alert('Not a valid YouTube watch URL.');
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment