Fix en-passant for Wildebeest, draft Benedict variant
[vchess.git] / client / src / main.js
CommitLineData
625022fd
BA
1import Vue from "vue";
2import App from "./App.vue";
3import router from "./router";
c66a829b 4import { store } from "./store";
625022fd
BA
5
6Vue.config.productionTip = false;
7
8new Vue({
9 router,
10 render: function(h) {
11 return h(App);
98db2082 12 },
c66a829b 13 created: function() {
6808d7a1
BA
14 window.doClick = elemId => {
15 document.getElementById(elemId).click();
16 };
17 document.addEventListener("keydown", e => {
18 if (e.code === "Escape") {
63ca2b89
BA
19 let modalBoxes = document.querySelectorAll("[id^='modal']");
20 modalBoxes.forEach(m => {
725da57f 21 if (m.checked && m.id != "modalAccept") m.checked = false;
63ca2b89
BA
22 });
23 }
24 });
8418f0d7 25 store.initialize();
6808d7a1 26 }
625022fd 27}).$mount("#app");