From c90dcb2283b128229e85f91f4045f0a1af2540f4 Mon Sep 17 00:00:00 2001 From: Matthew Petroff Date: Tue, 20 Sep 2016 20:03:54 -0400 Subject: [PATCH] Use fragment identifier for standalone viewer configuration. --- src/standalone/standalone.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/standalone/standalone.js b/src/standalone/standalone.js index 52db0f7..dbd63bd 100644 --- a/src/standalone/standalone.js +++ b/src/standalone/standalone.js @@ -6,8 +6,14 @@ function anError(error) { } function parseURLParameters() { - var URL = decodeURI(window.location.href).split('?'); - URL.shift(); + var URL; + if (window.location.hash.length > 0) { + // Prefered method since parameters aren't sent to server + URL = [window.location.hash.slice(1)]; + } else { + URL = decodeURI(window.location.href).split('?'); + URL.shift(); + } if (URL.length < 1) { // Display error if no configuration parameters are specified anError('No configuration options were specified.');