Skip to content

Instantly share code, notes, and snippets.

@rosenpin
Last active July 24, 2017 15:15
Show Gist options
  • Save rosenpin/904f1c37615c5bb7b5569d382c84508e to your computer and use it in GitHub Desktop.
Save rosenpin/904f1c37615c5bb7b5569d382c84508e to your computer and use it in GitHub Desktop.
Make Youtube videos full window instead of full screen, requires greasemonkey
// ==UserScript==
// @version 1.1
// @name Make Youtube videos full window instead of full screen
// @match *://www.youtube.com/*
// @run-at document-end
// @grant none
// @noframes
// ==/UserScript==
function updatePage(){
var l = window.location.href;
if(l.includes("youtube.com/watch?v=")){
l = l.replace("watch?v=","embed/");
l = l.replace("&pbjreload=10","");
l = l.split("&t=")[0]
l = l.split("&feature=")[0]
window.open(l,"_self");
}
}
setTimeout(function(){updatePage()},300)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment