diff options
author | anekos | 2010-09-17 16:51:40 +0000 |
---|---|---|
committer | anekos | 2010-09-17 16:51:40 +0000 |
commit | c3623decfe614d477abdd05cf4bc867b26b5f19e (patch) | |
tree | b2b5aa26b1f30b0f2f4b4b2851f725366fba0abc | |
parent | a5781a58211b7fdcd2e5d93a16b217bbd491622b (diff) | |
download | vimperator-plugins-c3623decfe614d477abdd05cf4bc867b26b5f19e.tar.bz2 |
なぞばぐしゅーせー
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38481 d0d07461-0603-4401-acd4-de1884942a52
-rwxr-xr-x | twittperator.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/twittperator.js b/twittperator.js index fcf8f37..1aa736e 100755 --- a/twittperator.js +++ b/twittperator.js @@ -28,7 +28,7 @@ let PLUGIN_INFO = <name>Twittperator</name> <description>Twitter Client using ChirpStream</description> <description lang="ja">OAuth対応Twitterクライアント</description> - <version>1.4.6</version> + <version>1.4.777</version> <minVersion>2.3</minVersion> <maxVersion>2.4</maxVersion> <author mail="teramako@gmail.com" homepage="http://d.hatena.ne.jp/teramako/">teramako</author> @@ -1208,12 +1208,10 @@ let PLUGIN_INFO = if (typeof str == "undefined") return {}; var itm; if (str.indexOf("?", 0) > -1) str = str.split("?", 2)[1]; - var regex = str.indexOf("&") > str.indexOf(";") ? /;+/ : /&+/; - return str.split(regex).reduce(function(r, v) { - var kv = v.split("=", 2); - if (kv[0] != "") { - r[kv[0]] = typeof kv[1] == "undefined" ? true : decodeURIComponent(kv[1]); - } + return str.split("&").reduce(function(r, it) { + var [key, value] = it.split("=", 2); + if (key) + r[key] = typeof value == "undefined" || decodeURIComponent(value); return r; }, {}); } |