@@ -42,7 +42,6 @@ window.onbeforeunload = () => {
4242const messageInput = document . getElementById ( "message-input" ) ;
4343const playerContainer = document . getElementById ( "player-container" ) ;
4444const wordContainer = document . getElementById ( "word-container" ) ;
45- const chat = document . getElementById ( "chat" ) ;
4645const messageContainer = document . getElementById ( "message-container" ) ;
4746const roundSpan = document . getElementById ( "rounds" ) ;
4847const maxRoundSpan = document . getElementById ( "max-rounds" ) ;
@@ -399,8 +398,6 @@ function updateTogglePenIcon() {
399398//that the actual canvas has to be resized accordingly too. This is needed
400399//since not every client has the same screensize.
401400const baseWidth = 1600 ;
402- const baseHeight = 900 ;
403- const boardRatio = baseWidth / baseHeight ;
404401
405402// Moving this here to extract the context after resizing
406403const context = drawingBoard . getContext ( "2d" , { alpha : false } ) ;
@@ -923,7 +920,6 @@ let round = 0;
923920let rounds = 0 ;
924921let roundEndTime = 0 ;
925922let gameState = "unstarted" ;
926- let drawingTimeSetting = "∞" ;
927923
928924const handleEvent = ( parsed ) => {
929925 if ( parsed . type === "ready" ) {
@@ -1267,7 +1263,6 @@ const handleReadyEvent = (ready) => {
12671263 round = ready . round ;
12681264 rounds = ready . rounds ;
12691265 gameState = ready . gameState ;
1270- drawingTimeSetting = ready . drawingTimeSetting ;
12711266 updateRoundsDisplay ( ) ;
12721267 updateButtonVisibilities ( ) ;
12731268
@@ -1966,16 +1961,6 @@ function onKeyDown(event) {
19661961//must've clicked it at least once in order for that to work.
19671962window . addEventListener ( "keydown" , onKeyDown ) ;
19681963
1969- function debounce ( func , timeout ) {
1970- let timer ;
1971- return ( ...args ) => {
1972- clearTimeout ( timer ) ;
1973- timer = setTimeout ( ( ) => {
1974- func . apply ( this , args ) ;
1975- } , timeout ) ;
1976- } ;
1977- }
1978-
19791964function clear ( context ) {
19801965 context . fillStyle = "#FFFFFF" ;
19811966 context . fillRect ( 0 , 0 , drawingBoard . width , drawingBoard . height ) ;
@@ -2058,15 +2043,6 @@ function drawLineAndSendEvent(
20582043 socket . send ( JSON . stringify ( drawInstruction ) ) ;
20592044}
20602045
2061- function getCookie ( name ) {
2062- let cookie = { } ;
2063- document . cookie . split ( ";" ) . forEach ( function ( el ) {
2064- let split = el . split ( "=" ) ;
2065- cookie [ split [ 0 ] . trim ( ) ] = split . slice ( 1 ) . join ( "=" ) ;
2066- } ) ;
2067- return cookie [ name ] ;
2068- }
2069-
20702046function isString ( obj ) {
20712047 return typeof obj === "string" ;
20722048}
0 commit comments