Skip to content
10 changes: 5 additions & 5 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## Checklist

### Required changes:
- [ ] Center the description (Line 17 in HTML file) using a single change in CSS
- [ ] Fix JS so that when the search is executed, the search engine is not present in query
- [ ] Add Google Drive, Google Slides and Google Sheets as a provider
- Center the description (Line 17 in HTML file) using a single change in CSS
- Fix JS so that when the search is executed, the search engine is not present in query
- Add Google Drive, Google Slides and Google Sheets as a provider

### Optional changes:
- [ ] Add other search providers (GitHub, Spotify, etc)
- [ ] Additional CSS styling (as you like)
- Add other search providers (GitHub, Spotify, etc)
- Additional CSS styling (as you like)
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,16 @@ Supported providers (first_word):
- Google (google) (Default)
- YouTube (youtube)
- Google Docs (docs)
- Google drive
- Google slides
- Google sheets
- Spotify
- github
- wattpad
- goodreads
- animixplay
- stackoverflow

[Icons created by freepik on Flaticon](https://www.flaticon.com/authors/freepik)
https://github.com/toasted-breads-2/multisearch

[Icons created by freepik on Flaticon](https://www.flaticon.com/authors/freepik)
Binary file added Wattpad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added animixplay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added drive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added github.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added goodreads.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions index.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
html, body {
height: 100vh;
width: 100vw;
background-color:rgb(200, 182, 182);
}
body {
display: flex;
Expand All @@ -24,17 +25,20 @@ body {
font-size: 5rem;
margin: 1.5rem;
font-weight: 500;
font-family: 'MomsTypewriterRegular',monospace;

}
@media screen and (max-width:540px) {
.heading {
font-size: 2.5rem;
}
}
.description {
text-align: center;
font-style: oblique;
}
.search_wrapper {
border: 0.125rem solid rgb(23, 23, 23);
border: 0.125rem solid dotted #575a6b;
height: 3rem;
padding: 0.25rem 0.75rem;
box-sizing: border-box;
Expand Down Expand Up @@ -88,4 +92,4 @@ body {
.search_icon {
width: 1.5rem;
height: 1.5rem;
}
}
84 changes: 79 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,22 @@ let current_search = 'google'
document.querySelector('.search_input').addEventListener('keyup', e => {
const input = e.target.value;
let search_engine = input.split(' ')[0].toLowerCase();
let search_query = input.split(' ').splice(0).join(' ');
let search_query = input.split(' ').splice(1);
switch(search_engine){
case 'google':
case 'youtube':
case 'docs': break;
case 'docs':
case 'drive':
case 'slides':
case 'sheets':
case 'Spotify':
case 'GitHub':
case 'Wattpad':
case 'goodreads':
case 'animixplay':
case 'stackoverflow':

break;
default: search_engine = 'google';
search_query = input;
}
Expand All @@ -26,7 +37,43 @@ document.querySelector('.search_input').addEventListener('keyup', e => {
image.src = 'docs.png';
image.alt = 'Google Docs icon';
break;
}
case 'drive':
image.src = 'drive.png';
image.alt = 'Google drive icon';
break;
case 'slides':
image.src = 'slides.png';
image.alt = 'Google slides icon';
break;
case 'sheets':
image.src = 'sheets.png';
image.alt = 'Google sheets icon';
break;
case 'Spotify':
image.src = 'spotify.png';
image.alt = 'spotify icon';
break;
case 'GitHub':
image.src = 'github.png';
image.alt = 'github icon';
break;
case 'Wattpad':
image.src = 'Wattpad.png';
image.alt = 'Wattpad icon';
break;
case 'goodreads':
image.src = 'goodreads.png';
image.alt = 'goodreads icon';
break;
case 'animixplay':
image.src = 'animixplay.png';
image.alt = 'animixplay icon';
break;
case 'stackoverflow':
image.src = 'stackoverflow.png';
image.alt = 'stackoverflow icon';
break;
}
}
if(e.key === 'Enter')
switch(search_engine) {
Expand All @@ -36,7 +83,34 @@ document.querySelector('.search_input').addEventListener('keyup', e => {
case 'youtube':
window.location = `https://www.youtube.com/results?search_query=${search_query}`;
break;
default:
case 'drive':
window.location = `https://drive.google.com/drive/search?q=${search_query}`;
break;
case 'slides':
window.location = `https://docs.google.com/presentation/u/0/?tgif=d&q=${search_query}`;
break;
case 'sheets':
window.location = `https://docs.google.com/spreadsheets/u/0/?tgif=d&q=${search_query}`;
break;
case 'Spotify':
window.location = `https://open.spotify.com/search/${search_query}`;
break;
case 'GitHub':
window.location = `https://github.com/search?q=${search_query}`;
break;
case 'Wattpad':
window.location = `https://www.wattpad.com/search/${search_query}`;
break;
case 'goodreads':
window.location = `https://www.goodreads.com/search?utf8=%E2%9C%93&query=${search_query}`;
break;
case 'animixplay':
window.location = `https://animixplay.to/?q=${search_query}`;
break;
case 'stackoverflow':
window.location = `https://stackoverflow.com/search?q=${search_query}`;
break;
default:
window.location = `https://www.google.com/search?q=${search_query}`;
}
});
});
Binary file added sheets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spotify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added stackoverflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.