From 70934782dfaf6b554a78a5c13ecf4430e76df0b4 Mon Sep 17 00:00:00 2001 From: Ryan Peters Date: Thu, 22 Jul 2021 16:31:54 -0400 Subject: [PATCH] set live mode enabled by default --- BinaryDad.Coding/wwwroot/js/hub.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/BinaryDad.Coding/wwwroot/js/hub.js b/BinaryDad.Coding/wwwroot/js/hub.js index e2e1456..cc9ba7a 100644 --- a/BinaryDad.Coding/wwwroot/js/hub.js +++ b/BinaryDad.Coding/wwwroot/js/hub.js @@ -37,14 +37,15 @@ $('#editor').height(editorHeight - 2); }; - isLiveMode(); - setHeight(); - // events $(window).on('hashchange', isLiveMode); $(window).resize(setHeight); $('#your-name-text, #your-color-text').doneTyping(sendName); + isLiveMode(); + setHeight(); + window.location.hash = '#live'; // set live mode on by default + let isTeacher = window.location.hash === '#4ELQcUq7UnFGghAZCVr4Chr9JmtncigfkGu5WSf9'; if (isTeacher) {