From edd6cd96be6f8c0d73830ff41bdd6ad10d585707 Mon Sep 17 00:00:00 2001
From: anekos
Date: Thu, 4 Aug 2011 23:43:01 +0900
Subject: [open] マッピング追加
---
google-plus-commando.js | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
(limited to 'google-plus-commando.js')
diff --git a/google-plus-commando.js b/google-plus-commando.js
index 26a6e8e..dfdd2ef 100644
--- a/google-plus-commando.js
+++ b/google-plus-commando.js
@@ -36,7 +36,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
// INFO {{{
let INFO =
<>
-
rc file example
@@ -680,6 +681,19 @@ let g:gplus_commando_map_menu = "m" if (notifications && notifications.visible && notifications.entry.visible) return click(notifications.entry.mute); click(Elements.currentEntry.menu.mute); + }, + open: function () { + let ce = Elements.currentEntry; + if (!ce) + return; + let dct = ce.root.querySelector('div[data-content-type]'); + let links = dct.parentNode.querySelectorAll('a'); + if (links.length < 1) { + click(dct); + return; + } + if (links.length === 1) + click(links[0]); } }; @@ -722,7 +736,7 @@ let g:gplus_commando_map_menu = "m" ); } - 'comment plusone share next prev post yank notification cancel unfold menu mute'.split(/\s/).forEach(defineMapping.bind(null, modes.NORMAL)); + 'comment plusone share next prev post yank notification cancel unfold menu mute open'.split(/\s/).forEach(defineMapping.bind(null, modes.NORMAL)); 'submit'.split(/\s/).forEach(defineMapping.bind(null, modes.INSERT)); mappings.addUserMap( -- cgit v1.2.3