aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorteramako2011-07-27 21:43:59 +0900
committerteramako2011-07-27 21:43:59 +0900
commit37fd1b92df6cbc0c560c802704033e7236483b5b (patch)
treea4a0596f33fb5ea518db013ec7c163955f9f047e
parentb4fed3f41575b99d8425a57d3bf64bac6af45ee6 (diff)
downloadvimperator-plugins-37fd1b92df6cbc0c560c802704033e7236483b5b.tar.bz2
ちょっと効率化
-rw-r--r--google-plus-commando.js6
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+への送信状況を表示する