Changeset 18067
- Timestamp:
- 08/22/08 19:04:56 (5 months ago)
- Files:
-
- 1 modified
-
lang/javascript/vimperator-plugins/trunk/haiku.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/haiku.js
r18047 r18067 11 11 // :haiku #keyword some thing text 12 12 // post "some thing text" to keyword 'id:keyword' on hatena haiku. 13 // :haiku!/ 14 // show public timeline. 13 15 // :haiku! someone 14 16 // show someone's statuses. … … 51 53 xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 52 54 xhr.send(null); 53 xhr.open("POST", "http://h.hatena.ne.jp/api/favorites/create/" + window.eval(xhr.responseText)[0].id + '.json', false, username, password);55 xhr.open("POST", "http://h.hatena.ne.jp/api/favorites/create/" + evalFunc(xhr.responseText)[0].id + '.json', false, username, password); 54 56 xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 55 57 xhr.send(null); … … 60 62 xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 61 63 xhr.send(null); 62 xhr.open("POST", "http://h.hatena.ne.jp/api/favorites/destroy/" + window.eval(xhr.responseText)[0].id + '.json', false, username, password);64 xhr.open("POST", "http://h.hatena.ne.jp/api/favorites/destroy/" + evalFunc(xhr.responseText)[0].id + '.json', false, username, password); 63 65 xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 64 66 xhr.send(null); … … 66 68 function showFollowersStatus(username, password, target){ 67 69 var xhr = new XMLHttpRequest(); 68 var endPoint = target ? "http://h.hatena.ne.jp/api/statuses/user_timeline/" + target + ".json" 69 : "http://h.hatena.ne.jp/api/statuses/friends_timeline.json"; 70 var endPoint = target ? 71 target == "/" ? 72 "http://h.hatena.ne.jp/api/statuses/public_timeline.json" 73 : "http://h.hatena.ne.jp/api/statuses/user_timeline/" + target + ".json" 74 : "http://h.hatena.ne.jp/api/statuses/friends_timeline.json"; 70 75 xhr.open("POST", endPoint, false, username, password); 71 76 xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)