Archived Comments (locked)
|
|
The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008) |
|
|
Thanks, when indexOf search in the whole URL, then this solution works. I don't see the %s position as so big limitation.
|
|
|
Syntax: If %s is omitted, I can't think of a good solution. You could change |
|
|
I would really like to use this script but unfortunately it is not working for me, possibly because of Firefox 3 and different keywords behavior (when there is no search string, %s in URL is omitted and not inserted, like in Fx2).
|
|
|
alien_scum: That's an interesting solution. I tried adjusting the code for this, but I won't in fact include it in this script, since it complicates things for little gain. Still, here's the code: var delimiter = "#http";
var launch_pad = /^about:cache#/;
var url = location.href.replace(launch_pad, '');
var parts = url.split(delimiter);
var search = parts[0];
var bookmark = "http" + parts.slice(1).join(delimiter);
if (search.indexOf("%s") != -1) {
location.replace(bookmark);
} else if (url != location.href) { // Using launch pad
location.replace(search);
} else {
location.hash = location.hash.split(delimiter)[0];
}
|
|
|
Sweet script, if you change it to about:cache#QUICKSEARCH_URL#BOOKMARK_URL then it will only open the right page. about:blank or a data url would be better but alas greasemonkey doesn't run on those. |
|
|
I would like for this script not to have to display the quick search page before redirecting to the bookmark page, but I don't see how. If you do, let me know. |