mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 00:17:58 +01:00
normalise fold markers
This commit is contained in:
@@ -27,7 +27,7 @@ the terms of any one of the MPL, the GPL or the LGPL.
|
||||
}}} ***** END LICENSE BLOCK *****/
|
||||
|
||||
/* [command, action, cancel_hint_mode, always_active] */
|
||||
var g_hint_mappings = [ /*{{{*/
|
||||
var g_hint_mappings = [ //{{{
|
||||
/* hint action keys */
|
||||
["o", "hah.openHints(false, false);", true, false],
|
||||
["t", "hah.openHints(true, false);", true, false],
|
||||
@@ -64,9 +64,9 @@ var g_hint_mappings = [ /*{{{*/
|
||||
["<C-g>", "", true, true],
|
||||
["<C-[>", "", true, true],
|
||||
["<Esc>", "", true, true]
|
||||
]; /*}}}*/
|
||||
]; //}}}
|
||||
|
||||
function Command(specs, action, extra_info)//{{{
|
||||
function Command(specs, action, extra_info) //{{{
|
||||
{
|
||||
if (!specs || !action)
|
||||
return null;
|
||||
@@ -129,7 +129,7 @@ function Command(specs, action, extra_info)//{{{
|
||||
this.completer = extra_info.completer || null;
|
||||
}
|
||||
|
||||
}//}}}
|
||||
}
|
||||
|
||||
Command.prototype.execute = function(args, special, count, modifiers)
|
||||
{
|
||||
@@ -176,9 +176,9 @@ Command.prototype.toString = function()
|
||||
"\n\taction: " + this.action +
|
||||
"\n\tcompleter: " + this.completer +
|
||||
"\n}"
|
||||
}
|
||||
} //}}}
|
||||
|
||||
function Commands()//{{{
|
||||
function Commands() //{{{
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////// PRIVATE SECTION /////////////////////////////////////////
|
||||
@@ -767,10 +767,10 @@ function Commands()//{{{
|
||||
help: "{value} can be between 25 and 500%. If it is omitted, zoom is reset to 100%."
|
||||
}
|
||||
));
|
||||
//}}}
|
||||
}//}}}
|
||||
//}}}
|
||||
} //}}}
|
||||
|
||||
function execute_command(count, cmd, special, args, modifiers) // {{{
|
||||
function execute_command(count, cmd, special, args, modifiers) //{{{
|
||||
{
|
||||
if (!cmd)
|
||||
return;
|
||||
@@ -795,7 +795,11 @@ function execute_command(count, cmd, special, args, modifiers) // {{{
|
||||
// valid command, call it:
|
||||
command.execute(args, special, count, modifiers);
|
||||
|
||||
} // }}}
|
||||
} //}}}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////}}}
|
||||
// Ex command parsing and execution ////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////{{{
|
||||
|
||||
// return [null, null, null, null, heredoc_tag || false];
|
||||
// [count, cmd, special, args] = match;
|
||||
@@ -852,9 +856,11 @@ function execute(string)
|
||||
|
||||
return execute_command.apply(this, tokens);
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// navigation functions /////////////////////////////////////////// {{{1
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////////////////}}}
|
||||
// navigation functions ////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////{{{
|
||||
|
||||
function stepInHistory(steps)
|
||||
{
|
||||
var index = getWebNavigation().sessionHistory.index + steps;
|
||||
@@ -893,11 +899,10 @@ function historyGoToEnd()
|
||||
getWebNavigation().gotoIndex(max);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////}}}
|
||||
// url functions ///////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////{{{
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// url functions ////////////////////////////////////////////////// {{{1
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
function openURLs(str)
|
||||
{
|
||||
var urls = stringToURLs(str);
|
||||
@@ -1027,9 +1032,9 @@ function isDirectory(url)
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// frame related functions //////////////////////////////////////// {{{1
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////}}}
|
||||
// frame related functions /////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////{{{
|
||||
|
||||
// TODO: allow callback for filtering out unwanted frames? User defined?
|
||||
function focusNextFrame(count, forward)
|
||||
@@ -1040,7 +1045,7 @@ function focusNextFrame(count, forward)
|
||||
|
||||
// find all frames - depth-first search
|
||||
(function(frame)
|
||||
{
|
||||
{
|
||||
if (frame.document.body.localName.toLowerCase() == "body")
|
||||
frames.push(frame);
|
||||
for (var i = 0; i < frame.frames.length; i++)
|
||||
@@ -1122,9 +1127,10 @@ function focusNextFrame(count, forward)
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// location handling ////////////////////////////////////////////// {{{1
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////}}}
|
||||
// location handling ///////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////{{{
|
||||
|
||||
function getCurrentLocation()
|
||||
{
|
||||
return window.content.document.location.href;
|
||||
@@ -1182,8 +1188,9 @@ function getCurrentLinkLocation()
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// high level bookmark/history related functions ////////////////// {{{1
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// high level bookmark/history related functions ///////////////////////
|
||||
/////////////////////////////////////////////////////////////////////{{{
|
||||
|
||||
// takes: -t "foo" -T "tag1,tag2", myurl
|
||||
// converts that string to a useful url and title, and calls addBookmark
|
||||
function bmadd(str)
|
||||
@@ -1246,9 +1253,10 @@ function hsshow(filter, fullmode)
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// url marks functions //////////////////////////////////////////// {{{1
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////}}}
|
||||
// url marks functions /////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////{{{
|
||||
|
||||
/* vimperator has a concept of URL marks
|
||||
* these provide quick access to URLs with a single character
|
||||
*
|
||||
@@ -1276,9 +1284,10 @@ function show_url_marks(mark)
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// tab/buffer related functions /////////////////////////////////// {{{1
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////}}}
|
||||
// tab/buffer related functions ////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////{{{
|
||||
|
||||
function tab()
|
||||
{
|
||||
execute(arguments[0], null, null, {inTab: true});
|
||||
@@ -1320,9 +1329,10 @@ function updateBufferList()
|
||||
vimperator.bufferwindow.selectItem(getBrowser().mTabContainer.selectedIndex);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// scrolling ////////////////////////////////////////////////////// {{{1
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////}}}
|
||||
// scrolling ///////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////{{{
|
||||
|
||||
function scrollBufferRelative(right, down)
|
||||
{
|
||||
var win = document.commandDispatcher.focusedWindow;
|
||||
@@ -1371,7 +1381,7 @@ function scrollBufferAbsolute(horizontal, vertical)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// zooming //////////////////////////////////////////////////////// {{{1
|
||||
// zooming //////////////////////////////////////////////////////////{{{
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* also used to zoom out, when factor is negative */
|
||||
@@ -1439,10 +1449,9 @@ function zoom_to(value)
|
||||
|
||||
vimperator.echo("Zoom value: " + value + "%");
|
||||
}
|
||||
|
||||
|
||||
//}}}
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// misc helper functions ////////////////////////////////////////// {{{1
|
||||
// misc helper functions ////////////////////////////////////////////{{{
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function copyToClipboard(str)
|
||||
@@ -1659,7 +1668,7 @@ function source(filename, silent)
|
||||
function getEnv(variable)
|
||||
{
|
||||
var environment = Components.classes["@mozilla.org/process/environment;1"]
|
||||
.getService(Components.interfaces.nsIEnvironment);
|
||||
.getService(Components.interfaces.nsIEnvironment);
|
||||
return environment.get(variable);
|
||||
}
|
||||
|
||||
@@ -1726,5 +1735,6 @@ function evaluateXPath(expression, doc, ordered)
|
||||
);
|
||||
return res;
|
||||
}
|
||||
//}}}
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
|
||||
Reference in New Issue
Block a user