Created
October 22, 2018 06:03
-
-
Save 0x263b/700d4d9d07bb59fbb8a7e3de56adc959 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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