diff --git a/lib/chrome.js b/lib/chrome.js index 4f674f0..42e397b 100644 --- a/lib/chrome.js +++ b/lib/chrome.js @@ -261,6 +261,7 @@ var ChromeObject = function() { try { var responseText = HTTP.get("http://127.0.0.1:" + this.debuggingPort + "/json"); //console.info(responseText); + console.log(responseText); pageList = JSON.parse(responseText); this.pageList = pageList; return pageList; @@ -276,7 +277,7 @@ var ChromeObject = function() { this.getPageById = function(id) { return this.getPageList().find(function(x) { - return (x.id = id); + return (x.id == id); }); };