How can I use case switch with pathname and strip the guid that eventually gets attached to the URL?
here's what i've used:
*when the GUID comes in, i want to strip it from the URL and still use switch case to target the URL - the GUID. Are there any ways to do this?
var pushState = history.pushState;
function test(path) {
switch (path) {
case '/url here':
//execute code
break;
case 'url here' +*GUID GETS ADDED HERE :
//execute code
break;
history.pushState = function() {
pushState.apply(history, arguments);
test(document.location.pathname);
};