From 23953b38dc90af8b36fe8b2e6f2217d81620a092 Mon Sep 17 00:00:00 2001 From: Liam <67254223+RealFascinated@users.noreply.github.com> Date: Thu, 20 Oct 2022 10:55:31 +0100 Subject: [PATCH] Removed textColor param --- pages/index.js | 10 +++------- pages/overlay.js | 11 ----------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/pages/index.js b/pages/index.js index 038d972..2397fa6 100644 --- a/pages/index.js +++ b/pages/index.js @@ -84,11 +84,11 @@ export default class Home extends Component { loadPreview() { this.setState({ isPreviewVisible: true, - previewUrl: this.generateUrl(true), + previewUrl: this.generateUrl(), }); } - generateUrl(withTc = false) { + generateUrl() { let values = ""; Object.entries(this.state.values).forEach((value) => { if (value[1] === undefined) { @@ -102,11 +102,7 @@ export default class Home extends Component { }); return ( - window.location.origin + - "/overlay?id=" + - this.state.steamId + - values + - (withTc ? "&textColor=black" : "") + window.location.origin + "/overlay?id=" + this.state.steamId + values ); } diff --git a/pages/overlay.js b/pages/overlay.js index 7e193a4..51d4f53 100644 --- a/pages/overlay.js +++ b/pages/overlay.js @@ -26,7 +26,6 @@ export default class Overlay extends Component { showPlayerStats: true, showScore: false, showSongInfo: false, - textColor: undefined, socket: undefined, isVisible: false, @@ -115,11 +114,6 @@ export default class Overlay extends Component { shouldConnectSocket = true; } - // Mainly used for the preview - if (params.textColor) { - this.setState({ textColor: params.textColor }); - } - if (shouldConnectSocket) { if (this.state.isConnectedToSocket) return; this.connectSocket(params.socketaddress); @@ -412,11 +406,6 @@ export default class Overlay extends Component { id, } = this.state; - if (this.state.textColor !== undefined) { - const element = document.querySelector("." + styles.main); - element.style.color = this.state.textColor; - } - if (loadingPlayerData) { return ; }