Skip navigation.

exploreopera

| Help

Sign up | 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

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

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

By karakara, # 26. February 2008, 06:24:21

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

By Watanabe, # 26. February 2008, 10:17:03

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

By karakara, # 28. February 2008, 09:33:50

Write a comment

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

Please type this security code : ad5a96

Smilies