diff options
author | masa138 | 2009-10-09 13:39:37 +0000 |
---|---|---|
committer | masa138 | 2009-10-09 13:39:37 +0000 |
commit | f80689bfed3334374e400cc105f8a1149e86ffe1 (patch) | |
tree | 538fba446b7ba9041aa9b005572cd9c2762e0ee5 | |
parent | fb52e70354609798301c9256c2ee727577875b98 (diff) | |
download | vimperator-plugins-f80689bfed3334374e400cc105f8a1149e86ffe1.tar.bz2 |
Fix loadWedata()
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@35565 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r-- | access_hatena.js | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/access_hatena.js b/access_hatena.js index c464b1d..3056701 100644 --- a/access_hatena.js +++ b/access_hatena.js @@ -49,7 +49,6 @@ map ; :accesshatena </VimperatorPlugin>; (function(){ var useWedata; - var wedataCache; var ignoreIds; var ids; var recentHosts; @@ -92,7 +91,6 @@ map ; :accesshatena recentHosts = []; historyCompletions = []; pageFor = []; - wedataCache = []; title = new Title(); isFirst = true; isIncreased = false; @@ -108,12 +106,6 @@ map ; :accesshatena if (useWedata) { loadWedata(); - for (i in wedataCache) if (wedataCache.hasOwnProperty(i)) { - var id = wedataCache[i]; - if (ignoreIds.indexOf(id) == -1) { - ignoreIds.push(id) - } - } } } init(); @@ -161,7 +153,7 @@ map ; :accesshatena historyCompletions.h.push(host); } } - if (id != '' && !id.match('^(?:' + ignoreIds.join('|') + ')$')) { // Wedata の拒否リストに入っていなかったら + if (id != '' && !id.replace('/', '').match(new RegExp('^(?:' + ignoreIds.join('|') + ')$'))) { // Wedata の拒否リストに入っていなかったら if (ids.indexOf(id) == -1) { ids.push(id); } @@ -194,8 +186,8 @@ map ; :accesshatena var json = eval(req.responseText); for (var i in json) if (json.hasOwnProperty(i)) { var id = json[i].data.id; - if (wedataCache.indexOf(id) == -1 && id != '') { - wedataCache.push(id); + if (ignoreIds.indexOf(id) == -1 && id != '') { + ignoreIds.push(id) } } } |