diff options
author | anekos | 2012-03-21 01:09:40 +0900 |
---|---|---|
committer | anekos | 2012-03-21 01:09:40 +0900 |
commit | ddfed77f12d1fd9642e8dac426313d9177b19376 (patch) | |
tree | ea08c9597909246b32e0e5aebfc970be357eb490 | |
parent | bbb6c4488fdf976b8f21fdad21904b761b55e5ca (diff) | |
download | vimperator-plugins-ddfed77f12d1fd9642e8dac426313d9177b19376.tar.bz2 |
Good Bye Sharp Variables!!!
http://www.youtube.com/watch?v=YUjrGq5aAiM
-rw-r--r-- | google-plus-commando.js | 22 | ||||
-rw-r--r-- | tabsort.js | 29 |
2 files changed, 28 insertions, 23 deletions
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 = <> - <plugin name="GooglePlusCommando" version="2.4.6" + <plugin name="GooglePlusCommando" version="2.4.7" href="http://github.com/vimpr/vimperator-plugins/blob/master/google-plus-commando.js" summary="The handy commands for Google+" lang="en-US" @@ -133,7 +133,7 @@ let g:gplus_commando_map_menu = "m" </description> </item> </plugin> - <plugin name="GooglePlusCommando" version="2.4.6" + <plugin name="GooglePlusCommando" version="2.4.7" href="http://github.com/vimpr/vimperator-plugins/blob/master/google-plus-commando.js" summary="The handy commands for Google+" lang="ja-JP" @@ -529,11 +529,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#, '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), @@ -1,5 +1,5 @@ /* NEW BSD LICENSE {{{ -Copyright (c) 2009, anekos. +Copyright (c) 2009-2012, anekos. All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -38,10 +38,9 @@ let PLUGIN_INFO = <name>tabsort</name> <description>Add ":tabsort" and ":tabuniq" command.</description> <description lang="ja">":tabsort", ":tabuniq" コマンドを追加する</description> - <version>1.1.3</version> + <version>1.1.4</version> <author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author> <minVersion>2.3</minVersion> - <maxVersion>2.3</maxVersion> <updateURL>https://github.com/vimpr/vimperator-plugins/raw/master/tabsort.js</updateURL> <license>new BSD License (Please read the source code comments of this plugin)</license> <license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license> @@ -68,17 +67,21 @@ let PLUGIN_INFO = function memberCompare (name) function (a, b) a[name].toString().localeCompare(b[name].toString()); - function getTabs () [ - { - index: i, - tab: tab, - browser: #1=(tab.linkedBrowser), - doc: #2=(#1#.contentDocument), - url: (#1#.__SS_restore_data ? #1#.__SS_restore_data.url : (#2#.location && #2#.location.href)), - title: (#1#.__SS_restore_data ? #1#.__SS_restore_data.title : #2#.title) + function getTabs () { + function gen(tab, i) { + let browser = tab.linkedBrowser; + let doc = browser.contentDocument; + return { + index: i, + tab: tab, + browser: browser, + doc: doc, + url: (browser.__SS_restore_data ? browser.__SS_restore_data.url : (doc.location && doc.location.href)), + title: (browser.__SS_restore_data ? browser.__SS_restore_data.title : doc.title) + }; } - for ([i, tab] in util.Array(config.browser.mTabs)) - ]; + return [gen(tab, i) for ([i, tab] in Iterator(config.browser.mTabs))]; + } function tabUniq (cmp) { let rms = []; |