Skip to content

Instantly share code, notes, and snippets.

@0x263b
Created October 22, 2018 06:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0x263b/700d4d9d07bb59fbb8a7e3de56adc959 to your computer and use it in GitHub Desktop.
Save 0x263b/700d4d9d07bb59fbb8a7e3de56adc959 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Toogles
// @version 2018.10.22
// @description Redirect youtube to toogles
// @author Abram
// @match https://www.youtube.com/watch?v=*
// @run-at document-start
// @license MIT License
// ==/UserScript==
(function() {
'use strict';
var video = window.location.href.match(/https:\/\/www\.youtube\.com\/watch\?v=(.{11})/);
window.location.href = `https://toogl.es/#/view/${video[1]}`;
// Your code here...
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment