I have a script, using @grant GM_openInTab, that does nothing but gather a 
list of links and open them in background tabs. As of 1.16b4 and b5, this 
doesn't work any more, citing a nonsensical error. ("Greasemonkey access 
violation: unsafeWindow cannot call GM_openInTab. (Xray)") Any idea what's 
wrong?

function $xi(xpath, root, type) {
  return document.evaluate(xpath, root || document, null, type, null);
}
function $x(xpath, root) {
  return $xi(xpath, root, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE);
}
function $x1(xpath, root) {
  return $xi(xpath, root, 
XPathResult.FIRST_ORDERED_NODE_TYPE).singleNodeValue;
}

var links = $x("//a[span[@class='page-num']]");
if (links) {
  for (var i = links.snapshotLength - 1; i >= 0; i--) {
    GM_openInTab(links.snapshotItem(i));
  }
}

-- 
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.

Reply via email to