愛のタンバリン
dashboard で shift + L で like マークを付けるグリモン。
なんかあんましうまく動いてないような気もするけど。それから minibuffer と LDRize が必須でっす。
unsafeWindowとかよくわかんないので、location.href などという bookmarklet 風味な対応です。
なんかねえ、http://www.tumblr.com/like とか http://www.tumblr.com/unlike なんていうところに post しやがるわけなんですよ。だから一呼吸かかるのかな。ちょっと遅い印象。それからそれから show ページだと autopagerize で繋いだページでは、きちんとハートマークの色がかわらないとかそーいう現象がおきているけど、まあ気にすんな。(いや、気にしている)
// ==UserScript==
// @name love on tumblr
// @namespace http://www.tumblr.com/
// @description love current post on tumblr dsbd with 'Shift + l'key. if won't work, pray on tumblr!
// @include http://www.tumblr.com/dashboard*
// @include http://www.tumblr.com/show/*
// @version 0.0.1
// ==/UserScript==
if(!window.Minibuffer) return;
var $X = window.Minibuffer.$X;
//var submit_like = function(id,t){ unsefeWindow.submit_like(id,t); };
window.Minibuffer.addCommand({
name: 'tumblr.Like',
command: function(stdin){
stdin.forEach(function(obj){
if (obj.className.match(/not_mine/)){
var id = obj.id.match(/post([\d]+)/)[1];
$X('.//form[starts-with(@id, "unlike_form_")]', obj).forEach(function(e){
var t = (e.style.display != 'none').toString();
location.href = 'javascript:submit_like(' + id + ',' + t + ');'
// submit_like(id, t);
});
}
});
return stdin;
},
});
window.Minibuffer.addShortcutkey({
key: 'L',
description: 'tumblr.Like',
command: function(){
var stdin = [];
try{
stdin = window.Minibuffer.execute('pinned-or-current-node');
} catch (e){}
window.Minibuffer.execute('tumblr.Like', stdin);
window.Minibuffer.execute('clear-pin');
}
});submit_like() というヤツがあって、それが叩ければいけそうなんだけど、unsafeWindowというかwindowというかDOMというかそーいった基本が全然わけわかめなわけです。
あと、全面的に utatane センセーの DeleteCommand をまるまるヒット&オーイエーならぬコピー&改変です。そのおかげで、pin 立てといて一気に love とかも可能だと思われます。
これ、dashboard + tombloo で rblg と同時に love とかも出来そうだけど、そーするとどーなるんだろーねえ。
追記 : 何回か修正してまっす。
-
patriarchyyyyyy reblogged this from whym
-
atm09td reblogged this from ukar
-
ukar reblogged this from whym
-
whym reblogged this from syoichi and added:
tweet にも効くように改変してフォークしました
-
proto-jp likes this
-
discus reblogged this from 7h
-
hishochi reblogged this from 7h
-
lesondes reblogged this from syoichi
-
iomz reblogged this from syoichi
-
7h reblogged this from syoichi and added:
dashboard で shift + L で like マークを付けるグリモン。 なんかあんましうまく動いてないような気もするけど。それから minibuffer と LDRize が必須でっす。...
-
iro reblogged this from syoichi
-
hiroteru16g reblogged this from syoichi
-
saitamanodoruji likes this
-
saitamanodoruji reblogged this from syoichi
-
syoichi reblogged this from reretlet
-
reretlet reblogged this from tayu-tau and added:
dashboard で shift + L で like マークを付けるグリモン。 なんかあんましうまく動いてないような気もするけど。それから minibuffer と LDRize が必須でっす。...
-
tayu-tau reblogged this from vhudy6tx4dik9ol
-
vhudy6tx4dik9ol reblogged this from taizooo
-
myhoney0079 reblogged this from nya-buro and added:
dashboard で shift + L で like マークを付けるグリモン。 なんかあんましうまく動いてないような気もするけど。それから minibuffer と LDRize が必須でっす。...
-
kanal reblogged this from utatane
-
zokuzoku reblogged this from qiring and added:
dashboard で shift + L で like マークを付けるグリモン。 なんかあんましうまく動いてないような気もするけど。それから minibuffer と LDRize が必須でっす。...
-
qiring reblogged this from taizooo
-
2d4u reblogged this from jumitaka
-
ishida reblogged this from lomo and added:
dashboard で shift + L で like マークを付けるグリモン。 なんかあんましうまく動いてないような気もするけど。それから minibuffer と LDRize が必須でっす。...
-
suyhnc likes this
-
nasunet likes this
-
cxx reblogged this from otsune
-
ichimonji reblogged this from jinon
-
utatane reblogged this from taizooo and added:
if (e.style.display != 'none') { // for unlike..."true"; } else { // for like var t =...
-
rabbity likes this
-
pcatan reblogged this from otsune
-
rightstaff reblogged this from lomo
-
jumitaka reblogged this from lomo
-
jumitaka likes this
-
tuvuan reblogged this from taizooo
-
3mz reblogged this from taizooo
-
shukujitsu reblogged this from otsune
-
lomo reblogged this from otsune and added:
dashboard で shift + L で like マークを付けるグリモン。 なんかあんましうまく動いてないような気もするけど。それから minibuffer と LDRize が必須でっす。...
-
nya-buro reblogged this from konishiroku and added:
dashboard で shift + L で like マークを付けるグリモン。 なんかあんましうまく動いてないような気もするけど。それから minibuffer と LDRize が必須でっす。...
-
cabbage reblogged this from konishiroku
-
jinon reblogged this from otsune
-
otsune reblogged this from taizooo and added:
if (e.style.display != 'none') { // for unlike..."true"; } else { // for like var t =...
-
konishiroku reblogged this from taizooo
-
taizooo posted this