From a7e87647e095779c3c592f4d99908a945614f4a4 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 22 Jan 2014 12:25:17 +0000 Subject: [PATCH] dont set empty document.location.hash, causes # to show up in Firefox, fixes #1870 --- static/js/pandora.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/static/js/pandora.js b/static/js/pandora.js index f2b218ceb..5530df5af 100644 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -32,12 +32,14 @@ appPanel }; // handle legacy embed and print URLs - document.location.hash = document.location.hash.replace( - /^#\?(embed|print)=true(&)?/, - function() { - return '#' + arguments[1] + (arguments[2] ? '?' : ''); - } - ); + if ( document.location.hash) { + document.location.hash = document.location.hash.replace( + /^#\?(embed|print)=true(&)?/, + function() { + return '#' + arguments[1] + (arguments[2] ? '?' : ''); + } + ); + } var animationInterval, enableDebugMode = getLocalStorage('pandora.enableDebugMode'),