mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 23:57:59 +01:00
rename the 'location' property of vimperator.buffer to 'URL'
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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(/\/+$/, '');
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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 <code class=\"mapping\">o</code>, but preselects current URL in the <code class=\"command\">:open</code> 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 <code class=\"mapping\">t</code>, but preselects current URL in the <code class=\"command\">:tabopen</code> 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 = "./";
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user