aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranekos2011-08-16 13:58:43 +0900
committeranekos2011-08-16 13:58:43 +0900
commit9c4b37880a23a60a5e56091562983859c14d3d64 (patch)
tree4041bfc5a06982393bfba94a0194f8a55b360aaf
parent2432aa0649ae9d1dbf5a110c21a3556e561ddb1b (diff)
downloadvimperator-plugins-9c4b37880a23a60a5e56091562983859c14d3d64.tar.bz2
まとめて折りたたみ解除
-rw-r--r--google-plus-commando.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/google-plus-commando.js b/google-plus-commando.js
index e996d7b..f262a78 100644
--- a/google-plus-commando.js
+++ b/google-plus-commando.js
@@ -36,7 +36,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
// INFO {{{
let INFO =
<>
- <plugin name="GooglePlusCommando" version="2.1.2"
+ <plugin name="GooglePlusCommando" version="2.1.3"
href="http://github.com/vimpr/vimperator-plugins/blob/master/google-plus-commando.js"
summary="The handy commands for Google+"
lang="en-US"
@@ -152,6 +152,10 @@ let g:gplus_commando_map_menu = "m"
buffer.followLink(elem, liberator.CURRENT_TAB);
}
+ function clicks (elems) {
+ elems.forEach(click);
+ }
+
function isDisplayed (elem)
(elem && !/none/.test(util.computedStyle(elem).display));
@@ -188,6 +192,7 @@ let g:gplus_commando_map_menu = "m"
currentEntry: {
root: '.tf.Ek.Lj',
unfold: [
+ '.tvogXd.zK2ipf', // 折りたたみボタン
role('button', '.d-k.Dk'), // 発言の省略 (以前)
role('button', '.d-k.Ck'), // 発言の省略 (以降)
role('button', '.d-k.Kq.Sy'), // 投稿の省略 ("このコメントを展開 »")
@@ -419,6 +424,7 @@ let g:gplus_commando_map_menu = "m"
if (!e.getAttribute('oid'))
][0],
get unfold () root.querySelector(S.currentEntry.unfold.join(', ')),
+ get unfolds () A(root.querySelectorAll(S.currentEntry.unfold.join(', '))),
get buttons () A(self.plusone.parentNode.querySelectorAll(S.role('button'))),
get commentButton () self.buttons[0],
get commentEditor () let (e = root.querySelector(S.editable)) (e && e.parentNode),
@@ -673,7 +679,7 @@ let g:gplus_commando_map_menu = "m"
if (notifications && notifications.visible && notifications.entry.visible)
return click(notifications.entry.unfold);
- click(Elements.currentEntry.unfold);
+ clicks(Elements.currentEntry.unfolds);
},
menu: function () {
click(Elements.currentEntry.menuButton);