🔇 Removed print- and console.log-statements

This commit is contained in:
Mawoka
2022-06-09 17:43:46 +02:00
parent 2519451c97
commit bba85009bd
6 changed files with 0 additions and 90 deletions
-6
View File
@@ -64,8 +64,6 @@
let dataexport_download_a;
let warnToLeave = true;
$: console.log(timer_res);
let shown_question_now: number;
const connect = () => {
socket.emit('register_as_admin', {
@@ -77,11 +75,8 @@
connect();
}
socket.on('registered_as_admin', (data) => {
console.log('registered_as_admin', data['game']);
quiz_data = JSON.parse(data['game']);
console.log(quiz_data);
console.log(quiz_data.questions[0].question);
console.log(quiz_data.questions);
success = true;
});
socket.on('player_joined', (data) => {
@@ -160,7 +155,6 @@
socket.on('final_results', (data) => {
// data = JSON.parse(data);
console.log(data);
final_results = data;
console.log(getWinnersSorted());
-78
View File
@@ -1,78 +0,0 @@
<script lang="ts">
import type { QuizData } from '$lib/quiz_types';
import Title from '$lib/play/title.svelte';
import Question from '$lib/play/question.svelte';
import { socket } from '$lib/socket';
import { navbarVisible } from '$lib/stores';
navbarVisible.set(true);
interface GameMeta {
started: boolean;
}
let gameId = '81039240';
let message = '';
let username = '';
let gameData: QuizData;
let gameMeta: GameMeta = {
started: false
};
let question_index = '';
let unique = {};
// function restart() {
// unique = {}; // every {} is unique, {} === {} evaluates to false
// }
const connect = () => {
socket.emit('join_game', { game_pin: gameId, username: username });
};
const sendMessage = () => {
socket.emit('message', message);
message = '';
};
socket.on('joined_game', (data) => {
console.log('joined_game', data);
gameData = JSON.parse(data);
});
socket.on('game_not_found', (data) => {
console.log(data, 'game not found');
});
socket.on('join_game', (data) => {
console.log(data, 'join_game');
});
socket.on('message', (data) => {
console.log(data, 'message');
});
socket.on('start_game', () => {
gameMeta.started = true;
});
</script>
{#if !gameMeta.started}
<input bind:value={gameId} placeholder="GameID" />
<input bind:value={username} placeholder="Username" />
<button on:click={connect}>Connect</button>
<br />
<input bind:value={message} placeholder="message" />
<button on:click={sendMessage}>Send Message</button>
{:else if question_index === ''}
<Title bind:description={gameData.description} bind:title={gameData.title} />
{:else}
{#key unique}
<Question
bind:question={gameData.questions[parseInt(question_index)]}
bind:question_index
/>
{/key}
{/if}
@@ -63,7 +63,6 @@
}
const startGame = async (id: string): Promise<void> => {
console.log('start game', id);
let res;
if (window.confirm('Do you want to enable the captcha for players?')) {
res = await fetch(`/api/v1/quiz/start/${id}?captcha_enabled=True`, {