mergeInto(LibraryManager.library, { GetURLParameter: function (name) { const paramName = UTF8ToString(name); const search = window.location.search.substring(1); const params = new URLSearchParams(search); const value = params.get(paramName); console.log('GetURLParameter:', value); if (value) { var buffer = _malloc((value.length + 1) * 2); stringToUTF8(value, buffer, (value.length + 1) * 2); return buffer; } else { return 0; } } });