Hatena::Groupsubtech

subpop

2007-03-30

Twitter from LDR

| 14:33 |  Twitter from LDR - subpop を含むブックマーク はてなブックマーク -  Twitter from LDR - subpop  Twitter from LDR - subpop のブックマークコメント

// ==UserScript==
// @name           Twitter from LDR
// @namespace      http://kentarok.org/ns/greasemonkey
// @description    Post your current status to Twitter directly from livedoor Reader.
// @include        http://reader.livedoor.com/*
// ==/UserScript==

(function(){
    var __window = unsafeWindow;
    with (__window) {
        register_command('t|twitter|s|status', function () {
            var status = Array.from(arguments).join(' ');
            message('updating...');

            GM_xmlhttpRequest({
                method : 'POST',
                url    : 'http://twitter.com/statuses/update.json',
                headers: {
                    'Content-type': 'application/x-www-form-urlencoded',
                },
                data   : 'status=' + status,
                onload : function(res) {
                    message('Updated!');
                },
                onerror: function(res) {
                    message('Failed - ' + res.status + ': ' + res.statusText);
                },
            });
        });
    };
})();

zspsejnzzspsejnz2011/02/19 09:56Axot6w <a href="http://yyrybdhjmmhc.com/">yyrybdhjmmhc</a>, [url=http://yzhychhwbvue.com/]yzhychhwbvue[/url], [link=http://yopkvsbysfww.com/]yopkvsbysfww[/link], http://hrywpxitkdrn.com/