mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 00:57:59 +01:00
lastInputField is now available after switching tabs, new v.buffer.loaded getter/setter
This commit is contained in:
2
NEWS
2
NEWS
@@ -9,6 +9,8 @@
|
||||
removed the following hint options: 'hintchars' 'maxhints'
|
||||
added the following hint options: 'hinttimeout'
|
||||
* IMPORTANT: changed 'I' key to Ctrl-Q to also work in textboxes
|
||||
* @@ to repeat last macro
|
||||
* new macro commands q[a-z0-9] and @[a-z0-9] to replay them (thanks Marco!)
|
||||
* scroll commands like j/k/gg/etc. have a much better heuristic to find a scrollable frame
|
||||
* imap, inoremap, iunmap and imapclear added
|
||||
* new g0 and g$ mappings to go to the first/last tab
|
||||
|
||||
2
TODO
2
TODO
@@ -24,6 +24,8 @@ FEATURES:
|
||||
7 whereever possible: get rid of dialogs and ask console-like dialog questions or write error prompts directly on the webpage or with :echo()
|
||||
7 :set! should also set about:config options (with autocomplete)
|
||||
6 jump to the next heading with ]h, next image ]i, previous textbox [t and so on
|
||||
6 [d could go to the last domain in the history stack. so if i browse from
|
||||
google to another page and click 10 links there, [d would take me back to the google page
|
||||
6 :grep support (needs location list)
|
||||
6 use '' to jump between marks like vim
|
||||
6 pipe selected text/link/website to an external command
|
||||
|
||||
@@ -222,7 +222,31 @@ vimperator.Buffer = function () //{{{
|
||||
|
||||
return {
|
||||
|
||||
lastInputField: null, // used to keep track of the right field for "gi"
|
||||
// 0 if loading, 1 if loaded or 2 if load failed
|
||||
get loaded()
|
||||
{
|
||||
if (typeof window.content.document.pageIsFullyLoaded != "undefined")
|
||||
return window.content.document.pageIsFullyLoaded;
|
||||
else
|
||||
return 1; // in doubt return "loaded"
|
||||
},
|
||||
set loaded(value)
|
||||
{
|
||||
window.content.document.pageIsFullyLoaded = value;
|
||||
},
|
||||
|
||||
// used to keep track of the right field for "gi"
|
||||
get lastInputField()
|
||||
{
|
||||
if (window.content.document.lastInputField)
|
||||
return window.content.document.lastInputField;
|
||||
else
|
||||
return null;
|
||||
},
|
||||
set lastInputField(value)
|
||||
{
|
||||
window.content.document.lastInputField = value;
|
||||
},
|
||||
|
||||
get URL()
|
||||
{
|
||||
|
||||
@@ -862,7 +862,7 @@ vimperator.Events = function () //{{{
|
||||
},
|
||||
|
||||
// XXX: function may later be needed to detect a canceled synchronous openURL()
|
||||
onStateChange: function (webProgress, aRequest, flags, aStatus)
|
||||
onStateChange: function (webProgress, request, flags, status)
|
||||
{
|
||||
// STATE_IS_DOCUMENT | STATE_IS_WINDOW is important, because we also
|
||||
// receive statechange events for loading images and other parts of the web page
|
||||
@@ -873,12 +873,16 @@ vimperator.Events = function () //{{{
|
||||
// only thrown for the current tab, not when another tab changes
|
||||
if (flags & Components.interfaces.nsIWebProgressListener.STATE_START)
|
||||
{
|
||||
vimperator.buffer.loaded = 0;
|
||||
vimperator.statusline.updateProgress(0);
|
||||
setTimeout (function () { vimperator.modes.reset(false); },
|
||||
vimperator.mode == vimperator.modes.HINTS ? 500 : 0);
|
||||
}
|
||||
else if (flags & Components.interfaces.nsIWebProgressListener.STATE_STOP)
|
||||
;// vimperator.statusline.updateUrl();
|
||||
{
|
||||
vimperator.buffer.loaded = (status == 0 ? 1 : 2);
|
||||
vimperator.statusline.updateUrl();
|
||||
}
|
||||
}
|
||||
},
|
||||
// for notifying the user about secure web pages
|
||||
|
||||
Reference in New Issue
Block a user