aboutsummaryrefslogtreecommitdiffstats
path: root/char-hints-mod2.js
diff options
context:
space:
mode:
authorhogelog2008-12-14 00:49:52 +0000
committerhogelog2008-12-14 00:49:52 +0000
commit94943ecf9c94135df36f104b2e0886d9f804de6d (patch)
tree66ca39c086ee5beed082f8b3f2af3bb4fe2d92ae /char-hints-mod2.js
parentd4953e527e3f80ebeabe6ae74670a0f78f6a8bd6 (diff)
downloadvimperator-plugins-94943ecf9c94135df36f104b2e0886d9f804de6d.tar.bz2
* fix bug: no hints are visible in frame page.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@26663 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'char-hints-mod2.js')
-rw-r--r--char-hints-mod2.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/char-hints-mod2.js b/char-hints-mod2.js
index cd322a5..74eb418 100644
--- a/char-hints-mod2.js
+++ b/char-hints-mod2.js
@@ -55,14 +55,18 @@ set histchars="hjkl" => show char-hint use h, j, k, l.
return chars;
} //}}}
- function showCharHints() //{{{
+ function showCharHints(win) //{{{
{
- for(let elem in buffer.evaluateXPath("//*[@liberator:highlight and @number]", window.content.document))
+
+ if (!win)
+ win = window.content;
+ for(let elem in buffer.evaluateXPath("//*[@liberator:highlight and @number]", win.document))
{
let num = elem.getAttribute("number");
let hintchar = num2chars(parseInt(num, 10));
elem.setAttribute("hintchar", hintchar);
}
+ Array.forEach(win.frames, showCharHints);
} //}}}
var hintContext = hints.addMode;