diff --git a/gulpfile.js b/gulpfile.js
index 8e2f85e14..7c2120073 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -12,7 +12,7 @@ sass.compiler = require("dart-sass");
let eslintConfig = {
parser: "babel-eslint",
- globals: ["jQuery", "$", "firebase", "html2canvas", "ClipboardItem"],
+ globals: ["firebase", "ClipboardItem"],
envs: ["es6", "browser", "node"],
rules: {
"constructor-super": "error",
diff --git a/package-lock.json b/package-lock.json
index 584327ddd..b35fbb786 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1777,6 +1777,11 @@
}
}
},
+ "base64-arraybuffer": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz",
+ "integrity": "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ=="
+ },
"base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
@@ -2648,6 +2653,14 @@
"randomfill": "^1.0.3"
}
},
+ "css-line-break": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-1.1.1.tgz",
+ "integrity": "sha512-1feNVaM4Fyzdj4mKPIQNL2n70MmuYzAXZ1aytlROFX1JsOo070OsugwGjj7nl6jnDJWHDM8zRZswkmeYVWZJQA==",
+ "requires": {
+ "base64-arraybuffer": "^0.2.0"
+ }
+ },
"currently-unhandled": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
@@ -4775,6 +4788,14 @@
"integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==",
"dev": true
},
+ "html2canvas": {
+ "version": "1.0.0-rc.7",
+ "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.0.0-rc.7.tgz",
+ "integrity": "sha512-yvPNZGejB2KOyKleZspjK/NruXVQuowu8NnV2HYG7gW7ytzl+umffbtUI62v2dCHQLDdsK6HIDtyJZ0W3neerA==",
+ "requires": {
+ "css-line-break": "1.1.1"
+ }
+ },
"htmlescape": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz",
@@ -5390,6 +5411,29 @@
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
"dev": true
},
+ "jquery": {
+ "version": "3.5.1",
+ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz",
+ "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg=="
+ },
+ "jquery-color": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/jquery-color/-/jquery-color-2.2.0.tgz",
+ "integrity": "sha512-4VoxsLMw860EQGNT/TmP3Lbr7/1OCQlBPS4ILj7bxRApJrPQfpqzdIOTY8Ll9nGY7UHtWqDuzR7cUcS1lcWjVw=="
+ },
+ "jquery-easing": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/jquery-easing/-/jquery-easing-0.0.1.tgz",
+ "integrity": "sha1-s8N1JbVXNNwe4a0JtsM3MYdodxU=",
+ "requires": {
+ "jquery": "*"
+ }
+ },
+ "jquery.cookie": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/jquery.cookie/-/jquery.cookie-1.4.1.tgz",
+ "integrity": "sha1-1j3OIJ6raR/mMxbbCMqeR+D5OFs="
+ },
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
diff --git a/package.json b/package.json
index 061174e45..e78c254aa 100644
--- a/package.json
+++ b/package.json
@@ -11,9 +11,6 @@
"deploy:live:functions": "npm run build && firebase deploy -P live --only functions",
"deploy:live": "npm run build && firebase deploy -P live"
},
- "engines": {
- "node": ">=10"
- },
"devDependencies": {
"@babel/core": "^7.12.3",
"@babel/plugin-transform-runtime": "^7.12.1",
@@ -46,6 +43,11 @@
"chart.js": "^2.9.4",
"chartjs-plugin-annotation": "^0.5.7",
"chartjs-plugin-trendline": "^0.2.2",
+ "html2canvas": "^1.0.0-rc.7",
+ "jquery": "^3.5.1",
+ "jquery-color": "^2.2.0",
+ "jquery-easing": "0.0.1",
+ "jquery.cookie": "^1.4.1",
"moment": "^2.29.1"
}
}
diff --git a/src/js/global-dependencies.js b/src/js/global-dependencies.js
index bcc034777..635cebe07 100644
--- a/src/js/global-dependencies.js
+++ b/src/js/global-dependencies.js
@@ -1,14 +1,21 @@
// this file should be concatenated at the top of the legacy js files
+// this refuses to work with ES6 syntax, TODO
+var $, jQuery;
+$ = jQuery = require("jquery");
+import "jquery-color";
+import "jquery-easing";
+import "jquery.cookie";
+
import Chart from "chart.js";
import chartTrendline from "chartjs-plugin-trendline";
import chartAnnotation from "chartjs-plugin-annotation";
-
-import moment from "moment";
-
Chart.plugins.register(chartTrendline);
Chart.plugins.register(chartAnnotation);
+import moment from "moment";
+import html2canvas from "html2canvas";
+
import {
db_getSnapshot,
db_setSnapshot,
diff --git a/static/index.html b/static/index.html
index 07ce4ec8d..20e1f68d8 100644
--- a/static/index.html
+++ b/static/index.html
@@ -3428,10 +3428,5 @@
src="https://kit.fontawesome.com/f3f87d89b4.js"
crossorigin="anonymous"
>
-
-
-
-
-