この回答は、gmail.com https://stackoverflow.com/a/9439525/222236のすべての iframe のコンテンツにアクセスする方法を説明しています。
しかし、mail.google.com では次のエラーがスローされます。
Unsafe JavaScript attempt to access frame with URL https://plus.google.com/u/0/_/... from frame with URL https://mail.google.com/mail/u/0/#inbox. Domains, protocols and ports must match.
拡張機能のマニフェストの一致に追加しようとし*://plus.google.com/*
ましたが、役に立ちませんでした。
更新: コンテンツにアクセスする前に URL を確認することはできますが、Google プラスのみを確認するため、現時点では私のロジックは非常に粗雑です:
if(-1==iframes[i].src.indexOf('plus.google.com')) {
contentDocument = iframes[i].contentDocument;
if (contentDocument && !contentDocument.rweventsadded73212312) {
// add poller to the new iframe
checkForNewIframe(iframes[i].contentDocument);
}
}