From 9a06bfd1bc32a6b7476e50d142ea18b8e24b70f9 Mon Sep 17 00:00:00 2001 From: anekos Date: Sun, 14 Mar 2010 12:09:15 +0000 Subject: :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 --- tabsort.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'tabsort.js') diff --git a/tabsort.js b/tabsort.js index b56cb33..0b881c4 100755 --- a/tabsort.js +++ b/tabsort.js @@ -38,7 +38,7 @@ let PLUGIN_INFO = tabsort Add ":tabsort" and ":tabuniq" command. ":tabsort", ":tabuniq" コマンドを追加する - 1.1.0 + 1.1.1 anekos 2.3 2.3 @@ -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)); } -- cgit v1.2.3