Last active
December 23, 2015 03:59
-
-
Save Sunitha/6577089 to your computer and use it in GitHub Desktop.
configuration to add command to open a url in a background tab on vimperator
vimperatorでバックグラウンドタブでurlを開くコマンドを追加
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript <<EOM | |
commands.add(["backgroundtabopen", "bt[open]", "btabnew"], | |
"Open one or more URLs in a new background tab", | |
function (args) { | |
let index = tabs.getTab(); | |
let special = args.bang; | |
args = args.string; | |
if (options.get("activate").has("all", "tabopen")) | |
special = !special; | |
let where = special ? liberator.NEW_TAB : liberator.NEW_BACKGROUND_TAB; | |
if (args) | |
liberator.open(args, { where: where }); | |
else | |
liberator.open("", { where: where }); | |
tabs.selectAlternateTab(); | |
}, { | |
bang: true, | |
completer: function (context) completion.url(context), | |
literal: 0, | |
privateData: true | |
} | |
); | |
EOM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment