diff options
author | anekos | 2010-03-14 12:09:15 +0000 |
---|---|---|
committer | anekos | 2010-03-14 12:09:15 +0000 |
commit | 9a06bfd1bc32a6b7476e50d142ea18b8e24b70f9 (patch) | |
tree | cdd4b0527a7f889c37752462087dd0ea0a3d67ba /tabsort.js | |
parent | 900663b4000f35185c6b4fbc91f9cc8301bd7139 (diff) | |
download | vimperator-plugins-9a06bfd1bc32a6b7476e50d142ea18b8e24b70f9.tar.bz2 |
:tab(uniq|sort) url を BarTap 対応にした。title は未対応。
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37022 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'tabsort.js')
-rwxr-xr-x | tabsort.js | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -38,7 +38,7 @@ let PLUGIN_INFO = <name>tabsort</name> <description>Add ":tabsort" and ":tabuniq" command.</description> <description lang="ja">":tabsort", ":tabuniq" コマンドを追加する</description> - <version>1.1.0</version> + <version>1.1.1</version> <author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author> <minVersion>2.3</minVersion> <maxVersion>2.3</maxVersion> @@ -72,9 +72,10 @@ let PLUGIN_INFO = { index: i, tab: tab, - doc: #1=(tab.linkedBrowser.contentDocument), - url: #1#.location.href, - title: #1#.title, + browser: #1=(tab.linkedBrowser), + doc: #2=(#1#.contentDocument), + url: (#1#._userTypedValue || (#2#.location && #2#.location.href)), + title: #2#.title, } for ([i, tab] in util.Array(config.browser.mTabs)) ]; @@ -93,6 +94,8 @@ let PLUGIN_INFO = rms.forEach(function (rm) config.tabbrowser.removeTab(rm.tab)); } + getTabs().forEach(liberator.log); + function tabSort (cmp) { getTabs().sort(cmp).forEach(function (it, i) (i == it.index) || config.tabbrowser.moveTabTo(it.tab, i)); } |