aboutsummaryrefslogtreecommitdiffstats
path: root/google-plus-commando.js
diff options
context:
space:
mode:
authoranekos2011-08-03 01:39:08 +0900
committeranekos2011-08-03 01:44:32 +0900
commit3cbd3c7cdd2dec30d25fe02a7db87fc3f86c7ad9 (patch)
tree67be0705054b8b6b0003c98b8d44578b95dfdfb9 /google-plus-commando.js
parent90960ff039293be9f355f83a162249fdf0c3e31f (diff)
downloadvimperator-plugins-3cbd3c7cdd2dec30d25fe02a7db87fc3f86c7ad9.tar.bz2
isDisplayed 適用
Diffstat (limited to 'google-plus-commando.js')
-rw-r--r--google-plus-commando.js8
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),