News for hackers. Stuff that matters.
Re:YouTubeSkip by duncans on Wednesday September 18, 2013 @09:29AM (#6405057)
Kind of surprised there wasn't a bookmarklet. Here you go:

    javascript:if(/youtube\.com\/watch\?v=([^&]+)/.test(location)){location='http://www.youtubeskip.com/watch?v='+RegExp.$1;}
Re:YouTubeSkip by tehwebguy on Wednesday September 18, 2013 @10:05AM (#6405277)
I didn't realize you could use RegExp.$1 ( .. $n) until just now. Thanks!
Re:YouTubeSkip by nticompass on Wednesday September 18, 2013 @10:32AM (#6405470)
You can, but it's highly suggested you don't. First off, it's a deprecated property. Second, RegExp.$1 is the 1st match of the last RegExp ran. No matter where in your page it was ran. Extensions, events, functions, wherever. In this case, it should be safe, but don't ever actually use it on your page.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...