ɯhɥm

I like typo- & calli-graphy, language, translation, etc.

I am an enthusiastic tagger, and a user & maintainer of TumblrTagCommand.

-- whym

愛のタンバリン

syoichi:

reretlet:

dashboard で shift + L で like マークを付けるグリモン。

なんかあんましうまく動いてないような気もするけど。それから minibuffer と LDRize が必須でっす。

unsafeWindowとかよくわかんないので、location.href などという bookmarklet 風味な対応です。

なんかねえ、http://www.tumblr.com/like とか http://www.tumblr.com/unlike なんていうところに post しやがるわけなんですよ。だから一呼吸かかるのかな。ちょっと遅い印象。それからそれから show ページだと autopagerize で繋いだページでは、きちんとハートマークの色がかわらないとかそーいう現象がおきているけど、まあ気にすんな。(いや、気にしている)

love_on_tumblr.user.js

// ==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 とかも出来そうだけど、そーするとどーなるんだろーねえ。

追記 : 何回か修正してまっす。

tweet にも効くように改変してフォークしました

54 notes
  1. patriarchyyyyyy reblogged this from whym
  2. atm09td reblogged this from ukar
  3. ukar reblogged this from whym
  4. whym reblogged this from syoichi and added:
    tweet にも効くように改変してフォークしました
  5. discus reblogged this from 7h
  6. hishochi reblogged this from 7h
  7. lesondes reblogged this from syoichi
  8. iomz reblogged this from syoichi
  9. 7h reblogged this from syoichi and added:
    dashboard で shift + L で like マークを付けるグリモン。 なんかあんましうまく動いてないような気もするけど。それから minibuffer と LDRize が必須でっす。...
  10. iro reblogged this from syoichi
  11. hiroteru16g reblogged this from syoichi
  12. saitamanodoruji reblogged this from syoichi
  13. syoichi reblogged this from reretlet
  14. reretlet reblogged this from tayu-tau and added:
    dashboard で shift + L で like マークを付けるグリモン。 なんかあんましうまく動いてないような気もするけど。それから minibuffer と LDRize が必須でっす。...
  15. tayu-tau reblogged this from vhudy6tx4dik9ol
  16. vhudy6tx4dik9ol reblogged this from taizooo
  17. myhoney0079 reblogged this from nya-buro and added:
    dashboard で shift + L で like マークを付けるグリモン。 なんかあんましうまく動いてないような気もするけど。それから minibuffer と LDRize が必須でっす。...
  18. kanal reblogged this from utatane
  19. zokuzoku reblogged this from qiring and added:
    dashboard で shift + L で like マークを付けるグリモン。 なんかあんましうまく動いてないような気もするけど。それから minibuffer と LDRize が必須でっす。...
  20. qiring reblogged this from taizooo
  21. 2d4u reblogged this from jumitaka
  22. ishida reblogged this from lomo and added:
    dashboard で shift + L で like マークを付けるグリモン。 なんかあんましうまく動いてないような気もするけど。それから minibuffer と LDRize が必須でっす。...
  23. cxx reblogged this from otsune
  24. ichimonji reblogged this from jinon
  25. utatane reblogged this from taizooo and added:
    if (e.style.display != 'none') { // for unlike..."true"; } else { // for like var t =...
  26. pcatan reblogged this from otsune
  27. rightstaff reblogged this from lomo
  28. jumitaka reblogged this from lomo
  29. tuvuan reblogged this from taizooo
  30. 3mz reblogged this from taizooo
  31. shukujitsu reblogged this from otsune
  32. lomo reblogged this from otsune and added:
    dashboard で shift + L で like マークを付けるグリモン。 なんかあんましうまく動いてないような気もするけど。それから minibuffer と LDRize が必須でっす。...
  33. nya-buro reblogged this from konishiroku and added:
    dashboard で shift + L で like マークを付けるグリモン。 なんかあんましうまく動いてないような気もするけど。それから minibuffer と LDRize が必須でっす。...
  34. cabbage reblogged this from konishiroku
  35. jinon reblogged this from otsune
  36. otsune reblogged this from taizooo and added:
    if (e.style.display != 'none') { // for unlike..."true"; } else { // for like var t =...
  37. konishiroku reblogged this from taizooo
  38. taizooo posted this