From 051bc140e87f951bfd4801329216afec78e4ee54 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 12 Jul 2013 16:05:47 +0000 Subject: [PATCH] update isEmbedURL and isPrintURL methods --- static/js/pandora/utils.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index 531d2230..b44c7222 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -1311,15 +1311,13 @@ 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 + return /^#embed(\?.*?)?$/.test(hash); }; pandora.isPrintURL = function(url) { url = url || document.location.href; var hash = Ox.parseURL(url).hash; - return hash.substr(0, 2) == '#?' - && Ox.unserialize(hash.substr(2), true).print === true + return /^#print(\?.*?)?$/.test(hash); }; pandora.logEvent = function(data, event, element) {