1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 00:57:59 +01:00

whitespace formatting fixes

This commit is contained in:
Doug Kearns
2007-11-10 15:06:07 +00:00
parent 7e59f88c96
commit 2c5655e182
17 changed files with 692 additions and 692 deletions

View File

@@ -26,7 +26,7 @@ the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
}}} ***** END LICENSE BLOCK *****/
vimperator.Buffer = function() //{{{
vimperator.Buffer = function () //{{{
{
////////////////////////////////////////////////////////////////////////////////
////////////////////// PRIVATE SECTION /////////////////////////////////////////
@@ -129,43 +129,43 @@ vimperator.Buffer = function() //{{{
this.lastInputField = null; // used to keep track of the right field for "gi"
this.__defineGetter__("URL", function()
this.__defineGetter__("URL", function ()
{
// TODO: .URL is not defined for XUL documents
//return window.content.document.URL;
return window.content.document.location.href;
});
this.__defineGetter__("pageHeight", function()
this.__defineGetter__("pageHeight", function ()
{
return window.content.innerHeight;
});
this.__defineGetter__("textZoom", function()
this.__defineGetter__("textZoom", function ()
{
return getBrowser().mCurrentBrowser.markupDocumentViewer.textZoom * 100;
});
this.__defineSetter__("textZoom", function(value)
this.__defineSetter__("textZoom", function (value)
{
setZoom(value, false);
});
this.__defineGetter__("fullZoom", function()
this.__defineGetter__("fullZoom", function ()
{
return getBrowser().mCurrentBrowser.markupDocumentViewer.fullZoom * 100;
});
this.__defineSetter__("fullZoom", function(value)
this.__defineSetter__("fullZoom", function (value)
{
setZoom(value, true);
});
this.__defineGetter__("title", function()
this.__defineGetter__("title", function ()
{
return window.content.document.title;
});
// returns an XPathResult object
this.evaluateXPath = function(expression, doc, elem, asIterator)
this.evaluateXPath = function (expression, doc, elem, asIterator)
{
if (!doc)
doc = window.content.document;
@@ -191,7 +191,7 @@ vimperator.Buffer = function() //{{{
// in contrast to vim, returns the selection if one is made,
// otherwise tries to guess the current word unter the text cursor
// NOTE: might change the selection
this.getCurrentWord = function()
this.getCurrentWord = function ()
{
var selection = window.content.getSelection().toString();
@@ -211,7 +211,7 @@ vimperator.Buffer = function() //{{{
return selection;
}
this.list = function(fullmode)
this.list = function (fullmode)
{
if (fullmode)
{
@@ -258,12 +258,12 @@ vimperator.Buffer = function() //{{{
}
}
this.scrollBottom = function()
this.scrollBottom = function ()
{
scrollToPercentiles(-1, 100);
}
this.scrollColumns = function(cols)
this.scrollColumns = function (cols)
{
var win = window.document.commandDispatcher.focusedWindow;
const COL_WIDTH = 20;
@@ -274,42 +274,42 @@ vimperator.Buffer = function() //{{{
win.scrollBy(COL_WIDTH * cols, 0);
}
this.scrollEnd = function()
this.scrollEnd = function ()
{
scrollToPercentiles(100, -1);
}
this.scrollLines = function(lines)
this.scrollLines = function (lines)
{
var win = window.document.commandDispatcher.focusedWindow;
checkScrollYBounds(win, lines);
win.scrollByLines(lines);
}
this.scrollPages = function(pages)
this.scrollPages = function (pages)
{
var win = window.document.commandDispatcher.focusedWindow;
checkScrollYBounds(win, pages);
win.scrollByPages(pages);
}
this.scrollToPercentile = function(percentage)
this.scrollToPercentile = function (percentage)
{
scrollToPercentiles(-1, percentage);
}
this.scrollStart = function()
this.scrollStart = function ()
{
scrollToPercentiles(0, -1);
}
this.scrollTop = function()
this.scrollTop = function ()
{
scrollToPercentiles(-1, 0);
}
// TODO: allow callback for filtering out unwanted frames? User defined?
this.shiftFrameFocus = function(count, forward)
this.shiftFrameFocus = function (count, forward)
{
if (!window.content.document instanceof HTMLDocument)
return;
@@ -317,7 +317,7 @@ vimperator.Buffer = function() //{{{
var frames = [];
// find all frames - depth-first search
(function(frame)
(function (frame)
{
if (frame.document.body.localName.toLowerCase() == "body")
frames.push(frame);
@@ -331,7 +331,7 @@ vimperator.Buffer = function() //{{{
// remove all unfocusable frames
// TODO: find a better way to do this - walking the tree is too slow
var start = document.commandDispatcher.focusedWindow;
frames = frames.filter(function(frame) {
frames = frames.filter(function (frame) {
frame.focus();
if (document.commandDispatcher.focusedWindow == frame)
return frame;
@@ -404,11 +404,11 @@ vimperator.Buffer = function() //{{{
doc.body.appendChild(indicator);
// remove the frame indicator
setTimeout(function() { doc.body.removeChild(indicator); }, 500);
setTimeout(function () { doc.body.removeChild(indicator); }, 500);
}
// updates the buffer preview in place only if list is visible
this.updateBufferList = function()
this.updateBufferList = function ()
{
if (!vimperator.bufferwindow.visible())
return false;
@@ -421,7 +421,7 @@ vimperator.Buffer = function() //{{{
// XXX: should this be in v.buffers. or v.tabs.?
// "buffer" is a string which matches the URL or title of a buffer, if it
// is null, the last used string is used again
this.switchTo = function(buffer, allowNonUnique, count, reverse)
this.switchTo = function (buffer, allowNonUnique, count, reverse)
{
if (buffer != null)
{
@@ -472,23 +472,23 @@ vimperator.Buffer = function() //{{{
index += matches.length;
}
else
index = (count-1) % matches.length;
index = (count - 1) % matches.length;
vimperator.tabs.select(matches[index], false);
}
};
this.zoomIn = function(steps, full_zoom)
this.zoomIn = function (steps, full_zoom)
{
bumpZoomLevel(steps, full_zoom);
};
this.zoomOut = function(steps, full_zoom)
this.zoomOut = function (steps, full_zoom)
{
bumpZoomLevel(-steps, full_zoom);
};
this.pageInfo = function(verbose)
this.pageInfo = function (verbose)
{
// TODO: copied from firefox. Needs some review/work...
// const feedTypes = {