Skip to content

Instantly share code, notes, and snippets.

@Pum-purum
Created October 23, 2019 14:03
Show Gist options
  • Save Pum-purum/5cadefe6cbcc30737f39293ba14e3fe9 to your computer and use it in GitHub Desktop.
Save Pum-purum/5cadefe6cbcc30737f39293ba14e3fe9 to your computer and use it in GitHub Desktop.
JS add and delete params
var url = new URL(location.href);
url.searchParams.delete('LG');
url.searchParams.set('LG', 'YES');
location.href = url.href;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment