From 9b103500326b5fb9a24272684a13a753bf467dd2 Mon Sep 17 00:00:00 2001 From: anekos Date: Wed, 27 Jul 2011 01:05:54 +0900 Subject: 通知ウィンドウ内のコメント編集に対応 --- google-plus-commando.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/google-plus-commando.js b/google-plus-commando.js index f7e6901..df85021 100644 --- a/google-plus-commando.js +++ b/google-plus-commando.js @@ -246,11 +246,14 @@ let g:gplus_commando_map_menu = "m" return iframe && iframe.contentWindow === win; } - function get1 () { + function get1 (root) { function button (editor, name) editor.parentNode.querySelector(S.role('button', <>[id$=".{name}"])); - let editors = A(doc.querySelectorAll('div[id$=".editor"]')).filter(hasIFrame); + if (!root) + return; + + let editors = A(root.querySelectorAll('div[id$=".editor"]')).filter(hasIFrame); if (editors.length === 0) return; if (editors.length > 1) @@ -294,7 +297,7 @@ let g:gplus_commando_map_menu = "m" let doc = content.document; let win = document.commandDispatcher.focusedWindow; - return get1() || get2(); + return get1(doc) || get2() || get1(Elements.frames.notifications.root.contentDocument); }, /** -- cgit v1.2.3