-
-
-
{songName.length > 35 ? songName.substring(0, 35) + "..." : songName}
-
{songAuthorName}
-
-
{difficulty}
-
!bsr {bsr}
-
-
{this.msToMinSeconds(this.props.data.currentSongTime * 1000)}/{this.msToMinSeconds(data.length)}
-
-
- }
-}
\ No newline at end of file
+ return (
+
+
+
+
+ {songName.length > 35
+ ? songName.substring(0, 35) + "..."
+ : songName}
+
+
{songAuthorName}
+
+
+ {difficulty}
+
+
!bsr {bsr}
+
+
+ {this.msToMinSeconds(this.props.data.currentSongTime * 1000)}/
+ {this.msToMinSeconds(data.length)}
+
+
+
+
+ );
+ }
+}
diff --git a/src/consts/WebsiteType.js b/src/consts/WebsiteType.js
index 2f75a80..b10b588 100644
--- a/src/consts/WebsiteType.js
+++ b/src/consts/WebsiteType.js
@@ -1,15 +1,15 @@
-import Config from '../../config.json';
+import Config from "../../config.json";
const WebsiteTypes = {
- ScoreSaber: {
- ApiUrl: Config.proxy_url + "/https://scoresaber.com/api/player/%s/full"
- },
- BeatLeader: {
- ApiUrl: Config.proxy_url + "/https://api.beatleader.xyz/player/%s"
- },
- Test: {
- ApiUrl: "/api/mockdata"
- }
-}
+ ScoreSaber: {
+ ApiUrl: Config.proxy_url + "/https://scoresaber.com/api/player/%s/full",
+ },
+ BeatLeader: {
+ ApiUrl: Config.proxy_url + "/https://api.beatleader.xyz/player/%s",
+ },
+ Test: {
+ ApiUrl: "/api/mockdata",
+ },
+};
-export default WebsiteTypes
\ No newline at end of file
+export default WebsiteTypes;
diff --git a/src/utils/utils.js b/src/utils/utils.js
index e6d9656..a9a712a 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -1,15 +1,15 @@
import WebsiteTypes from "../consts/WebsiteType";
export default class Utils {
- constructor() {};
+ constructor() {}
- /**
- * Returns the information for the given website type.
- *
- * @param {WebsiteTypes} website
- * @returns The website type's information.
- */
- getWebsiteApi(website) {
- return WebsiteTypes[website]
- }
-}
\ No newline at end of file
+ /**
+ * Returns the information for the given website type.
+ *
+ * @param {WebsiteTypes} website
+ * @returns The website type's information.
+ */
+ getWebsiteApi(website) {
+ return WebsiteTypes[website];
+ }
+}
diff --git a/styles/avatar.module.css b/styles/avatar.module.css
index 832775c..004d132 100644
--- a/styles/avatar.module.css
+++ b/styles/avatar.module.css
@@ -1,3 +1,3 @@
.playerAvatar {
border-radius: 5%;
-}
\ No newline at end of file
+}
diff --git a/styles/globals.css b/styles/globals.css
index 0253b0f..8e2b626 100644
--- a/styles/globals.css
+++ b/styles/globals.css
@@ -1,3 +1,5 @@
-*, html, body {
+*,
+html,
+body {
background-color: transparent;
-}
\ No newline at end of file
+}
diff --git a/styles/main.module.css b/styles/main.module.css
index 960a5be..6a43856 100644
--- a/styles/main.module.css
+++ b/styles/main.module.css
@@ -1,6 +1,6 @@
.main {
- font-family: 'Roboto', sans-serif !important;
+ font-family: "Roboto", sans-serif !important;
color: white;
font-size: xx-large;
line-height: 1.4em !important;
-}
\ No newline at end of file
+}
diff --git a/styles/overlay.module.css b/styles/overlay.module.css
index 71e6b8c..42f13ff 100644
--- a/styles/overlay.module.css
+++ b/styles/overlay.module.css
@@ -1,16 +1,16 @@
.main {
- font-family: 'Teko', sans-serif !important;
+ font-family: "Teko", sans-serif !important;
color: white;
font-size: xx-large;
line-height: 1.4em !important;
}
.main p {
- font-family: 'Teko', sans-serif !important;
+ font-family: "Teko", sans-serif !important;
color: white;
letter-spacing: normal;
}
.loading {
color: black;
-}
\ No newline at end of file
+}
diff --git a/styles/playerStats.module.css b/styles/playerStats.module.css
index 821844d..763f125 100644
--- a/styles/playerStats.module.css
+++ b/styles/playerStats.module.css
@@ -38,4 +38,4 @@
.playerStats p {
font-size: 37px;
-}
\ No newline at end of file
+}
diff --git a/styles/scoreStats.module.css b/styles/scoreStats.module.css
index 6e7a1b8..50b86ef 100644
--- a/styles/scoreStats.module.css
+++ b/styles/scoreStats.module.css
@@ -1,8 +1,8 @@
.scoreStats {
text-align: center;
- position:absolute;
- top:0;
- right:0;
+ position: absolute;
+ top: 0;
+ right: 0;
margin-right: 5px;
min-width: 135px;
}
@@ -42,4 +42,4 @@
.scoreStatsInfo {
margin-right: 10px;
text-align: right;
-}
\ No newline at end of file
+}
diff --git a/styles/songInfo.module.css b/styles/songInfo.module.css
index 5414b76..33e6430 100644
--- a/styles/songInfo.module.css
+++ b/styles/songInfo.module.css
@@ -1,8 +1,8 @@
.songInfoContainer {
display: flex;
position: fixed;
- bottom:0;
- left:0;
+ bottom: 0;
+ left: 0;
margin-left: 5px;
margin-bottom: 5px;
}
@@ -76,4 +76,4 @@
.songTimeText {
margin-top: -10px;
font-size: 20px;
-}
\ No newline at end of file
+}
diff --git a/utils/utils.js b/utils/utils.js
index 56a7f3d..f9a6f1e 100644
--- a/utils/utils.js
+++ b/utils/utils.js
@@ -1,35 +1,37 @@
-import Config from '../config.json';
+import Config from "../config.json";
const mapCache = new Map();
module.exports = {
- BEATSAVER_MAP_API: Config.proxy_url + "/https://api.beatsaver.com/maps/hash/%s",
+ BEATSAVER_MAP_API:
+ Config.proxy_url + "/https://api.beatsaver.com/maps/hash/%s",
- /**
- * Gets a specified maps data from BeatSaver
- *
- * @param {string} hash
- * @returns The map data
- */
- async getMapData(hash) {
- hash = this.BEATSAVER_MAP_API.replace("%s", hash);
- if (mapCache.has(hash)) { // Return from cache
- return mapCache.get(hash);
- }
+ /**
+ * Gets a specified maps data from BeatSaver
+ *
+ * @param {string} hash
+ * @returns The map data
+ */
+ async getMapData(hash) {
+ hash = this.BEATSAVER_MAP_API.replace("%s", hash);
+ if (mapCache.has(hash)) {
+ // Return from cache
+ return mapCache.get(hash);
+ }
- const data = await fetch(hash, {
- headers: {
- "origin": "Fascinated Overlay"
- }
- });
- if (data.status === 404) {
- return undefined;
- }
- const json = await data.json();
- mapCache.set(hash, json);
- setTimeout(() => {
- mapCache.delete(hash);
- }, 60 * 60 * 1000); // 1h
- return json;
- }
-}
\ No newline at end of file
+ const data = await fetch(hash, {
+ headers: {
+ origin: "Fascinated Overlay",
+ },
+ });
+ if (data.status === 404) {
+ return undefined;
+ }
+ const json = await data.json();
+ mapCache.set(hash, json);
+ setTimeout(() => {
+ mapCache.delete(hash);
+ }, 60 * 60 * 1000); // 1h
+ return json;
+ },
+};