From 291ebf7cc742b1d9f07b620ea45a01b7d6240c79 Mon Sep 17 00:00:00 2001 From: teramako Date: Thu, 17 Jan 2013 22:27:53 +0900 Subject: drop e4x, FixMe: 一部 xml`...` を使うとエラーが出るので通常文字列化した --- direct_bookmark.js | 192 ++++++++++++++++++++++++++++------------------------- 1 file changed, 101 insertions(+), 91 deletions(-) diff --git a/direct_bookmark.js b/direct_bookmark.js index aafa575..aba403d 100644 --- a/direct_bookmark.js +++ b/direct_bookmark.js @@ -1,89 +1,92 @@ -var PLUGIN_INFO = - - {NAME} - Direct Post to Social Bookmarks - Trapezoid - 0.19.0 +var INFO = xml` + + Trapezoid GPL - 2.0pre - https://github.com/vimpr/vimperator-plugins/raw/master/direct_bookmark.js - || - Use social bookmark services to extract tags - 'h': Hatena Bookmark - 'd': del.icio.us - 'l': livedoor clip - 'g': Google Bookmarks - 'p': Places (Firefox bookmarks) - 'P': pinboard.in - Usage: let g:direct_sbm_use_services_by_tag = "hdl" -||< -=== g:direct_sbm_use_services_by_post === ->|| - Use social bookmark services to post - 'h': Hatena Bookmark - 'd': del.icio.us - 'l': livedoor clip - 'g': Google Bookmarks - 'P': pinboard.in - Usage: let g:direct_sbm_use_services_by_post = "hdl" -||< -=== g:direct_sbm_echo_type === ->|| - Post message type - 'simple' : single line, no posted services description - 'multiline' : multi line, display services description - 'none' : hide post message -||< -=== g:direct_sbm_is_normalize === ->|| - Use normalize permalink -||< -=== g:direct_sbm_is_use_migemo === ->|| - Use Migemo completion -||< -=== g:direct_sbm_private === ->|| - Private bookmark -||< - - -== Commands == -=== :btags === ->|| - Extract tags from social bookmarks for completion -||< -=== :sbm === ->|| - Post a current page to social bookmarks - Arguments - -s,-service: default:"hdl" - Specify target SBM services to post -||< -=== :bentry === ->|| - Goto Bookmark Entry Page -||< -=== :bicon === ->|| - Show Bookmark Count as Icon -||< - ]]> -; +

Social Bookmark direct add script

+

for Migemo search: require XUL/Migemo Extension

+

Parts

+ +

Viriables

+

g:direct_sbm_use_services_by_tag

+

Use social bookmark services to extract tags

+
+
h
Hatena Bookmark
+
d
del.icio.us
+
l
livedoor clip
+
g
Google Bookmarks
+
p
Places (Firefox bookmarks)
+
P
pinboard.in
+
+

Usage: let g:direct_sbm_use_services_by_tag = "hdl"

+ +

g:direct_sbm_use_services_by_post

+

Use social bookmark services to post

+
+
h
Hatena Bookmark
+
d
del.icio.us
+
l
livedoor clip
+
g
Google Bookmarks
+
P
pinboard.in
+
+

Usage: let g:direct_sbm_use_services_by_post = "hdl"

+ +

g:direct_sbm_echo_type

+

Post message type

+
+
simple
single line, no posted services description
+
multiline
multi line, display services description
+
none
hide post message
+
+ +

g:direct_sbm_is_normalize

+

Use normalize permalink

+ +

g:direct_sbm_is_use_migemo

+

Use Migemo completion

+ +

g:direct_sbm_private

+

Private bookmark

+ + + :btags + :btags + +

Extract tags from social bookmarks for completion

+
+
+ + :sbm + :sbm -service service + +

Post a current page to social bookmarks.

+

service: Specify target SBM services to post (default: "hdl")

+
+
+ + :bentry + :bentry + +

Goto Bookmark Entry Page

+
+
+ + :bicon + :bicon + +

Show Bookmark Count as Icon

+
+
+`; (function(){ var evalFunc = window.eval; @@ -347,12 +350,19 @@ for Migemo search: require XUL/Migemo Extension entryPage:'http://b.hatena.ne.jp/entry/%URL::HATENA%', poster:function(user,password,url,title,comment,tags){ var tagString = tags.length > 0 ? '[' + tags.join('][') + ']' : ""; - var request = - - dummy - - {tagString + comment} - ; + // TODO: xml`...` を使うとillegal character 言われる、、、何故? + /* + var request = xml` + dummy + + ${tagString + comment} + `; + */ + var request = '' + + 'dummy' + + '' + + '' + tagString + comment + '' + + ''; var wsse = new WSSEUtils(user,password); return Deferred.http({ -- cgit v1.2.3