From abac8e71e3250dd605343be50d583299bceb6680 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 1 Mar 2013 11:18:57 +0000 Subject: [PATCH] pandora.getVideoUrl -> pandora.getVideoURL, allow for pandora.isEmbedURL without argument --- static/js/pandora/utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index 8cacfa99b..08e4275af 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -918,7 +918,7 @@ pandora.getSortOperator = function(key) { ) > -1 ? '+' : '-'; }; -pandora.getVideoUrl = function(id, resolution, part) { +pandora.getVideoURL = function(id, resolution, part) { var prefix = pandora.site.site.videoprefix .replace('{id}', id) .replace('{part}', part) @@ -967,7 +967,7 @@ pandora.getVideoOptions = function(data) { options.video = {}; pandora.site.video.resolutions.forEach(function(resolution) { options.video[resolution] = Ox.range(data.parts).map(function(i) { - return pandora.getVideoUrl(data.item || pandora.user.ui.item, resolution, i + 1); + return pandora.getVideoURL(data.item || pandora.user.ui.item, resolution, i + 1); }); }); options.annotations = []; @@ -1045,6 +1045,7 @@ pandora.isClipView = function(view, item) { }; pandora.isEmbedURL = function(url) { + url = url || document.location.href; var hash = Ox.parseURL(url).hash; return hash.substr(0, 2) == '#?' && Ox.unserialize(hash.substr(2), true).embed === true