Skip to content

Commit

Permalink
missing dash in youtube regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Julie Lala committed Dec 18, 2013
1 parent f1401c7 commit 3cd245c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/okvideo.js
Expand Up @@ -127,8 +127,8 @@ var player, OKEvents, options;
return { "provider" : "youtube", "id" : a.href.slice(a.href.indexOf('v=') + 2).toString() };
} else if (/vimeo.com/.test(base.options.video)) {
return { "provider" : "vimeo", "id" : a.href.split('/')[3].toString() };
} else if (/[A-Za-z0-9_]+/.test(base.options.video)) {
var id = new String(base.options.video.match(/[A-Za-z0-9_]+/));
} else if (/[-_A-Za-z0-9]+/.test(base.options.video)) {
var id = new String(base.options.video.match(/[-_A-Za-z0-9]+/));
if (id.length == 11) {
return { "provider" : "youtube", "id" : id.toString() };
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/okvideo.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3cd245c

Please sign in to comment.