// ==UserScript== // @name YouTube Music Mode // @namespace http://dotspencer.com // @version 0.5 // @description Redirects youtube videos to a simplified music page. // @author Spencer Smith // @match https://www.youtube.com/watch?v=_t1gfn9aqiQ // @include http*://www.youtube.com/watch?v=* // @downloadURL https://gist.github.com/dotspencer/9d7eebe3a2140dbeace9d3ece5671bf1/raw/ // @run-at document-start // @grant none // ==/UserScript== /* Gets parameters from the url Source: http://stackoverflow.com/a/11582513/3498950 */ function getURLParameter(name) { return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || null; } var id = getURLParameter("v"); window.location = "https://dotspencer.github.io/music-mode/?id=" + id;