From 63ac22d6c8797dc7faaea8741f83e094f8295a41 Mon Sep 17 00:00:00 2001 From: Florent Chehab Date: Sat, 18 Apr 2020 22:15:12 +0200 Subject: [PATCH] refacto: moved to src --- src/entry.js | 16 ++++++++++++++++ {assets/js => src}/keybinds.js | 0 {assets/js => src}/main.js | 2 ++ {assets/js => src}/whiteboard.js | 0 4 files changed, 18 insertions(+) create mode 100644 src/entry.js rename {assets/js => src}/keybinds.js (100%) rename {assets/js => src}/main.js (99%) rename {assets/js => src}/whiteboard.js (100%) diff --git a/src/entry.js b/src/entry.js new file mode 100644 index 0000000..a1dccac --- /dev/null +++ b/src/entry.js @@ -0,0 +1,16 @@ +import "./keybinds"; +import "./whiteboard"; +import "./main"; +import "../assets/css/main.css" + +//Set correct width height on mobile browsers +const isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor); +if (isChrome) { + $('head').append(''); +} else { + $('head').append(''); +} + +if (module.hot) { + module.hot.accept(); +} diff --git a/assets/js/keybinds.js b/src/keybinds.js similarity index 100% rename from assets/js/keybinds.js rename to src/keybinds.js diff --git a/assets/js/main.js b/src/main.js similarity index 99% rename from assets/js/main.js rename to src/main.js index ac8f387..f05f790 100644 --- a/assets/js/main.js +++ b/src/main.js @@ -1,3 +1,5 @@ +import keymage from "keymage"; + var whiteboardId = getQueryVariable("whiteboardid"); var randomid = getQueryVariable("randomid"); if (randomid && !whiteboardId) { //set random whiteboard on empty whiteboardid diff --git a/assets/js/whiteboard.js b/src/whiteboard.js similarity index 100% rename from assets/js/whiteboard.js rename to src/whiteboard.js