diff options
author | anekos | 2011-07-27 01:05:54 +0900 |
---|---|---|
committer | anekos | 2011-07-27 01:05:54 +0900 |
commit | 9b103500326b5fb9a24272684a13a753bf467dd2 (patch) | |
tree | 3c1bcbc9861d623a45cbac451beed7350afbc3eb /google-plus-commando.js | |
parent | 8a278a8dc106b838770a8b1752bc6bbc57da2699 (diff) | |
download | vimperator-plugins-9b103500326b5fb9a24272684a13a753bf467dd2.tar.bz2 |
通知ウィンドウ内のコメント編集に対応
Diffstat (limited to 'google-plus-commando.js')
-rw-r--r-- | google-plus-commando.js | 9 |
1 files 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); }, /** |