mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-12 18:53:31 +02:00
Small change to Browser.climbUrlPath.
--HG-- extra : rebase_source : f9f68aff83c51c28812761306ad31cf8a9205d3a
This commit is contained in:
@@ -14,11 +14,8 @@
|
|||||||
const Browser = Module("browser", {
|
const Browser = Module("browser", {
|
||||||
}, {
|
}, {
|
||||||
climbUrlPath: function (count) {
|
climbUrlPath: function (count) {
|
||||||
try {
|
let url = util.newURI(buffer.URL);
|
||||||
var url = util.newURI(buffer.URL).QueryInterface(Ci.nsIURL);
|
dactyl.assert(url instanceof Ci.nsIURL);
|
||||||
}
|
|
||||||
catch (e) {}
|
|
||||||
dactyl.assert(url);
|
|
||||||
|
|
||||||
while (count-- && url.path != "/")
|
while (count-- && url.path != "/")
|
||||||
url.path = url.path.replace(/[^\/]+\/?$/, "")
|
url.path = url.path.replace(/[^\/]+\/?$/, "")
|
||||||
|
|||||||
Reference in New Issue
Block a user