Added functions for tab sorting and tab dedup.

Lifted from https://github.com/glacambre/.dotfiles/blob/master/default/.config/tridactyl/tridactylrc
This commit is contained in:
James Patrick 2020-03-19 15:31:34 -04:00
parent 7855876147
commit e47f573719
1 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,9 @@
"░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
"
alias tabsort jsb browser.tabs.query({}).then(tabs => tabs.sort((t1, t2) => t1.url.localeCompare(t2.url)).forEach((tab, index) => browser.tabs.move(tab.id, {index})))
alias tabuniq jsb browser.tabs.query({}).then(tabs => browser.tabs.remove(tabs.filter((tab, index) => tabs.slice(index + 1).find(t => t.url == tab.url)).map(tab => tab.id)))
" Toggle expand/collapse for comments.
bind ;c hint -c [class*="expand"],[class="togg"]