X-Git-Url: https://git.auder.net/img/rock_paper_scissors_lizard_spock.gif?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FUploadGame.vue;h=b4e4d853596e87e5d0ac191a312747c5f9ca1d5e;hb=6e0c0bcba5c9e76a50a2676aa3e63bc317123bcb;hp=a94c39b71946fa521bffab04581a2ba6a5715d92;hpb=1ef65040168ab7d55ce921abc9d63644a937d689;p=vchess.git diff --git a/client/src/components/UploadGame.vue b/client/src/components/UploadGame.vue index a94c39b7..b4e4d853 100644 --- a/client/src/components/UploadGame.vue +++ b/client/src/components/UploadGame.vue @@ -14,16 +14,16 @@ export default { name: "my-upload-game", methods: { uploadTrigger: function() { - document.getElementById("upload").click(); - }, - upload: function(e) { - const file = (e.target.files || e.dataTransfer.files)[0]; - var reader = new FileReader(); - reader.onloadend = ev => { - this.parseAndEmit(ev.currentTarget.result); - }; - reader.readAsText(file); - }, + document.getElementById("upload").click(); + }, + upload: function(e) { + const file = (e.target.files || e.dataTransfer.files)[0]; + var reader = new FileReader(); + reader.onloadend = ev => { + this.parseAndEmit(ev.currentTarget.result); + }; + reader.readAsText(file); + }, parseAndEmit: async function(pgn) { let game = { // Players potential ID and socket IDs are not searched