Skip to content

Commit

Permalink
Fix search replace words
Browse files Browse the repository at this point in the history
  • Loading branch information
ignaprados committed Aug 10, 2021
1 parent 700b84a commit 61e42a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,9 @@ function process(rawText) {
}

else if (text.includes("busca")) {
window.open(`http://google.com/search?q=${rawText.replace("Busca", "")}`, "_blank");
response = `Encontré esta información sobre ${rawText.replace("Busca", "")} en Google.`; toggleBtn();

window.open(`http://google.com/search?q=${rawText.replace("Busca"&&"Buscar", "")}`, "_blank");
response = `Encontré esta información sobre ${rawText.replace("Busca"&&"Buscar", "")}.`; toggleBtn();
}

else if (!response) {
Expand Down

1 comment on commit 61e42a4

@vercel
Copy link

@vercel vercel bot commented on 61e42a4 Aug 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.