How to add a new parameter to the URL without affecting the current working

 newUrl = window.location.href + ‘?/toggle=enprimeur’;window.history.pushState({ path: newUrl }, ”, newUrl); This code replaces the last segment of the current URL with the string ‘retail’ and updates the browser’s history state with the new URL. Thus it will not cause any issues in the current working. Otherwise we will get “page not found” error after adding… Continue reading How to add a new parameter to the URL without affecting the current working

Java Script – encodeURI() & decodeURI()

encodeURI():This function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character. It returns a new string representing the provided string encoded as a URI. This method does not encode characters like: , / ? : @ & = + $ * #Use the encodeURIComponent() method instead. decodeURI():This function… Continue reading Java Script – encodeURI() & decodeURI()

External url for the script record created

To get the script url to use in the code. In script record check the checkbox available without login and then save. Then the external available link will be available there. To enable or disable web store triggers for a user event script deployment: Open the script deployment record, for a user event script, for… Continue reading External url for the script record created