diff --git a/chrome/content/vimperator/buffers.js b/chrome/content/vimperator/buffers.js index 995d4738..794de5db 100644 --- a/chrome/content/vimperator/buffers.js +++ b/chrome/content/vimperator/buffers.js @@ -113,9 +113,9 @@ function Buffer() //{{{ ////////////////////// PUBLIC SECTION ////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////{{{ - this.__defineGetter__("location", function() + this.__defineGetter__("URL", function() { - return window.content.document.location.href; + return window.content.document.URL; }); this.__defineGetter__("pageHeight", function() diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js index b5cd8601..adcc5657 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -274,7 +274,7 @@ function Commands() //{{{ { if (result.url == null) { - result.url = vimperator.buffer.location; + result.url = vimperator.buffer.URL; // also guess title if the current url is :bmarked if (result.title == null) result.title = vimperator.buffer.title; @@ -355,7 +355,7 @@ function Commands() //{{{ if (result) { if (result.url == null) - result.url = vimperator.buffer.location; + result.url = vimperator.buffer.URL; var deleted_count = vimperator.bookmarks.remove(result.url); vimperator.echo(deleted_count + " bookmark(s) with url `" + result.url + "' deleted"); @@ -823,7 +823,7 @@ function Commands() //{{{ if (matches1 && matches1[1]) vimperator.quickmarks.add(matches1[1], matches1[2]); else if (matches2 && matches2) - vimperator.quickmarks.add(matches2[1], vimperator.buffer.location); + vimperator.quickmarks.add(matches2[1], vimperator.buffer.URL); else vimperator.echoerr("E488: Trailing characters"); }, @@ -1245,7 +1245,7 @@ String.prototype.toURLArray = function() // {{{ begin: for (var url = 0; url < urls.length; url++) { - var newLocation = vimperator.buffer.location; + var newLocation = vimperator.buffer.URL; // FIXME: classic '10 second hack' to fix "gu" foobar//../ problem newLocation = newLocation.replace(/\/+$/, ''); diff --git a/chrome/content/vimperator/events.js b/chrome/content/vimperator/events.js index b1765014..e4fd58d8 100644 --- a/chrome/content/vimperator/events.js +++ b/chrome/content/vimperator/events.js @@ -185,7 +185,7 @@ function Events() //{{{ vimperator.buffer.updateBufferList(); //update history - var url = vimperator.buffer.location; + var url = vimperator.buffer.URL; var title = vimperator.buffer.title; vimperator.history.add(url, title); diff --git a/chrome/content/vimperator/mappings.js b/chrome/content/vimperator/mappings.js index ff9651ff..2c3634bb 100644 --- a/chrome/content/vimperator/mappings.js +++ b/chrome/content/vimperator/mappings.js @@ -536,7 +536,7 @@ function Mappings() //{{{ return; } - vimperator.quickmarks.add(arg, vimperator.buffer.location) + vimperator.quickmarks.add(arg, vimperator.buffer.URL) }, { short_help: "Add new QuickMark for current URL", @@ -554,7 +554,7 @@ function Mappings() //{{{ } )); addDefaultMap(new Map(vimperator.modes.NORMAL, ["O"], - function() { vimperator.commandline.open(":", "open " + vimperator.buffer.location, vimperator.modes.EX); }, + function() { vimperator.commandline.open(":", "open " + vimperator.buffer.URL, vimperator.modes.EX); }, { short_help: "Open one or more URLs in the current tab, based on current location", help: "Works like o, but preselects current URL in the :open query." @@ -603,7 +603,7 @@ function Mappings() //{{{ } )); addDefaultMap(new Map(vimperator.modes.NORMAL, ["T"], - function() { vimperator.commandline.open(":", "tabopen " + vimperator.buffer.location, vimperator.modes.EX); }, + function() { vimperator.commandline.open(":", "tabopen " + vimperator.buffer.URL, vimperator.modes.EX); }, { short_help: "Open one ore more URLs in a new tab, based on current location", help: "Works like t, but preselects current URL in the :tabopen query." @@ -620,9 +620,9 @@ function Mappings() //{{{ addDefaultMap(new Map(vimperator.modes.NORMAL, ["y"], function() { - var loc = vimperator.buffer.location; - vimperator.copyToClipboard(loc); - vimperator.echo("Yanked " + loc); + var url = vimperator.buffer.URL; + vimperator.copyToClipboard(url); + vimperator.echo("Yanked " + url); }, { short_help: "Yank current location to the clipboard", @@ -867,7 +867,7 @@ function Mappings() //{{{ function(count) { var gocmd = ""; - if (isDirectory(vimperator.buffer.location)) + if (isDirectory(vimperator.buffer.URL)) gocmd = "../"; else gocmd = "./"; diff --git a/chrome/content/vimperator/ui.js b/chrome/content/vimperator/ui.js index db397409..190eaca9 100644 --- a/chrome/content/vimperator/ui.js +++ b/chrome/content/vimperator/ui.js @@ -828,7 +828,7 @@ function StatusLine() //{{{ this.updateUrl = function(url) { if (!url || typeof url != "string") - url = vimperator.buffer.location; + url = vimperator.buffer.URL; url_widget.value = url; };