Mercurial > my-ubiquity-commands
changeset 11:8e00d50976d9
Added a 'where-am-i' command to the chromeless browsing feed.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Fri, 27 Mar 2009 20:27:36 -0700 |
parents | ce299b866e9a |
children | 3a961cecdd45 |
files | chromeless-browsing/chromeless.js |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/chromeless-browsing/chromeless.js Fri Mar 27 17:46:31 2009 -0700 +++ b/chromeless-browsing/chromeless.js Fri Mar 27 20:27:36 2009 -0700 @@ -87,3 +87,12 @@ tabs.style.height = "0px"; tabs.style.marginTop = "-500px"; } + +CmdUtils.CreateCommand({ + name: "where-am-i", + preview: function(pblock, dobj) { + var loc = CmdUtils.getWindow().location; + pblock.innerHTML = ("Your current URL is <tt>" + + Utils.escapeHtml(loc.href) + "</tt>."); + } +});