mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 08:07:59 +01:00
Try harder not to count invisible elements in <count>gi.
This commit is contained in:
@@ -1626,8 +1626,9 @@ const Buffer = Module("buffer", {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
let computedStyle = util.computedStyle(elem);
|
let computedStyle = util.computedStyle(elem);
|
||||||
|
let rect = elem.getBoundingClientRect();
|
||||||
return computedStyle.visibility != "hidden" && computedStyle.display != "none" &&
|
return computedStyle.visibility != "hidden" && computedStyle.display != "none" &&
|
||||||
computedStyle.MozUserFocus != "ignore";
|
computedStyle.MozUserFocus != "ignore" && rect.width && rect.height;
|
||||||
});
|
});
|
||||||
|
|
||||||
dactyl.assert(elements.length > 0);
|
dactyl.assert(elements.length > 0);
|
||||||
|
|||||||
@@ -285,6 +285,8 @@ const Command = Class("Command", {
|
|||||||
*/
|
*/
|
||||||
replacementText: null
|
replacementText: null
|
||||||
}, {
|
}, {
|
||||||
|
bindMacro: function (args, default_) {
|
||||||
|
},
|
||||||
|
|
||||||
// TODO: do we really need more than longNames as a convenience anyway?
|
// TODO: do we really need more than longNames as a convenience anyway?
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -254,14 +254,14 @@
|
|||||||
\ p<str delim="">:first-line</str> { <em>font-variant</em>: <str delim="">small-caps</str>; }
|
\ p<str delim="">:first-line</str> { <em>font-variant</em>: <str delim="">small-caps</str>; }
|
||||||
\ div<em>#side-bar</em> > <str delim="">:first-child</str> { <em>display</em>: <str delim="">none</str>; }</code>
|
\ div<em>#side-bar</em> > <str delim="">:first-child</str> { <em>display</em>: <str delim="">none</str>; }</code>
|
||||||
|
|
||||||
<code><ex>:command</ex> <str delim="">do-some-stuff</str>
|
<code><ex>:command!</ex> <str delim="">do-some-stuff</str>
|
||||||
\ <em>-description</em> <str>A command which does some stuff in JavaScript</str>
|
\ <em>-description</em> <str>A command which does some stuff in JavaScript</str>
|
||||||
\ <ex>:javascript</ex> <<<em>EOF</em>
|
\ <ex>:javascript</ex> <<<em>EOF</em>
|
||||||
\ window.do(<str>some</str>);
|
\ window.do(<str>some</str>);
|
||||||
\ window.do(<str>stuff</str>);
|
\ window.do(<str>stuff</str>);
|
||||||
\<em>EOF</em></code>
|
\<em>EOF</em></code>
|
||||||
|
|
||||||
<code><ex>:command</ex> <str delim="">do-some-stuff</str>
|
<code><ex>:command!</ex> <str delim="">do-some-stuff</str>
|
||||||
\ <em>-description</em> <str>A command which does some stuff in JavaScript</str>
|
\ <em>-description</em> <str>A command which does some stuff in JavaScript</str>
|
||||||
\ <ex>:javascript</ex>
|
\ <ex>:javascript</ex>
|
||||||
\\ window.do(<str>some</str>);
|
\\ window.do(<str>some</str>);
|
||||||
|
|||||||
Reference in New Issue
Block a user