From c3623decfe614d477abdd05cf4bc867b26b5f19e Mon Sep 17 00:00:00 2001
From: anekos
Date: Fri, 17 Sep 2010 16:51:40 +0000
Subject: なぞばぐしゅーせー
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38481 d0d07461-0603-4401-acd4-de1884942a52
---
twittperator.js | 12 +++++-------
1 file 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 =
Twittperator
Twitter Client using ChirpStream
OAuth対応Twitterクライアント
- 1.4.6
+ 1.4.777
2.3
2.4
teramako
@@ -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;
}, {});
}
--
cgit v1.2.3