word input in color of user whose turn it is
This commit is contained in:
parent
c9c3ed7a59
commit
7545e83cfb
@ -73,7 +73,7 @@ $config_data = json_decode($raw_json_config, false);
|
||||
<br><br>
|
||||
<form action="./#wordform" method="post" autocomplete="off" id="wordform">
|
||||
<table>
|
||||
<tr> <td>Nächstes Wort:</td> <td><input type="text" name="submitted"></td> </tr>
|
||||
<tr> <td>Nächstes Wort:</td> <td><input type="text" name="submitted" id="wordinput"></td> </tr>
|
||||
<tr> <td></td> <td><input type="submit" value="senden"></td> </tr>
|
||||
</table>
|
||||
</form>
|
||||
@ -102,6 +102,13 @@ $config_data = json_decode($raw_json_config, false);
|
||||
}
|
||||
}
|
||||
previousTextLength = text.length;
|
||||
|
||||
// color
|
||||
var spans = document.querySelector(".sentences").getElementsByTagName("span");
|
||||
// we expect this to be from the user who's turn it is now (3 users)
|
||||
var histurnspan = spans[spans.length - 3];
|
||||
//console.log(histurnspan.getAttribute("style"));
|
||||
document.getElementById("wordinput").setAttribute("style", histurnspan.getAttribute("style"));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user