如何修改tumblr bookmarklet以发布到特定的tumblr博客?

k10*_*107 5 javascript blogs bookmarklet tumblr

我有几个博客链接到我的Tumblr帐户,但书签总是选择我的"主要"博客(列表中的第一个).

如何修改书签以便自动选择特定博客?我想有多个bookmarklet链接,例如"在blog1上分享","在blog2上分享",这样我就不必手动选择要创建帖子的博客了.

默认Tumblr bookmarklet如下所示:

javascript: var d = document,
    w = window,
    e = w.getSelection,
    k = d.getSelection,
    x = d.selection,
    s = (e ? e() : (k) ? k() : (x ? x.createRange().text : 0)),
    f = 'http://www.tumblr.com/share',
    l = d.location,
    e = encodeURIComponent,
    p = '?v=3&u=' + e(l.href) + '&t=' + e(d.title) + '&s=' + e(s),
    u = f + p;
try {
    if (!/^(.*\.)?tumblr[^.]*$/.test(l.host)) throw (0);
    tstbklt();
} catch (z) {
    a = function () {
        if (!w.open(u, 't', 'toolbar=0,resizable=0,status=1,width=450,height=430')) l.href = u;
    };
    if (/Firefox/.test(navigator.userAgent)) setTimeout(a, 0);
    else a();
}
void(0)
Run Code Online (Sandbox Code Playgroud)

Kyl*_*ppd 1

为书签提供一个'channel_id'post 参数,该参数'example_blog_name'位于example_blog_name.tumblr.com

javascript: var d = document,
    w = window,
    e = w.getSelection,
    k = d.getSelection,
    x = d.selection,
    s = (e ? e() : (k) ? k() : (x ? x.createRange().text : 0)),
    f = 'http://www.tumblr.com/share',
    l = d.location,
    e = encodeURIComponent,
    c = 'example_blog_name',
    p = '?v=3&u=' + e(l.href) + '&t=' + e(d.title) + '&s=' + e(s) + '&channel_id=' + e(c),
    u = f + p;
Run Code Online (Sandbox Code Playgroud)