Skip navigation.

Sign up | Lost password? | Help

ノヴム・オペラヌム

Tumblrの個々のページにNotesを表示するユーザーJavaScript

先日、Tumblrでポストしたコンテンツを誰がReblogしているか見ることができる機能が追加されたのですが、これはDashboardでしか見ることができないのでちょっと不便です。そこで、個々のTumblrのページのパーマリンクからNotesを表示できるようにするユーザーJavaScriptを作りました。

本格的にテキトーです。もうちょっとなんとかしてくれる方募集中。

// ==UserScript==
// @name Tumblr - Append notes to post
// @author Satoru Watanabe
// @namespace http://my.opera.com/Watanabe/
// @version 1.0.0
// @include http://*.tumblr.com/post/*
// @exclude http://www.tumblr.com/*
// ==/UserScript==

(function () {
  if (location.href.match(/post\/(\d+)/)) {
    var id = RegExp.$1;
    var o = document.createElement('object');

    o.style = 'width: 100%; padding-top: 10px;';
    o.setAttribute('data', 'http://www.tumblr.com/dashboard/notes/' + id);
    o.setAttribute('type', 'text/html');

    var exp = document.createExpression('//div[@class="post"][last()]', null);
    var post = exp.evaluate(document, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;

    if (post != null) {
      post.appendChild(o);
    }
  }
}) ();

ダウンロード

tumblr-append-notes-to-post.user.js

追記: 2007-12-07T10:09:27+09:00

今朝Tumblrを見てみると、Dashboard以外からNotesにアクセスできないよう仕様変更されてました。ははは……。という事でこのユーザーJavaScriptは使っても意味ありません。

プラグインフリーで音声を再生するAmazonに商品画像をダウンロードするリンクを追加するユーザーJavaScript

Comments

karakara 26. February 2008, 06:24

Greasemonkeyですが、こんなのあるみたいですよ。
まだ試してないから、Operaで使えるかどうか分からんですが。

http://vhudy6tx4dik9ol.tumblr.com/post/27294326

Watanabe 26. February 2008, 10:17

どもども。
このスクリプトはクロスドメイン通信を行っているのでOperaでは動かないみたいですが、参考になります。

karakara 28. February 2008, 09:33

Operaじゃ動かないのですかー。
そりゃ残念。

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies