Reputation: 24588
Is the following possible with a bookmarklet?
I have this but it fails silently on firefox. I haven't tried it with another browser:
javascript:(
function()
{
key = encodeURI('include_docs'); value = encodeURI('true');
var kvp = document.location.search.substr(1).split('&');
var i=kvp.length; var x; while(i--)
{
x = kvp[i].split('=');
if (x[0]==key)
{
x[1] = value;
kvp[i] = x.join('=');
break;
}
}
if(i<0) {kvp[kvp.length] = [key,value].join('=');}
//this will reload the page, it's likely better to store this until finished
document.location.search = kvp.join('&');
}()
);
Upvotes: 3
Views: 1419
Reputation: 72839
No need to over-complicate anything ;-)
document.location += '&include_docs=true';
That should do the trick. In bookmarklet form:
javascript:(function(){document.location+='&include_docs=true'}());
Upvotes: 6