Skip to content

Commit

Permalink
strip protocol from the video URLs, let the host websites add the req…
Browse files Browse the repository at this point in the history
…uired protocol
  • Loading branch information
Nikschavan committed Dec 6, 2015
1 parent 30071ed commit 0170506
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/gfycat_test_.js
Expand Up @@ -152,6 +152,9 @@ var gfyObject = function (gfyElem) {
function createVidTag() {
vid = document.createElement('video');
vid.className = 'gfyVid';
var protomatch = /^(https?):/;
gfyWebmUrl = gfyWebmUrl.replace(protomatch, '');
gfyMp4Url = gfyMp4Url.replace(protomatch, '');
if (optAutoplay)
vid.autoplay = true;
vid.loop = true;
Expand Down

0 comments on commit 0170506

Please sign in to comment.