Skip to content

Instantly share code, notes, and snippets.

@eschulte
Created February 24, 2012 19:21
Show Gist options
  • Save eschulte/1903109 to your computer and use it in GitHub Desktop.
Save eschulte/1903109 to your computer and use it in GitHub Desktop.
remove parts of the current url following "?"
function remove_params(I)
{
var rx=/^(.*)\?/;
var url=I.buffer.current_uri.spec;
var match = rx.exec(url);
if(match)
{
I.window.minibuffer.message("matched");
I.window.minibuffer.message(match[1]);
apply_load_spec(I.buffer, match[1])
} else
I.window.minibuffer.message("didn't match the spec");
}
interactive(
"remove-params",
"clean parameter data from the current uri",
function(I){ remove_params(I) }
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment