From d5d979ebe9cd43bc963d28c04c825c1dafaae351 Mon Sep 17 00:00:00 2001 From: "hemanth.hm" Date: Sun, 23 Mar 2014 13:58:12 +0530 Subject: [PATCH 1/2] Modules in use now shows only valid modules Removed jsonp --- index.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index a2086d2..a829971 100644 --- a/index.js +++ b/index.js @@ -206,10 +206,14 @@ function initialize() { packageTags.html('') var modules = detective(editor.editor.getValue()) modules.map(function(module) { - var tag = - '' + module + '  ' - packageTags.append(tag) + $.getJSON('http://jsonp.jit.su/?callback=?&url=http://isaacs.iriscouch.com/registry/' + module, function(found){ + if(found){ + var tag = + '' + module + '  ' + packageTags.append(tag) + } + }) }) if (modules.length === 0) packageTags.append('
No Modules Required Yet
') }) From a25a4946156894d7e72c52e1d64d2affe034fbe5 Mon Sep 17 00:00:00 2001 From: "hemanth.hm" Date: Wed, 26 Mar 2014 18:25:50 +0530 Subject: [PATCH 2/2] Using maxogden's cors proxy --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index a829971..8e23929 100644 --- a/index.js +++ b/index.js @@ -206,8 +206,8 @@ function initialize() { packageTags.html('') var modules = detective(editor.editor.getValue()) modules.map(function(module) { - $.getJSON('http://jsonp.jit.su/?callback=?&url=http://isaacs.iriscouch.com/registry/' + module, function(found){ - if(found){ + request('http://cors.maxogden.com/http://isaacs.iriscouch.com/registry/' + module, function(err, resp){ + if(resp.statusCode != 404){ var tag = '' + module + '  '