X-Git-Url: https://jasonwoof.com/gitweb/?p=userscripts.git;a=blobdiff_plain;f=youtube-html5-hider%2Fscript.js;fp=youtube-html5-hider%2Fscript.js;h=631f86d93863028a4b04604972bb7891c71f327d;hp=ea43d9b8a745ac0429732107d34343214b45878b;hb=06671dcd183f90d57fb3a08d0fe1d7366da59e92;hpb=f5c9dda67254d45bad0fcbb7d6c8d627817797d5
diff --git a/youtube-html5-hider/script.js b/youtube-html5-hider/script.js
index ea43d9b..631f86d 100644
--- a/youtube-html5-hider/script.js
+++ b/youtube-html5-hider/script.js
@@ -29,10 +29,10 @@
var objects = document.getElementsByTagName('object');
for (var i = objects.length - 1; i >= 0; --i) {
var object = objects[i];
- var match = object.data.match(/^http:\/\/www.youtube(-nocookie)?.com\/embed\/([^?]*)/)
+ var match = object.data.match(/^http:\/\/www.youtube(-nocookie)?.com\/(embed|v)\/([^?]*)/)
if (match) {
var div = document.createElement('div');
- div.innerHTML = 'YouTube: ' + match[2] + '';
+ div.innerHTML = 'YouTube: ' + match[3] + '';
replace(object, div);
}
}