Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed mic-icon button #61

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,21 @@ function takeCommand(message) {
} else if (message.includes("open facebook")) {
window.open("https://facebook.com", "_blank");
speak("Opening Facebook...");
} else if (message.includes("open instagram")) {
window.open("https://instagram.com", "_blank");
speak("Opening Instagram...");
} else if (message.includes("open github")) {
window.open("https://github.com", "_blank");
speak("Opening Github...");
} else if (message.includes("open linkedin")) {
window.open("https://linkedin.com", "_blank");
speak("Opening Linkedin...");
} else if (message.includes("open twitter")) {
window.open("https://twitter.com", "_blank");
speak("Opening Twitter...");
} else if (message.includes("open stackoverflow")) {
window.open("https://stackoverflow.com", "_blank");
speak("Opening Stackoverflow...");
} else if (message.includes('what is') || message.includes('who is') || message.includes('what are')) {
window.open(`https://www.google.com/search?q=${message.replace(" ", "+")}`, "_blank");
const finalText = "This is what I found on the internet regarding " + message;
Expand Down Expand Up @@ -90,4 +105,4 @@ function takeCommand(message) {
const finalText = "I found some information for " + message + " on Google";
speak(finalText);
}
}
}
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<link rel="shortcut icon" href="avatar.png" type="image/x-icon">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
<script src="https://kit.fontawesome.com/c5182e007e.js" crossorigin="anonymous"></script>

</head>

Expand All @@ -22,11 +23,11 @@ <h1>J A R V I S</h1>
<p>I m a Virtual Assistant JARVIS, How may I help you?</p>
</div>
<div class="input">
<button class="talk"><i class="fas fa-microphone-alt"></i></button>
<button class="talk"><i class="fa-solid fa-microphone"></i></button>
<h1 class="content"> Click here to speak</h1>
</div>
</section>
<script src="app.js"></script>
</body>

</html>
</html>