diff options
author | anekos | 2012-07-27 20:11:40 +0900 |
---|---|---|
committer | anekos | 2012-07-27 20:11:40 +0900 |
commit | f1d88768e90cc532446dcc21575abc3eb1c69f07 (patch) | |
tree | dc8d8288174b74dab917278b0923e493000486ca /twittperator | |
parent | 308ce39099c1cb1ce6a4eca88e54958d57a07452 (diff) | |
download | vimperator-plugins-f1d88768e90cc532446dcc21575abc3eb1c69f07.tar.bz2 |
Add twittperator sub-command "tw!sbm" for direct_bookmark.js.
Diffstat (limited to 'twittperator')
-rw-r--r-- | twittperator/sbm.tw | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/twittperator/sbm.tw b/twittperator/sbm.tw new file mode 100644 index 0000000..b505e50 --- /dev/null +++ b/twittperator/sbm.tw @@ -0,0 +1,34 @@ +/* + * Please write the below line into .vimperatorrc. + * let g:twittperator_plugin_sbm = 1 + * let g:twittperator_screen_sbm_default_tags = "[Twitter]" + */ + + +(function () { + const TW = liberator.plugins.twittperator; + + TW.SubCommands.add( + TW.SubCommand({ + command: ['sbm'], + description: "Direct SBM", + action: function(arg) { + let url = 'https://twitter.com/' + arg; + setTimeout( + function () { + let tags = liberator.globalVariables.twittperator_screen_sbm_default_tags || ''; + + commandline.open( + '', + 'sbmother ' + url + ' ' + tags, + modes.EX + ); + }, + 0 + ); + }, + timelineComplete: true, + completer: TW.Completers.statusPage(function(s) s.id) + }) + ); +})(); |