I am new to greasemonkey and don't know if there is a better way to do this. Recently, within the past couple of weeks, a script I was using to insert into a gmail mail composition buffer began to fail. The gist of it is:
// ==UserScript== > // @name GMail Test > // @namespace http://senften.us > // @description Test against gmail > // @include http://mail.google.com/* > // @include https://mail.google.com/* > // @include http://gmail.google.com/* > // @include https://gmail.google.com/* > // @version 1 > // @grant none > // ==/UserScript== > > > //var allBody = document.evaluate("//body[@class='Am Al editable > LW-avf']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); > var allBody = document.evaluate("//*", document.body, null, > XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); > > console.log("GMail # components: " + allBody.snapshotLength); > for (var i = 0, l = allBody.snapshotLength; i < l; i++) > { > console.log(i + ": "+allBody.snapshotItem(i).innerHTML); > } > the evaluate function now only returns "GMail # components: 3" GMail_Test.user.js:17 > "0: <head></head><body></body>" GMail_Test.user.js:20 > "1: " GMail_Test.user.js:20 > "2: " GMail_Test.user.js:20 > instead of anything useful. Has something changed that requires me to do something differently or use something other than XPath? Thanks for any assistance. -- You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/greasemonkey-users. For more options, visit https://groups.google.com/d/optout.
