Changeset 17113 for lang/javascript/vimperator-plugins/trunk
- Timestamp:
- 08/05/08 20:36:36 (4 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/mixiecho.js
r17112 r17113 7 7 var ucnv = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"] 8 8 .createInstance(Components.interfaces.nsIScriptableUnicodeConverter); 9 ucnv.charset = "EUC-JP";9 ucnv.charset = "EUC-JP"; 10 10 function sprintf(format){ 11 11 var i = 1, re = /%s/, result = "" + format; … … 53 53 return result.singleNodeValue ? result.singleNodeValue : null; 54 54 } 55 function showFollowersStatus(){55 function showFollowersStatus(){ 56 56 var xhr = new XMLHttpRequest(); 57 57 xhr.open("GET", "http://mixi.jp/recent_echo.pl", false); … … 78 78 }); 79 79 }); 80 81 80 var html = <style type="text/css"><![CDATA[ 82 81 span.twitter.entry-content a { text-decoration: none; } … … 95 94 sprintf(': <span class="twitter entry-content">%s‬</span>', status.text)) 96 95 .join("<br/>"); 97 98 96 //liberator.log(html); 99 97 liberator.echo(html, true); … … 103 101 xhr.open("GET", "http://mixi.jp/recent_echo.pl", false); 104 102 xhr.send(null); 105 106 103 var form = getFirstElementByXPath('//form[@action="add_echo.pl"]', parseHTML(xhr.responseText, ['script'])); 107 104 var input = getFirstElementByXPath('.//textarea', form); … … 114 111 xhr.send(params.join('&')); 115 112 } 116 liberator.commands.addUserCommand(["mixiecho"], "Change mixi echo",117 function(arg, special){118 if (special || arg.length == 0)119 showFollowersStatus()120 else121 sayEcho(arg);122 },123 { });113 liberator.commands.addUserCommand(["mixiecho"], "Change mixi echo", 114 function(arg, special){ 115 if (special || arg.length == 0) 116 showFollowersStatus() 117 else 118 sayEcho(arg); 119 }, 120 { }); 124 121 })();
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)