From 10fc09446842746e61a35c91fc7f32046f6d2152 Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 21 Feb 2013 20:17:28 +0530 Subject: [PATCH] add pandora.isEmbedURL method --- static/js/pandora/utils.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index 5a6540db..c7447e74 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -1019,6 +1019,12 @@ pandora.isClipView = function(view, item) { ).indexOf(view) > -1; }; +pandora.isEmbedURL = function(url) { + var hash = Ox.parseURL(url).hash; + return hash.substr(0, 2) == '#?' + && Ox.unserialize(hash.substr(2)).embed === true +}; + pandora.logEvent = function(data, event, element) { var element = this, handlers = self.eventHandlers ? self.eventHandlers[event] : [];