diff --git a/background.js b/background.js index babba95..626d1b5 100644 --- a/background.js +++ b/background.js @@ -378,26 +378,26 @@ $(document).ready(function() { chrome.tabs.create({ 'url': 'http://google.com/search?q=' + txt }); - chrome.tabs.executeScript({ - code: "document.getElementsByClassName('_XWk')[0].innerHTML;" - }, function(selection) { //_XWk - //alert(selection[0]); - if (selection[0] === null) { - chrome.tabs.executeScript({ - code: "var rex = /(<([^>]+)>)/ig; document.getElementsByClassName('_Tgc')[0].innerHTML.replace(rex,'').split('.')[0];" - }, function(sl) { - if (sl[0] === null) { - chrome.tabs.executeScript({ - code: "var rex = /(<([^>]+)>)/ig; document.getElementsByClassName('st')[0].innerHTML.replace(rex,'').split('.')[0];" - }, function(sl2) { - Speech("According to Google " + sl2[0]); - }); - } else - Speech("According to Google " + sl[0]); - }); - } else - Speech(selection[0]); - }); + // chrome.tabs.executeScript({ + // code: "document.getElementsByClassName('_XWk')[0].innerHTML;" + // }, function(selection) { //_XWk + // //alert(selection[0]); + // if (selection[0] === null) { + // chrome.tabs.executeScript({ + // code: "var rex = /(<([^>]+)>)/ig; document.getElementsByClassName('_Tgc')[0].innerHTML.replace(rex,'').split('.')[0];" + // }, function(sl) { + // if (sl[0] === null) { + // chrome.tabs.executeScript({ + // code: "var rex = /(<([^>]+)>)/ig; document.getElementsByClassName('st')[0].innerHTML.replace(rex,'').split('.')[0];" + // }, function(sl2) { + // Speech("According to Google " + sl2[0]); + // }); + // } else + // Speech("According to Google " + sl[0]); + // }); + // } else + // Speech(selection[0]); + // }); } }, error: function() { diff --git a/css/popup.css b/css/popup.css index c34bdd3..c281f0f 100644 --- a/css/popup.css +++ b/css/popup.css @@ -20,7 +20,7 @@ html { body { background: #fff; background-position-y: 5px; - width: 320px; + width: 340px; overflow-y: auto; overflow-x: hidden; font-size: 12px; diff --git a/manifest.json b/manifest.json index 8607481..a972d27 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Anna Assistant", "short_name": "Anna", - "version": "1.2", + "version": "1.4", "description": "Your Personal Assistant on Google Chrome.", "icons": { "16":"img/icon16.png", diff --git a/popup.html b/popup.html index 5c942ab..8f94ac6 100644 --- a/popup.html +++ b/popup.html @@ -73,10 +73,12 @@