Replace getElementById with querySelector

This commit is contained in:
Simon Ser 2020-04-25 12:48:50 +02:00
parent cc3a41aa03
commit 19ee9be928
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
2 changed files with 6 additions and 6 deletions

View file

@ -1,7 +1,7 @@
var server = {
name: "chat.freenode.net",
url: "ws://localhost:8080",
username: "soju-test-user/irc.freenode.net",
username: "soju-test-user/chat.freenode.net",
realname: "soju-test-user",
nick: "soju-test-user",
pass: "soju-test-user",
@ -10,10 +10,10 @@ var server = {
var buffers = {};
var activeBuffer = null;
var bufferListElt = document.getElementById("buffer-list");
var logElt = document.getElementById("log");
var composerElt = document.getElementById("composer");
var composerInputElt = document.getElementById("composer-input");
var bufferListElt = document.querySelector("#buffer-list");
var logElt = document.querySelector("#log");
var composerElt = document.querySelector("#composer");
var composerInputElt = document.querySelector("#composer input");
function djb2(s) {
var hash = 5381;

View file

@ -19,7 +19,7 @@
</div>-->
</section>
<form id="composer">
<input type="text" id="composer-input" placeholder="Type a message">
<input type="text" placeholder="Type a message">
</form>
<script src="assets/irc.js"></script>