- history
- back / forward / home / refresh / page-down / page-up
- bookmark / print
- preferences
- delete-cache
- turn on / off plugins and themes
- fullscreen
- downloads
- url (goto)
- quit
Thus replacing the need for a menubar at all. Also just the ctrl key
could be the hotkey so that ctrl b (back), ctrl f (forward), u (up), d
(down)
would work.
Hi Braydon,
Those would be an excellent set of commands. Want to take a shot at creating them and we'll pull them into Ubiq!
Aza wrote:I'll take a look.Hi Braydon,
Those would be an excellent set of commands. Want to take a shot at creating them and we'll pull them into Ubiq!
Looks like Christian also stepped up. :)
Braydon
-- aza | ɐzɐ --
On Mon, Jan 5, 2009 at 12:31 AM, Braydon Fuller <cou...@braydon.com> wrote:
Was just searching through the Herd, and default commands
and was really wondering why there are not any "browser"
commands? Such as:
- history
- back / forward / home / refresh / page-down / page-up
- bookmark / print
- preferences
- delete-cache
- turn on / off plugins and themes
- fullscreen
- downloads
- url (goto)
- quit
(...)
Before anyone else spends time on it, I'll just check off the ones I've done so far
- history
- back / forward / home / refresh / page-down / page-upback, forward, home, refresh
Do you know where error messages go? Errors seem to pass silently.
Braydon
CmdUtils.getURLSnapshot = function(url, options){
if(!options) options = {};
var hw = CmdUtils.getHiddenWindow();
hw.document.location.href = url;
cw = CmdUtils.getWindow()
hw.innerWidth = cw.innerWidth
hw.innerHeight = cw.innerHeight
var th_hw = CmdUtils.getHiddenWindow();
var th =
th_hw.document.createElementNS("http://www.w3.org/1999/xhtml", "canvas" );
width = options.width || 200;
var scale = width / hw.innerWidth;
var ratio = hw.innerHeight / hw.innerWidth;
th.mozOpaque = true;
th.width = width;
th.height = th.width * ratio;
var ctx = th.getContext("2d");
ctx.scale(scale, scale);
ctx.drawWindow(hw, hw.scrollX, hw.scrollY,
hw.innerWidth, hw.innerWidth, "rgb(255,255,255)");
return th.toDataURL("image/jpeg", "quality=90");
}
var noun_type_history = {
_name: "history urls",
suggest: function( text, html ) {
var suggestions = [];
var history = CmdUtils.getWindow().history;
for ( var i = 0; i < history.length; i++ ) {
url = history[i];
if (url.match(text, "i"))
suggestions.push(CmdUtils.makeSugg(url));
}
return suggestions.splice(0, 5);
}
};
CmdUtils.CreateCommand({
name: "back",
description: "Go one step back in history",
takes: {"input": noun_type_history},
preview: function( pblock, input ) {
if (input.text) {var url = input.text;
} else { var url = CmdUtils.getWindow().history.previous;}
var imgData = CmdUtils.getURLSnapshot(url, {width:500} );
pblock.innerHTML = "Changes to <b style=\"color:yellow\">%s</b>
document.".replace(/%s/, url);
pblock.innerHTML += "<br/><img src='%s'>".replace(/%s/, imgData );
},
execute: function(input) {
if (input.text){
CmdUtils.getWindow().location.href = input.text;
} else {
CmdUtils.getWindow().history.go(-1);
}
}
});