From 530ae91c89ae8e2fa590ccd1d78eefcb50a28ce5 Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Wed, 30 Aug 2023 16:42:57 +1000 Subject: [PATCH] fix webpack config --- .eslintrc.json | 8 +- .prettierrc | 4 + package.json | 7 +- public/popup/info.js | 8 +- src/.DS_Store | Bin 6148 -> 6148 bytes src/SEQTA.js | 689 ++++++++++++++-------------- src/background.js | 38 +- src/seqta/icons/assessmentsIcon.svg | 3 + src/seqta/icons/coursesIcon.svg | 3 + src/seqta/utils/stringToHTML.js | 12 + webpack.config.js | 44 +- 11 files changed, 427 insertions(+), 389 deletions(-) create mode 100644 .prettierrc create mode 100644 src/seqta/icons/assessmentsIcon.svg create mode 100644 src/seqta/icons/coursesIcon.svg create mode 100644 src/seqta/utils/stringToHTML.js diff --git a/.eslintrc.json b/.eslintrc.json index 68d9b5d1..9bf03bc3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,11 +2,13 @@ "env": { "browser": true, "commonjs": true, - "es2021": true + "es2021": true, + "node": true // add this line to allow Node.js-specific globals }, "extends": "eslint:recommended", "parserOptions": { - "ecmaVersion": "latest" + "ecmaVersion": "latest", + "sourceType": "module" // add this line to allow 'import' and 'export' statements }, "rules": { "indent": ["error", 2], @@ -14,4 +16,4 @@ "quotes": ["error", "double"], "semi": ["error", "always"] } -} +} \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..222861c3 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "tabWidth": 2, + "useTabs": false +} diff --git a/package.json b/package.json index 4427ded7..132029d8 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,12 @@ { "name": "evenbetterseqta", "version": "1.0.0", + "type": "module", "description": "![Logo](https://raw.githubusercontent.com/SethBurkart123/BetterThanBetterSeqta/c96edd5956fc11571408310aea98cf7222d6876f/src/icons/betterseqta-light-full.png#gh-dark-mode-only) ![Logo](https://raw.githubusercontent.com/SethBurkart123/BetterThanBetterSeqta/c96edd5956fc11571408310aea98cf7222d6876f/src/icons/betterseqta-dark-full.png#gh-light-mode-only)", "main": "webpack.config.js", "scripts": { - "build": "webpack --config webpack.config.js", - "dev": "webpack --config webpack.config.js --watch" + "build": "webpack --config webpack.config.js --mode production", + "dev": "webpack --config webpack.config.js --watch --mode production" }, "keywords": [], "author": "", @@ -13,6 +14,7 @@ "devDependencies": { "copy-webpack-plugin": "^11.0.0", "css-loader": "^6.8.1", + "dompurify": "^3.0.5", "eslint": "^8.48.0", "eslint-config-prettier": "^9.0.0", "eslint-webpack-plugin": "^4.0.1", @@ -22,6 +24,7 @@ "sass": "^1.65.1", "sass-loader": "^13.3.2", "style-loader": "^3.3.3", + "webextension-polyfill": "^0.10.0", "webpack": "^5.88.2", "webpack-cli": "^5.1.4" } diff --git a/public/popup/info.js b/public/popup/info.js index f1b406b4..9bbff158 100644 --- a/public/popup/info.js +++ b/public/popup/info.js @@ -11,13 +11,15 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +/*global chrome*/ + const onoffselection = document.querySelector("#onoff"); const notificationcollector = document.querySelector("#notification"); const lessonalert = document.querySelector("#lessonalert"); const aboutsection = document.querySelector("#aboutsection"); const shortcutsection = document.querySelector("#shortcutsection"); const miscsection = document.querySelector("#miscsection"); -const mainpage = document.querySelector("#mainpage"); +//const mainpage = document.querySelector("#mainpage"); const colorpicker = document.querySelector("#colorpicker"); const animatedbk = document.querySelector("#animatedbk"); const customshortcutbutton = document.getElementsByClassName( @@ -63,7 +65,7 @@ function openGithub() { url: "https://github.com/SethBurkart123/EvenBetterSEQTA", }); } - +/* function openPage(page) { mainpage.style.left = "-350px"; page.style.right = "0px"; @@ -75,7 +77,7 @@ function backToMainMenu() { menupage.style.right = "-350px"; shortcutpage.style.right = "-350px"; miscpage.style.right = "-350px"; -} +}*/ function resetActive() { for (let i = 0; i < navbuttons.length; i++) { diff --git a/src/.DS_Store b/src/.DS_Store index 3c2d477e36f7fd0e3e57d26a65e55f2e878a2df6..f54b8ea6bfe607c0a70597865fcb0d9cf3e5d8c6 100644 GIT binary patch delta 76 zcmZoMXfc=|#>B`mu~2NHo+2+30|Nsi1A_nqLo!3j#HjU?4MbQr|7PN0-Nf>SaWgvy dKL=3l=8w$ZnJ4p$SaJYWgOoFE4iMSG3;>|^5ibA$ delta 127 zcmZoMXfc=|#>B)qu~2NHo+3930|Nsi1A_nqL-E9z^_vBlm>Bs%Vyq0A49N`n40#O2 zlVuni*)1$}6pRfFCNE*M7e|sS3ogpb$