mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-08 09:54:12 +01:00
Import some fixes from Vimperator. Thanks anekos, teramoko, and stepnem.
This commit is contained in:
@@ -451,6 +451,16 @@ const Util = Module("Util", {
|
||||
return idx > -1 && idx + domain.length == host.length && (idx == 0 || host[idx-1] == ".");
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns true if the given DOM node is currently visible.
|
||||
*
|
||||
* @param {Node} node
|
||||
*/
|
||||
isVisible: function (node) {
|
||||
let style = util.computedStyle(node);
|
||||
return style.visibility == "visible" && style.display != "none";
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns an XPath union expression constructed from the specified node
|
||||
* tests. An expression is built with node tests for both the null and
|
||||
|
||||
Reference in New Issue
Block a user