diff options
author | teramako | 2011-07-27 21:43:59 +0900 |
---|---|---|
committer | teramako | 2011-07-27 21:43:59 +0900 |
commit | 37fd1b92df6cbc0c560c802704033e7236483b5b (patch) | |
tree | a4a0596f33fb5ea518db013ec7c163955f9f047e | |
parent | b4fed3f41575b99d8425a57d3bf64bac6af45ee6 (diff) | |
download | vimperator-plugins-37fd1b92df6cbc0c560c802704033e7236483b5b.tar.bz2 |
ちょっと効率化
-rw-r--r-- | google-plus-commando.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/google-plus-commando.js b/google-plus-commando.js index 316f8bc..54cddc6 100644 --- a/google-plus-commando.js +++ b/google-plus-commando.js @@ -770,9 +770,7 @@ let g:gplus_commando_map_menu = "m" */ function postGooglePlus (aPostData) { let data = aPostData.getPostData(); - let queries = []; - for (let key in data) - queries.push(key + '=' + encodeURIComponent(data[key])); + let queries = [key + '=' + encodeURIComponent(value) for ([key,value] in Iterator(data))].join('&'); let xhr = new XMLHttpRequest(); xhr.mozBackgroundRequest = true; @@ -780,7 +778,7 @@ let g:gplus_commando_map_menu = "m" xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); xhr.setRequestHeader('Origin', HOME_URL); xhr.onreadystatechange = postGooglePlus.readyStateChange; - xhr.send(queries.join('&')); + xhr.send(queries); } /** * Google+への送信状況を表示する |