From ddfed77f12d1fd9642e8dac426313d9177b19376 Mon Sep 17 00:00:00 2001 From: anekos Date: Wed, 21 Mar 2012 01:09:40 +0900 Subject: Good Bye Sharp Variables!!! http://www.youtube.com/watch?v=YUjrGq5aAiM --- google-plus-commando.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'google-plus-commando.js') diff --git a/google-plus-commando.js b/google-plus-commando.js index d1dfed5..11ac57e 100644 --- a/google-plus-commando.js +++ b/google-plus-commando.js @@ -1,5 +1,5 @@ /* NEW BSD LICENSE {{{ -Copyright (c) 2011, anekos. +Copyright (c) 2011-2012, anekos. Copyright (c) 2011, teramako. All rights reserved. @@ -36,7 +36,7 @@ THE POSSIBILITY OF SUCH DAMAGE. // INFO {{{ let INFO = <> - - 1) throw 'Two and more editors were found.'; + let peditor = editors[0]; return { - editor: #1=(editors[0]), + editor: peditor, button: { - submit: button(#1#, 'post'), - cancel: button(#1#, 'cancel') + submit: button(peditor, 'post'), + cancel: button(peditor, 'cancel') } }; } @@ -556,11 +557,12 @@ let g:gplus_commando_map_menu = "m" if (editors.length > 1) throw 'Two and more editors were found.'; + let peditor = editors[0]; return { - editor: #1=(editors[0]), + editor: peditor, button: { - submit: button(#1#, 0), - cancel: button(#1#, 1) + submit: button(peditor, 0), + cancel: button(peditor, 1) } }; } @@ -580,7 +582,7 @@ let g:gplus_commando_map_menu = "m" throw 'Two and more editors were found.'; return { - editor: #1=(editors[0]), + editor: editors[0], button: { submit: root.querySelector(S.dialog.submit), cancel: root.querySelector(S.dialog.cancel), -- cgit v1.2.3