Merging getComputedStyle and evaluate in Greasemonkey
- by Keheliya Gallaba
I need to get all the text nodes with a certain font-face in a page to an array. I tried..
textnodes = document.evaluate("//* [@style='font-family: foo;']//text()["
+ "not(ancestor::script) and not(ancestor::style)]", document,
null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
and
textnodes = document.evaluate("//*…