From 1b61cb57a5fa31a5a522f064f971b822467aa0f9 Mon Sep 17 00:00:00 2001 From: trapezoid Date: Sun, 14 Sep 2008 09:27:10 +0000 Subject: twitter.js: revert to prev git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@19286 d0d07461-0603-4401-acd4-de1884942a52 --- twitter.js | 51 +-------------------------------------------------- 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/twitter.js b/twitter.js index 4cb165f..7dfbf03 100644 --- a/twitter.js +++ b/twitter.js @@ -1,5 +1,5 @@ // Vimperator plugin: "Update Twitter" -// Last Change: 29-Aug-2008. Jan 2008 +// Last Change: 20-Jun-2008. Jan 2008 // License: Creative Commons // Maintainer: Trapezoid - http://unsigned.g.hatena.ne.jp/Trapezoid // @@ -137,55 +137,6 @@ .replace(/(?:\r?\n|\r)[ \t]*/g, " "); liberator.echo(html, true); } - var services = { - 'twitter': { - description:'Twitter', - account:['https://www.hatena.ne.jp', 'https://www.hatena.ne.jp', null], - loginPrompt:{ user:'', password:'', description:'Enter username and password.' }, - entryPage:'http://b.hatena.ne.jp/entry/%URL%', - poster:function(user,password,url,title,comment,tags){ - var tagString = tags.length > 0 ? '[' + tags.join('][') + ']' : ""; - var request = - - dummy - - {tagString + comment} - ; - var wsse = new WSSEUtils(user,password); - - return Deferred.http({ - method: "post", - url: "http://b.hatena.ne.jp/atom/post", - data: request.toString(), - headers: { - "X-WSSE": wsse.getWSSEHeader(), - "Content-Type": "application/atom+xml", - }, - }).next(function(xhr){ - if(xhr.status != 201) throw "Hatena Bookmark: faild"; - }); - }, - tags:function(user,password){ - var xhr = new XMLHttpRequest(); - var hatena_tags = []; - - xhr.open("GET","http://b.hatena.ne.jp/my",false); - xhr.send(null); - - var mypage_html = parseHTML(xhr.responseText, ['img', 'script']); - var tags = getElementsByXPath("//ul[@id=\"taglist\"]/li/a",mypage_html); - - tags.forEach(function(tag){ - hatena_tags.push(tag.innerHTML); - }); - liberator.echo("Hatena Bookmark: Tag parsing is finished. Taglist length: " + tags.length); - return hatena_tags; - }, - icon:function(url){ - return ''; - }, - } - }; liberator.commands.addUserCommand(["twitter"], "Change Twitter status", function(arg, special){ var password; -- cgit v1.2.3