-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Description
My code starts with:
var g_IsWINJS = (typeof Windows != "undefined" && typeof MSApp != "undefined") ? true : false;
var g_IsLocalHtml = window.location.protocol == 'file:' ? true : false; // OR window.location.href.indexOf("href") > -1
//var g_IsNodeWebkit = (typeof process == "object" /*&& process.versions['nw']*/) ? true : false;
var g_IsDesktop = (/*g_IsNodeWebkit ||*/ g_IsWINJS || g_IsLocalHtml) ? true : false;
var g_UseBase64 = (g_IsDesktop && !g_IsWINJS) ? true : false;
var g_ResizeTimeoutId = -1;
var g_Game = null;
function MaintainSearchParametersOnRefresh(){
const params = new URLSearchParams(window.location.search);
//params.set('newParam', 'newValue'); // Adding new ones
window.history.pushState({}, '', `${window.location.pathname}?${params}`);
};
MaintainSearchParametersOnRefresh();
However, I get an error when trying to compress with the line window.history.pushState({}, '', ${window.location.pathname}?${params});
This obviously works in the javascript.
Metadata
Metadata
Assignees
Labels
No labels