The only side-effect is that it will allow users to manually configure the gallery you created (overwriting the configuration options you have carefully chosen and set) by using their own configuration options in the query string of a URL that they can construct and enter into their browser's address bar. However, unless visitors to your web site are familiar with Juicebox-Pro and wish to manually configure the gallery that is displayed before them, this is highly unlikely to happen.
An alternative solution (without setting debugMode="TRUE") would be to set a session cookie when the user clicks on the link to the gallery and, in the web page containing the gallery, the cookie would be read and its value would be used as the value for the showThumbsOnLoad configuration option (in the gallery's embedding code).
Here is an example:
Use the following code as a page with a couple of links to the same gallery (call the page 'main.html').
<!DOCTYPE html>
<html lang="en">
<head>
<title>Juicebox-Pro Gallery</title>
<meta charset="utf-8" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<script src="cookie.js"></script>
<style type="text/css">
body {
margin: 0px;
}
</style>
</head>
<body>
<div id="links">
<a href="index.html#12">Link without cookie set</a>
<br />
<a href="index.html#12" onclick="createCookie('showThumbsOnLoad', 'false'); return true;">Link <i>with</i> cookie set</a>
</div>
</body>
</html>
Use the following code as a gallery's 'index.html' page:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Juicebox-Pro Gallery</title>
<meta charset="utf-8" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<script src="cookie.js"></script>
<style type="text/css">
body {
margin: 0px;
}
</style>
</head>
<body>
<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>
var value = "true";
if (document.cookie.length > 0) {
var index = document.cookie.indexOf("showThumbsOnLoad");
if (index !== -1) {
var temp = readCookie("showThumbsOnLoad");
if (temp !== null) {
value = temp;
}
}
eraseCookie("showThumbsOnLoad");
}
new juicebox({
containerId: 'juicebox-container',
showThumbsOnLoad: value
});
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->
</body>
</html>
Put the following code into a file named 'cookie.js'. (This is the JavaScript code which handles creating, reading and deleting the cookie.)
function createCookie(name, value) {
document.cookie = name + "=" + escape(value) + "; path=/";
}
function readCookie(name) {
var re = new RegExp("(?:^|;)\\s?" + name + "=(.*?)(?:;|$)", "i"), result = document.cookie.match(re), output = null;
if (result !== null)
{
output = unescape(result[1]);
}
return output;
}
function eraseCookie(name) {
var d = new Date();
document.cookie = name + "=; path=/; expires=" + d.toUTCString();
}
Now put all the files into a sample gallery folder and open 'main.html' in a browser to see it in action.