diff --git a/Video Zen.user.js b/Video Zen.user.js index af29d0e..94ada52 100644 --- a/Video Zen.user.js +++ b/Video Zen.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Video Zen // @namespace http://bullercodeworks.com -// @version 0.2 +// @version 0.3 // @description Watch video in 'zen' mode // @author brian@bullercodeworks.com // @match http*://*/* @@ -77,7 +77,6 @@ } function canZen() { var v = document.getElementsByTagName('video')[0]; - console.log(v); return v != null; } function doPressEscape() { @@ -97,6 +96,12 @@ console.log("Zen mode cannot be activated."); } } + function doSetWidthTo100() { + if(zenExists()) { + var v = document.getElementsByTagName('video')[0]; + v.style.width = '100%'; + } + } document.addEventListener('keyup',(e)=>{ console.log("Event Caught"); @@ -104,6 +109,9 @@ case 'Escape': doPressEscape(); break; + case 'KeyW': + doSetWidthTo100(); + break; } }); })();