1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-03 20:04:11 +01:00

Small change to Browser.climbUrlPath.

--HG--
extra : rebase_source : f9f68aff83c51c28812761306ad31cf8a9205d3a
This commit is contained in:
Kris Maglione
2010-10-21 19:54:27 -04:00
parent 7f61f49841
commit f78a7174e3

View File

@@ -14,11 +14,8 @@
const Browser = Module("browser", {
}, {
climbUrlPath: function (count) {
try {
var url = util.newURI(buffer.URL).QueryInterface(Ci.nsIURL);
}
catch (e) {}
dactyl.assert(url);
let url = util.newURI(buffer.URL);
dactyl.assert(url instanceof Ci.nsIURL);
while (count-- && url.path != "/")
url.path = url.path.replace(/[^\/]+\/?$/, "")