mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 04:07:58 +01:00
Vimperator 1.0! Horray!
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
|||||||
#### configuration
|
#### configuration
|
||||||
|
|
||||||
VERSION = 1.0pre
|
VERSION = 1.0
|
||||||
NAME = vimperator
|
NAME = vimperator
|
||||||
|
|
||||||
include Makefile.common
|
include Makefile.common
|
||||||
|
|||||||
10
NEWS
10
NEWS
@@ -1,11 +1,11 @@
|
|||||||
<pre>
|
<pre>
|
||||||
2008-xx-xx:
|
2008-05-14:
|
||||||
* version 0.6
|
* version 1.0
|
||||||
* THIS VERSION ONLY WORKS WITH FIREFOX 3.0 beta1 or newer
|
* THIS VERSION ONLY WORKS WITH FIREFOX 3.0 beta3 or newer
|
||||||
* IMPORTANT: Major hints rewrite
|
* IMPORTANT: Major hints rewrite
|
||||||
read up the new help for the f, F and ; commands for details
|
read up the new help for the f, F and ; commands for details
|
||||||
removed the following hint options: 'hintchars' 'maxhints'
|
removed the following hint options: 'hintchars' 'maxhints'
|
||||||
added the following hint options: 'hinttimeout'
|
added the following hint options: 'hinttimeout', 'hintmatching', 'wordseperators'
|
||||||
* IMPORTANT: changed 'I' key to Ctrl-Q to also work in textboxes
|
* IMPORTANT: changed 'I' key to Ctrl-Q to also work in textboxes
|
||||||
* IMPORTANT: :bmarks! and :history! open the matching items now in a tab, instead
|
* IMPORTANT: :bmarks! and :history! open the matching items now in a tab, instead
|
||||||
of bringing up the bookmarks/history window
|
of bringing up the bookmarks/history window
|
||||||
@@ -55,8 +55,8 @@
|
|||||||
* support for * and # mappings to search for the text selection or the text under the cursor
|
* support for * and # mappings to search for the text selection or the text under the cursor
|
||||||
* Escape finally clears any selection made in the document
|
* Escape finally clears any selection made in the document
|
||||||
* initial start of caret mode. Start with 'i', stop with Escape;
|
* initial start of caret mode. Start with 'i', stop with Escape;
|
||||||
|
* new "newtab" option for opening the command output in a new tab and better :tab support
|
||||||
* many small bug fixes and enhancements
|
* many small bug fixes and enhancements
|
||||||
* new "newtab" option for opening the command output in a new tab
|
|
||||||
|
|
||||||
2007-12-21:
|
2007-12-21:
|
||||||
* version 0.5.3
|
* version 0.5.3
|
||||||
|
|||||||
@@ -77,8 +77,6 @@ liberator.Hints = function () //{{{
|
|||||||
|
|
||||||
function generate(win)
|
function generate(win)
|
||||||
{
|
{
|
||||||
var startDate = Date.now();
|
|
||||||
|
|
||||||
if (!win)
|
if (!win)
|
||||||
win = window.content;
|
win = window.content;
|
||||||
|
|
||||||
@@ -94,7 +92,6 @@ liberator.Hints = function () //{{{
|
|||||||
|
|
||||||
var elem, tagname, text, span, rect;
|
var elem, tagname, text, span, rect;
|
||||||
var res = liberator.buffer.evaluateXPath(liberator.options["hinttags"], doc, null, true);
|
var res = liberator.buffer.evaluateXPath(liberator.options["hinttags"], doc, null, true);
|
||||||
liberator.log("evaluated XPath after: " + (Date.now() - startDate) + "ms");
|
|
||||||
|
|
||||||
var fragment = doc.createDocumentFragment();
|
var fragment = doc.createDocumentFragment();
|
||||||
var start = hints.length;
|
var start = hints.length;
|
||||||
@@ -138,7 +135,6 @@ liberator.Hints = function () //{{{
|
|||||||
for (var i = 0; i < win.frames.length; i++)
|
for (var i = 0; i < win.frames.length; i++)
|
||||||
generate(win.frames[i]);
|
generate(win.frames[i]);
|
||||||
|
|
||||||
liberator.log("hints.generate() completed after: " + (Date.now() - startDate) + "ms for " + hints.length + " hints.");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,13 +152,10 @@ liberator.Hints = function () //{{{
|
|||||||
|
|
||||||
function showHints()
|
function showHints()
|
||||||
{
|
{
|
||||||
var startDate = Date.now();
|
|
||||||
var win = window.content;
|
var win = window.content;
|
||||||
var height = win.innerHeight;
|
var height = win.innerHeight;
|
||||||
var width = win.innerWidth;
|
var width = win.innerWidth;
|
||||||
|
|
||||||
liberator.log("Show hints matching: \"" + hintString + "\"", 7);
|
|
||||||
|
|
||||||
var linkfgcolor = liberator.options["linkfgcolor"];
|
var linkfgcolor = liberator.options["linkfgcolor"];
|
||||||
var linkbgcolor = liberator.options["linkbgcolor"];
|
var linkbgcolor = liberator.options["linkbgcolor"];
|
||||||
var activelinkfgcolor = liberator.options["activelinkfgcolor"];
|
var activelinkfgcolor = liberator.options["activelinkfgcolor"];
|
||||||
@@ -235,7 +228,6 @@ liberator.Hints = function () //{{{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
liberator.log("showHints() completed after: " + (Date.now() - startDate) + "ms");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -305,7 +297,6 @@ liberator.Hints = function () //{{{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
liberator.log("removeHints() done");
|
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,7 +326,6 @@ liberator.Hints = function () //{{{
|
|||||||
var loc = elem.href || "";
|
var loc = elem.href || "";
|
||||||
switch (submode)
|
switch (submode)
|
||||||
{
|
{
|
||||||
// TODO: move/rename those helper functions to a better place
|
|
||||||
case ";": liberator.buffer.focusElement(elem); break;
|
case ";": liberator.buffer.focusElement(elem); break;
|
||||||
case "?": liberator.buffer.showElementInfo(elem); break;
|
case "?": liberator.buffer.showElementInfo(elem); break;
|
||||||
case "a": liberator.buffer.saveLink(elem, false); break;
|
case "a": liberator.buffer.saveLink(elem, false); break;
|
||||||
@@ -579,7 +569,6 @@ liberator.Hints = function () //{{{
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
// TODO: implement framesets
|
|
||||||
show: function (mode, minor, filter)
|
show: function (mode, minor, filter)
|
||||||
{
|
{
|
||||||
if (mode == liberator.modes.EXTENDED_HINT && !/^[;?asoOtTvVwWyY]$/.test(minor))
|
if (mode == liberator.modes.EXTENDED_HINT && !/^[;?asoOtTvVwWyY]$/.test(minor))
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ const liberator = (function () //{{{
|
|||||||
return !(new RegExp(regex + "]").test(value));
|
return !(new RegExp(regex + "]").test(value));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
liberator.options.add(["titlestring"], // TODO: broken for Thunderbird
|
liberator.options.add(["titlestring"], // TODO: broken for Thunderbird
|
||||||
"Change the title of the window",
|
"Change the title of the window",
|
||||||
"string", "Vimperator",
|
"string", "Vimperator",
|
||||||
@@ -85,12 +86,14 @@ const liberator = (function () //{{{
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
liberator.options.add(["verbose", "vbs"],
|
liberator.options.add(["verbose", "vbs"],
|
||||||
"Define which type of messages are logged",
|
"Define which type of messages are logged",
|
||||||
"number", 0,
|
"number", 0,
|
||||||
{
|
{
|
||||||
validator: function (value) { return (value >= 0 && value <= 9); }
|
validator: function (value) { return (value >= 0 && value <= 9); }
|
||||||
});
|
});
|
||||||
|
|
||||||
liberator.options.add(["visualbell", "vb"],
|
liberator.options.add(["visualbell", "vb"],
|
||||||
"Use visual bell instead of beeping on errors",
|
"Use visual bell instead of beeping on errors",
|
||||||
"boolean", false,
|
"boolean", false,
|
||||||
@@ -384,9 +387,6 @@ const liberator = (function () //{{{
|
|||||||
catch (e) { }
|
catch (e) { }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (liberator.has("tabs"))
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////}}}
|
/////////////////////////////////////////////////////////////////////////////}}}
|
||||||
@@ -617,7 +617,7 @@ const liberator = (function () //{{{
|
|||||||
window.content.scrollTo(0, elem.getBoundingClientRect().top - 10); // 10px context
|
window.content.scrollTo(0, elem.getBoundingClientRect().top - 10); // 10px context
|
||||||
else
|
else
|
||||||
dump('no element: ' + '@class="tag" and text()="' + tag + '"\n' );
|
dump('no element: ' + '@class="tag" and text()="' + tag + '"\n' );
|
||||||
}, 200);
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!topic)
|
if (!topic)
|
||||||
@@ -781,6 +781,7 @@ const liberator = (function () //{{{
|
|||||||
.quit(nsIAppStartup.eRestart | nsIAppStartup.eAttemptQuit);
|
.quit(nsIAppStartup.eRestart | nsIAppStartup.eAttemptQuit);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// TODO: probably move to {muttator,vimperator,...}.js
|
||||||
// this function is called, when the chrome is ready
|
// this function is called, when the chrome is ready
|
||||||
startup: function ()
|
startup: function ()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -631,7 +631,7 @@ When browsing a local directory, it goes to the root directory.
|
|||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
|
|
||||||
|
|
||||||
|f| +
|
|f| |hints| +
|
||||||
||f\\{hint\\}||
|
||f\\{hint\\}||
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
Start QuickHint mode. In QuickHint mode, every hintable item (according to the
|
Start QuickHint mode. In QuickHint mode, every hintable item (according to the
|
||||||
|
|||||||
Reference in New Issue
Block a user