【发布时间】:2011-11-10 00:59:26
【问题描述】:
我有几个博客链接到我的 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)
【问题讨论】:
-
好问题。很想知道答案。
-
您愿意结合使用 GreaseMonkey 脚本吗?
-
Greasemonkey 可以在移动浏览器上运行吗?
标签: javascript blogs bookmarklet tumblr