Created
February 24, 2012 19:21
-
-
Save eschulte/1903109 to your computer and use it in GitHub Desktop.
remove parts of the current url following "?"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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