Skip to content

Commit

Permalink
version 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
gauthamzz committed Feb 26, 2018
1 parent a5434b9 commit ab69a91
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
40 changes: 20 additions & 20 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion css/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,12 @@ <h5>Toggle the Features</h5>
<div class="mdl-tabs__panel " id="help">
<ul class="features-list help">
<li class="feature">
<html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>Landbot | Convert a Landing Page into a Chatbot</title><style type="text/css">html { margin: 0; height: 100%; overflow: hidden; } iframe { position: fixed; left:0; right:0; bottom:0; top:0; border:0; }</style></head><body><iframe width="100%" height="100%" frameborder="0" src="https://landbot.io/u/H-28975-NKVXCWXE3G716Q3G/index.html"></iframe></body></html>
<a href="#">
<span class="media">
<img src="img/logo-color.png" alt="">
</span>

<span class="data">
<span class="title">
How it works
Expand Down

0 comments on commit ab69a91

Please sign in to comment.