commit c240ec86c5d76617a335fc2f454e5560e8efeb85 parent 78670d05317373bbf46b9325dc22621474653b91 Author: Anders Damsgaard <anders.damsgaard@geo.au.dk> Date: Wed, 14 May 2014 19:57:30 +0200 bugfix Diffstat:
M | .config/dwb/userscripts/youtube-mplayer.js | | | 12 | ++++++------ |
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/.config/dwb/userscripts/youtube-mplayer.js b/.config/dwb/userscripts/youtube-mplayer.js @@ -1,9 +1,9 @@ -//!javascript -// opens YouTube videos with mplayer after youtube-dl download -var regex = new RegExp("http(.*)://www.youtube.com/watch\\?(.*&)*v=.*); +//!javascript +// opens YouTube videos with mplayer. +var regex = new RegExp("http(.*)://www.youtube.com/watch\\?(.*&)*v=.*"); Signal.connect("navigation", function (wv, frame, request) { - if (wv.mainFrame == frame && regex.test(request.uri)) - system.spawn("sh -c 'mplayer \"$(youtube-dl -g " + request-uri + ")\"'"); - return false; + if (wv.mainFrame == frame && regex.test(request.uri)) + system.spawn("sh -c 'mplayer \"$(youtube-dl -g " + request.uri + ")\"'"); + return false; });