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 ; }