Skip to content

Commit

Permalink
Adding in game searching
Browse files Browse the repository at this point in the history
  • Loading branch information
Noahffiliation committed Apr 21, 2024
1 parent de1bafa commit 8180ce4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<p align="center">I'm lazy and want to search the same thing on multiple sites</p>

## About <a name = "about"></a>
I use a combination of [Letterboxd](https://letterboxd.com/), [Trakt](https://trakt.tv), [MyAnimeList](https://myanimelist.net/), and [MyDramaList](https://mydramalist.com/) to keep track and discover new movies, shows, anime, k-dramas, etc. I just needed a simple way to search all of them at once since lots of media appear on multiple sites.
I use a combination of [Letterboxd](https://letterboxd.com/), [Trakt](https://trakt.tv), [MyAnimeList](https://myanimelist.net/), and [MyDramaList](https://mydramalist.com/) to keep track and discover new movies, shows, anime, k-dramas, etc. I also look for songs to play in both Beat Saber and Clone Hero on [Beat Saver](https://bsaber.com) and [Chorus Encore](https://www.enchor.us). I use [Backloggd](https://www.backloggd.com), [Steam](https://store.steampowered.com), [GoG](https://www.gog.com), [Rockstar](https://store.rockstargames.com), and [Epic](https://store.epicgames.com) to keep track of games. I just needed a simple way to search all of them at once since lots of media appear on multiple sites.

## Authors <a name = "authors"></a>
- [@Noahffiliation](https://github.com/Noahffiliation) - Idea & Initial work
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<input type="search" placeholder="Search for a song" id="songSearch"/>
<button type="submit" id="songButton">Search</button>
</form>
<br>
<form>
<input type="search" placeholder="Search for a game" id="gameSearch"/>
<button type="submit" id="gameButton">Search</button>
</form>
</body>
<script src="script.js"></script>
</html>
11 changes: 11 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,20 @@ const songWebsites = [
'https://bsaber.com/?s='
];

const gameWebsites = [
'https://www.backloggd.com/search/games/',
'https://store.steampowered.com/search/?term=',
'https://www.gog.com/en/games?query=',
'https://store.rockstargames.com/search?query=',
'https://store.epicgames.com/en-US/expanded-search-results?q='
];

const mediaButton = document.getElementById("mediaButton");
const songButton = document.getElementById("songButton");
const gameButton = document.getElementById("gameButton");
const mediaSearch = document.getElementById("mediaSearch");
const songSearch = document.getElementById("songSearch");
const gameSearch = document.getElementById("gameSearch");

function openTabs(websites, searchElement) {
const searchValue = searchElement.value;
Expand All @@ -25,3 +35,4 @@ function openTabs(websites, searchElement) {

mediaButton.addEventListener("click", () => openTabs(mediaWebsites, mediaSearch));
songButton.addEventListener("click", () => openTabs(songWebsites, songSearch));
gameButton.addEventListener("click", () => openTabs(gameWebsites, gameSearch));

0 comments on commit 8180ce4

Please sign in to comment.