diff options
| author | anekos | 2011-08-03 01:39:08 +0900 | 
|---|---|---|
| committer | anekos | 2011-08-03 01:44:32 +0900 | 
| commit | 3cbd3c7cdd2dec30d25fe02a7db87fc3f86c7ad9 (patch) | |
| tree | 67be0705054b8b6b0003c98b8d44578b95dfdfb9 | |
| parent | 90960ff039293be9f355f83a162249fdf0c3e31f (diff) | |
| download | vimperator-plugins-3cbd3c7cdd2dec30d25fe02a7db87fc3f86c7ad9.tar.bz2 | |
isDisplayed 適用
| -rw-r--r-- | google-plus-commando.js | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/google-plus-commando.js b/google-plus-commando.js index 3dc299d..a649560 100644 --- a/google-plus-commando.js +++ b/google-plus-commando.js @@ -152,7 +152,7 @@ let g:gplus_commando_map_menu            = "m"    }    function isDisplayed (elem) -    (!/none/.test(util.computedStyle(elem).display)); +    (elem && !/none/.test(util.computedStyle(elem).display));    function withCount (command) {      return function (count) { @@ -394,7 +394,7 @@ let g:gplus_commando_map_menu            = "m"      };      function MakeElement (constructor, root) { -      if (root && !/none/.test(util.computedStyle(root).display)) +      if (root && isDisplayed(root))          return constructor(root);      } @@ -466,13 +466,13 @@ let g:gplus_commando_map_menu            = "m"          },          summary: {            get root () root.contentDocument.querySelector(S.frames.notifications.summary.root), -          get visible () (!/none/.test(util.computedStyle(self.summary.root).display)) +          get visible () isDisplayed(self.summary.root),          },          entry: {            get root () self.summary.root.nextSibling,            get entries () A(root.contentDocument.querySelectorAll(S.frames.notifications.entry.entries)),            get current () self.entry.entries.filter(isDisplayed)[0], -          get visible () (!/none/.test(util.computedStyle(self.entry.root).display)), +          get visible () isDisplayed(self.entry.root),            get prev () root.contentDocument.querySelector(S.frames.notifications.summary.prev),            get next () root.contentDocument.querySelector(S.frames.notifications.summary.next),            get back () root.contentDocument.querySelector(S.frames.notifications.summary.back),  | 
