Mercurial > my-ubiquity-commands
diff chromeless-browsing/chromeless.js @ 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 | 6b955e36a9e9 |
children | 426e9c04c6f9 |
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>."); + } +});