Skip to content

Instantly share code, notes, and snippets.

@mgussekloo
Created September 27, 2021 09:40
Show Gist options
  • Save mgussekloo/3e6a8b324b74652a7328dfec0dabccdf to your computer and use it in GitHub Desktop.
Save mgussekloo/3e6a8b324b74652a7328dfec0dabccdf to your computer and use it in GitHub Desktop.
<script>
document.addEventListener('click', function(e) {
// If the clicked element doesn't have the right selector, bail
if (!event.target.matches('a[href="#mm"]')) return;
e.preventDefault();
var getparams = {};
window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { getparams[key] = value; });
window.location.href = 'https://api.mediamasters.nl/external-game/session-result?sessionId=' + getparams.sessionId;
return;
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment