171c52177527ae126d3186ff4c1e225dfcd7526d max Mon Feb 5 07:52:29 2024 -0800 fixing dumb bug in previous commit, refs #32925 diff --git src/hg/js/utils.js src/hg/js/utils.js index 11acfdd..04aabb9 100644 --- src/hg/js/utils.js +++ src/hg/js/utils.js @@ -2011,31 +2011,31 @@ function calculateHgTracksWidth() { // return appropriate width for hgTracks image given users current window width return $(window).width() - 20; } function addPixAndReloadPage() /* users who do not come in from hgGateway have no pix variable in the URL nor the cart. * This is a rare case, and the solution is brute force: if it happens, set pix, then reload the entire page. * This will only happen once to these users, as afterwards the cookie is set. */ { var winWidth = calculateHgTracksWidth(); var myUrl = window.location.href; var sep = '?'; - if (myUrl.indexOf('?'!==-1)) + if (myUrl.indexOf('?')!==-1) sep = '&'; var newUrl = myUrl+sep+"pix="+winWidth; window.location.href = newUrl; } function hgTracksSetWidth() { var winWidth = calculateHgTracksWidth(); if ($("#imgTbl").length === 0) { // XXXX what's this code for? $("#TrackForm").append('<input type="hidden" name="pix" value="' + winWidth + '"/>'); //$("#TrackForm").submit(); } else { $("input[name=pix]").val(winWidth); }