Compare commits

...

51 Commits
main ... main

Author SHA1 Message Date
Thomas Rupprecht e2dff3f308 ci(changelog): improve changelog format 2024-03-06 22:03:49 +01:00
Thomas Rupprecht 47a54c6cbd chore(package): update `git-cliff` 2024-03-06 21:10:23 +01:00
Thomas Rupprecht 3dc39c8656 refactor(stylelint): convert `.stylelintrc.mjs` to `stylelint.config.mjs` 2024-03-05 21:55:50 +01:00
Thomas Rupprecht adde1d82fd refactor(commitlint): convert `.commitlintrc.js` to `commitlint.config.mjs` 2024-03-05 21:52:07 +01:00
Thomas Rupprecht 5afec23598 refactor(eslint): convert `eslint.config.js` to `eslint.config.mjs` 2024-03-05 21:32:54 +01:00
Thomas Rupprecht 79c06a97e2 chore(package): update dependencies
update `@commitlint/{cli,config-conventional,cz-commitlint}`, `@types/firefox-webext-browser`, `eslint{,-plugin-jsdoc}`, `husky`
2024-03-05 21:30:08 +01:00
Thomas Rupprecht 933f7a042c chore(dprint): update dprint plugins 2024-03-05 21:22:15 +01:00
Thomas Rupprecht 8023167072 refactor(polyfill): replace `webextension-polyfill` with simple `browser` fallback to `chrome` 2024-02-25 19:46:21 +01:00
Thomas Rupprecht 923a906a9e chore(package): update dependencies
update `eslint-plugin-{jsdoc,unicorn}`, `husky`, `stylelint`
2024-02-10 18:07:49 +01:00
Thomas Rupprecht ab0a42649c chore(package): update `husky` 2024-01-27 00:50:03 +01:00
Thomas Rupprecht 03d5c06b3b chore(package): update dependencies
update `@commitlint/{cli,config-conventional,cz-commitlint}`, `eslint-plugin-jsdoc`,
`stylelint{,-plugin-defensive-css}`, `web-ext`
2024-01-27 00:40:16 +01:00
Thomas Rupprecht b9219e1bad chore(package): update dependencies
update `@commitlint/{cli,config-conventional,cz-commitlint}`, `web-ext`
2024-01-09 18:25:00 +01:00
Thomas Rupprecht 37ebd89a9a chore(package): update `eslint-plugin-jsdoc` 2024-01-03 20:43:55 +01:00
Thomas Rupprecht aad04579ef chore(package): update dependencies
update: `dprint`, `eslint{,-plugin-jsdoc,-plugin-unicorn}`,
`stylelint{,-config-standard,-plugin-defensive-css,-plugin-logical-css}`
2024-01-02 12:38:30 +01:00
Thomas Rupprecht 1cb66ecca6 chore(package): update dependencies
update: `@commitlint/{cli,config-conventional,cz-commitlint}`, `@types/firefox-webext-browser`,
`dprint`, `eslint{,-plugin-jsdoc}`, `web-ext`, dprint plugins
2023-12-04 21:32:26 +01:00
Thomas Rupprecht 48657a1283 ci(package): add fmt check to `preversion` run 2023-11-08 20:41:44 +01:00
Thomas Rupprecht 1231308d8d chore(dprint): update dprint plugins 2023-11-08 20:35:12 +01:00
Thomas Rupprecht fcc6558b7f feat(popup): set `scrollbar-gutter: stable` 2023-11-08 20:05:51 +01:00
Thomas Rupprecht b631c01873 chore(package): update dependencies
update: `@commitlint/{cli,config-conventional,cz-commitlint}`, `@types/firefox-webext-browser`,
`dprint`, `eslint{,-plugin-unicorn}`, `git-cliff`, `stylelint-plugin-defensive-css`
2023-11-08 20:03:59 +01:00
Thomas Rupprecht 637a0eb63e feat(fmt): add dprint as code formatter 2023-10-23 20:41:55 +02:00
Thomas Rupprecht 3453207e7e chore(package): update dependencies
update `@commitlint/{cli,config-conventional,cz-commitlint}`, `@types/firefox-webext-browser`
`eslint`, `git-cliff`, `stylelint{,-plugin-defensive-css}`
2023-10-23 19:50:12 +02:00
Thomas Rupprecht 3dc5236380 chore(package): update `stylelint-plugin-defensive-css`, `web-ext` 2023-09-28 16:15:44 +02:00
Thomas Rupprecht 460020f6cf style: add missing semicolon, fix codestyle in `.stylelintrc.cjs` and `types.d.ts` 2023-09-28 12:34:24 +02:00
Thomas Rupprecht 2e1fde4715 chore(package): update `@types/firefox-webext-browser`, `eslint`, `eslint-plugin-jsdoc` 2023-09-25 20:20:21 +02:00
Thomas Rupprecht 52aeb58698 refactor(popup): improve init of popup script and simplify `setLinks` 2023-09-14 02:13:49 +02:00
Thomas Rupprecht fe31d9c6ec feat(editorconfig): add `.cjs` and `.mjs` to `.editorconfig` 2023-09-14 01:19:15 +02:00
Thomas Rupprecht 9921e37605 0.9.5 2023-09-13 21:51:09 +02:00
Thomas Rupprecht c6feec3a67 fix(background): fix init on addon reload 2023-09-13 21:50:31 +02:00
Thomas Rupprecht 812a1b6110 0.9.4 2023-09-13 20:37:32 +02:00
Thomas Rupprecht 8410af011b feat: update git url from `gitea.usrspace.at` to `git.usrspace.at` 2023-09-13 20:32:23 +02:00
Thomas Rupprecht ae56bdf5bc chore(package): update `eslint`, `eslint-plugin-jsdoc` 2023-09-13 20:28:18 +02:00
Thomas Rupprecht 91e6bd10b6 feat(popup): import `extension.css` as layer via css 2023-09-13 20:19:51 +02:00
Thomas Rupprecht d97dc9da87 fix(background): fix background script init 2023-09-13 20:09:46 +02:00
Thomas Rupprecht dd95d5a0ac chore(package): update `package-lock.json` 2023-09-08 01:08:58 +02:00
Thomas Rupprecht 4037ec9631 feat(linting): add `eslint` with `unicorn`, `jsdoc`, `no-unsanitized` plugins 2023-09-08 01:00:20 +02:00
Thomas Rupprecht 2c7230fdc9 refactor(popup): general code improvements by linter hints 2023-09-08 00:49:12 +02:00
Thomas Rupprecht ea43a4cd9d chore(types): make `Calendar` types readonly 2023-09-08 00:12:19 +02:00
Thomas Rupprecht e711fb11a8 fix(package): update web-ext to support newer browser APIs and remove `addon-linter` override 2023-09-07 13:12:11 +02:00
Thomas Rupprecht 3f1300543d refactor(background): inline `fetch` and use `URLSearchParams` 2023-09-06 21:30:19 +02:00
Thomas Rupprecht b0a2a4321e 0.9.3 2023-09-06 20:56:31 +02:00
Thomas Rupprecht 9d524dde4d fix(linting): add newer version of `addon-linter` via override to support newer browser APIs 2023-09-06 20:55:12 +02:00
Thomas Rupprecht a4a0db71c5 feat(linting): add `stylelint` and add check to lint script 2023-09-06 20:34:06 +02:00
Thomas Rupprecht db0faab4db refactor(storage): use `storage.session` instead of `storage.local` 2023-09-06 20:10:55 +02:00
Thomas Rupprecht 918cf7db91 chore(package): update @commitlint/{cli,config-conventional,cz-commitlint}, git-cliff 2023-09-02 00:09:42 +02:00
Thomas Rupprecht 333e0b8d80 chore(package): update @commitlint/{cli,config-conventional,cz-commitlint} 2023-07-19 21:22:46 +02:00
Thomas Rupprecht 8c2bea5fcc chore(package): update @commitlint/{cli,config-conventional} 2023-07-04 23:42:05 +02:00
Thomas Rupprecht 6c622b4ef0 feat(popup): improve colors, refactor css, support rtl lang 2023-06-07 00:10:09 +02:00
Thomas Rupprecht cd0b5805eb chore(package): update @commitlint/{cli,config-conventional} 2023-06-06 22:06:31 +02:00
Thomas Rupprecht c7607652e9 style: improve codestyle 2023-06-01 01:49:38 +02:00
Thomas Rupprecht 0fe1aaf189 docs(readme): change README title 2023-06-01 00:03:51 +02:00
Thomas Rupprecht f3d8199b97 refactor(config): move homepage url to config 2023-06-01 00:02:31 +02:00
21 changed files with 3142 additions and 1376 deletions

View File

@ -3,7 +3,7 @@
# top-most EditorConfig file
root = true
[*.{html,css,js,json,svg,ts,toml}]
[*.{html,css,js,cjs,mjs,json,jsonc,svg,ts,toml}]
indent_style = tab
indent_size = 2
end_of_line = lf

1
.gitignore vendored
View File

@ -1,2 +1 @@
/web-ext-artifacts
src/browser-polyfill.js

View File

@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx --no -- commitlint --edit ${1}

View File

@ -1,6 +1,3 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npm run lint
npm test
npm run update-changelog && git add CHANGELOG.md

View File

@ -2,230 +2,321 @@
All notable changes to this project will be documented in this file.
## \[unreleased]
## [unreleased]
### ⛰️ Features
- Add commitlint to enforce commit message format
- Update the changelog automatically on every commit
### 🐛 Bug Fixes
- Correctly update the changelog on release
### 📚 Documentation
- Add logo and screenshot to readme
- Update quick-links
## \[[0.9.2](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.9.2)] - 2023-05-24
### ⛰️ Features
- Add git-cliff to update the CHANGELOG.md
### 🐛 Bug Fixes
- Replace deprecated substr() with substring() and add checks for promise results
- Fix markdown escaping in changelog
- *(editorconfig)* Add `.cjs` and `.mjs` to `.editorconfig` ([fe31d9c](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/fe31d9c6ecba98bea5266d9166f3fc4fce9bc2f1))
- *(fmt)* Add dprint as code formatter ([637a0eb](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/637a0eb63e83f5ca471ef5ae5587c5caa778337e))
- *(popup)* Set `scrollbar-gutter: stable` ([fcc6558](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/fcc6558b7fd1782727c525a3b090b4da825c7b34))
### 🚜 Refactor
- Remove background.html and import directly as ES module
- Remove "browser_style" setting and include cleaned up extension.css
- *(popup)* Improve init of popup script and simplify `setLinks` ([52aeb58](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/52aeb5869828e37ffdef3469ed98ae84baa1c86f))
- *(polyfill)* Replace `webextension-polyfill` with simple `browser` fallback to `chrome` ([8023167](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/8023167072199c499d61adcf5f6c245122ca7641))
- *(eslint)* Convert `eslint.config.js` to `eslint.config.mjs` ([5afec23](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/5afec2359877b44b051a7b2590202b709253882a))
- *(commitlint)* Convert `.commitlintrc.js` to `commitlint.config.mjs` ([adde1d8](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/adde1d82fdc531f17a2605423dae5e26c8c1bdfc))
- *(stylelint)* Convert `.stylelintrc.mjs` to `stylelint.config.mjs` ([3dc39c8](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/3dc39c86565b101f0621f3a18c0ee5564f4a1e9a))
### 📚 Documentation
### 🎨 Styling
- Add type definitions for Calendar and SpaceApi
- Update changelog with new version
- Add missing semicolon, fix codestyle in `.stylelintrc.cjs` and `types.d.ts` ([460020f](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/460020f6cf021cd203d7c80e4341577318a389bb))
### ⚙️ Miscellaneous Tasks
- Update husky
- Improve CHANGELOG config
- Unify and improve codestyle
- Add .ts files editorconfig and fix styling
- Update @types/firefox-webext-browser and add web-ext to devDependencies
- Update @types/firefox-webext-browser and web-ext
- Update web-ext
- Update git-cliff
- *(package)* Update `@types/firefox-webext-browser`, `eslint`, `eslint-plugin-jsdoc` ([2e1fde4](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/2e1fde47157d48eced166d48d76ec793e048d8e5))
- *(package)* Update `stylelint-plugin-defensive-css`, `web-ext` ([3dc5236](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/3dc52363801d9c723ec3672f24acdbd2fd863ffb))
- *(package)* Update dependencies ([3453207](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/3453207e7eacf8476cb64d9ad0e5659ee65b6500))
- *(package)* Update dependencies ([b631c01](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/b631c01873b2a423138d9048f43f6def04b87f1a))
- *(dprint)* Update dprint plugins ([1231308](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/1231308d8ddb7e762e81ad61bb5fb5db7099544f))
- *(package)* Add fmt check to `preversion` run ([48657a1](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/48657a1283471f951b6e5cabd2e115918bab889f))
- *(package)* Update dependencies ([1cb66ec](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/1cb66ecca6a0274b8e5fe277504031f5dba605c4))
- *(package)* Update dependencies ([aad0457](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/aad04579ef9886e34daf4bff50b3175c48fd0d8f))
- *(package)* Update `eslint-plugin-jsdoc` ([37ebd89](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/37ebd89a9a5ed466fe9c0c5cb890a23beb3da3eb))
- *(package)* Update dependencies ([b9219e1](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/b9219e1badc367ad81b79a6545e05918f6a7932e))
- *(package)* Update dependencies ([03d5c06](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/03d5c06b3bb745f186f8fc1f04b4379b5ab186d8))
- *(package)* Update `husky` ([ab0a426](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/ab0a42649c138d9fae8bd08bf9eb6d2cc3f62516))
- *(package)* Update dependencies ([923a906](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/923a906a9ed9e6e5090730d3d2cf879ff2e425c1))
- *(dprint)* Update dprint plugins ([933f7a0](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/933f7a042c3bd787534a4129f0a2d5ae8d15bf9a))
- *(package)* Update dependencies ([79c06a9](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/79c06a97e259dc93cdcf623c4f5c90f74bd3cb1a))
- *(package)* Update `git-cliff` ([47a54c6](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/47a54c6cbd2b30de937d5a9e8e1cff53257174f1))
- *(changelog)* Improve changelog format ([4f4822a](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/4f4822a4bcab757f7acdedd2ad8f6f5781e76082))
### ✳️ Other
- Add pre-commit hook with husky
- Improve git-cliff config
## \[[0.9.1](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.9.1)] - 2023-01-22
### ✳️ Other
- Extract code into setBadgeStatus and createStatusChangedNotification function
- Don't fetch data if offline
- Replace web-ext types package
- Await init
- Add link to Pad
## \[[0.9.0](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.9.0)] - 2023-01-20
### ✳️ Other
- Manifest_v3
- Update to manifest_version v3
- Make code compatible with manifest_version v3
## \[[0.8.7](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.7)] - 2023-01-20
### ✳️ Other
- Add badges to README
- Improve README
- Improve badges
- Improve config
- Use globalThis instead of window to also work in service worker
- Remove unnecessary permissions
- Remove persistent flag in manifest config
- Open usrspace.at homepage on install
## \[[0.8.6](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.6)] - 2023-01-05
### ✳️ Other
- Change addon id to currently used one
## \[[0.8.5](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.5)] - 2023-01-05
### ✳️ Other
- Add web-ext-config.js and add watch scripts
- Improve README
- Add development docs
- Inject browser-polyfill only in chromium builds
- Add addon id
## \[[0.8.4](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.4)] - 2023-01-05
### ✳️ Other
- Use html template tag
- Change strict_min_version to v79
- Simplify updateSpaceApiJson
- Add lint script
## \[[0.8.3](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.3)] - 2023-01-04
### ✳️ Other
- Update strict_min_version to 57.0
## \[[0.8.2](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.2)] - 2023-01-04
### ✳️ Other
- Explicit set persistent=true and add browser_specific_settings in manifest.json
- Set html lang by browser language
- Improve popup styling
## \[[0.8.1](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.1)] - 2022-12-25
## [0.9.5](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.9.4..v0.9.5) - 2023-09-13
### 🐛 Bug Fixes
- Fix copy-version script
- *(background)* Fix init on addon reload ([c6feec3](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/c6feec3a679d18c4e0c37bbc92c69d2e28163d7b))
### ✳️ Other
## [0.9.4](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.9.3..v0.9.4) - 2023-09-13
- Manifest l10n
- Faster data fetching, badge improvements
- Cursor pointer on clickable elements
- Move manifest and _locales into src
- Update package-lock
- Store data in localStorage
- Use storage api
- Use browser.alarms api
- Unfiy codestyle
- Cleanup data on startup
### ⛰️ Features
## \[[0.8.0](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.0)] - 2022-12-24
### ✳️ Other
- Improve code, doc, tooling
- Npm version scripts
- Copy browser-polyfill
- Import config as module
- Move code into src dir
- Add JsDoc and small code improvements
- Add build script
- Improve code
- Remove old icons
- Add l10n
- Cleanup manifest.json
- Increase svg size
- Set build filename
## \[[0.7](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.7)] - 2021-11-06
- *(linting)* Add `eslint` with `unicorn`, `jsdoc`, `no-unsanitized` plugins ([4037ec9](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/4037ec96316f09ea0506dd4127876dc27aa4f537))
- *(popup)* Import `extension.css` as layer via css ([91e6bd1](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/91e6bd10b6c6b8ca1094e3e5263fecc01c20ea58))
- Update git url from `gitea.usrspace.at` to `git.usrspace.at` ([8410af0](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/8410af011b17218c76c7a1b88a5b26063b4e92be))
### 🐛 Bug Fixes
- Fix new urls
- Fix dates if no date is found
- Fix data, remove logging, improve code
- *(package)* Update web-ext to support newer browser APIs and remove `addon-linter` override ([e711fb1](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/e711fb11a8dc20746fe397e657a394366cdcf770))
- *(background)* Fix background script init ([d97dc9d](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/d97dc9da878010d976d09f57c34072976458b2a7))
### ✳️ Other
### 🚜 Refactor
- Change spaceApiUrl and nextcloud label
- Add release info
- Add editorconfig
- Reformat code
- Add package.json for typescript type definitions
- Use template strings
- Format datetime
- Change to normal function and use async/await
- Use css variables and prepare for dark mode support
- Add Nunito font
- Change icons, enable darkmode, improve styling
- Update license
- Change icon
- Remove old html code and load right svg
- *(background)* Inline `fetch` and use `URLSearchParams` ([3f13005](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/3f1300543d95f6d31d598d1157bebf632c232318))
- *(popup)* General code improvements by linter hints ([2c7230f](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/2c7230fdc9d19e2ab045314bb741dbb531c5b84c))
## \[[0.4](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.4)] - 2019-10-04
### ⚙️ Miscellaneous Tasks
- *(types)* Make `Calendar` types readonly ([ea43a4c](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/ea43a4cd9d61ba820d5954a37b748f2bcdba7d3a))
- *(package)* Update `package-lock.json` ([dd95d5a](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/dd95d5a0ac710d7c5be7e3cba4b772e76429616e))
- *(package)* Update `eslint`, `eslint-plugin-jsdoc` ([ae56bdf](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/ae56bdf5bcb7ae5dc05b63bc6c47c3844321cd33))
## [0.9.3](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.9.2..v0.9.3) - 2023-09-06
### ⛰️ Features
- *(commitlint)* Add commitlint to enforce commit message format ([b4e88ab](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/b4e88abf530bc2b96837b162b34950a97aa0a15a))
- *(changelog)* Update the changelog automatically on every commit ([7854211](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/785421117f498a062ee34ca2a17642628063cb37))
- *(popup)* Improve colors, refactor css, support rtl lang ([6c622b4](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/6c622b4ef0171b19c8911f9c3830b3c6e06b9748))
- *(linting)* Add `stylelint` and add check to lint script ([a4a0db7](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/a4a0db71c5e7ec86a49b19731e955d5fd662cbf5))
### 🐛 Bug Fixes
- Fix wrong icon
- *(linting)* Add newer version of `addon-linter` via override to support newer browser APIs ([9d524dd](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/9d524dde4d675aa3c41aa311f744fbecc563958f))
- Correctly update the changelog on release ([a4a122a](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/a4a122a8986e406c407b771769fce0579b23b5df))
## \[[0.3](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.3)] - 2019-10-04
### 🚜 Refactor
### ✳️ Other
- *(build)* Improve browser-polyfill inject ([8aa6db1](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/8aa6db1275ee5ed83aa4656f0391205b6d08b6b4))
- *(config)* Move homepage url to config ([f3d8199](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/f3d8199b97549da696e8428659b77538ac5ea426))
- *(storage)* Use `storage.session` instead of `storage.local` ([db0faab](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/db0faab4dbb8f5816d40f154c139eaddc04d71eb))
- Improve popup content
### 📚 Documentation
## \[[0.2](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.2)] - 2019-08-28
- *(readme)* Add logo and screenshot to readme ([dea1d1a](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/dea1d1a1e6d045b0552c8819ea6f55c489c71a69))
- *(readme)* Update quick-links ([0495e25](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/0495e25b80c5dd2971e045b2c18c1784527b462d))
- *(readme)* Change README title ([0fe1aaf](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/0fe1aaf189bfbf6924f1ba9846347fb073d752fe))
### 🎨 Styling
- Improve codestyle ([c760765](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/c7607652e9b94d86b510c9c7c2abddf5d68132a6))
### ⚙️ Miscellaneous Tasks
- *(package)* Update @commitlint/{cli,config-conventional} ([cd0b580](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/cd0b5805eb0d8255f86d7bd78cd71f31aa3a8446))
- *(package)* Update @commitlint/{cli,config-conventional} ([8c2bea5](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/8c2bea5fcca3370ed784b2e1963902d05fde6cc7))
- *(package)* Update @commitlint/{cli,config-conventional,cz-commitlint} ([333e0b8](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/333e0b8d8062cd18e9c7b6d2a5724d01db758f12))
- *(package)* Update @commitlint/{cli,config-conventional,cz-commitlint}, git-cliff ([918cf7d](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/918cf7db9196db82b035d35ba58b3c1f3d910b90))
## [0.9.2](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.9.1..v0.9.2) - 2023-05-24
### ⛰️ Features
- *(ci)* Add git-cliff to update the CHANGELOG.md ([4e17127](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/4e17127714d14aff0af1fe69f5ad7035c36895f6))
### 🐛 Bug Fixes
- Fix icon style
- Fix compatibility with chromium based browsers
- Fix typo
- *(js)* Replace deprecated substr() with substring() and add checks for promise results ([a193a69](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/a193a6923c2b37730c92d536a6d26a3c86e40425))
- *(git-cliff)* Fix markdown escaping in changelog ([2e79e02](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/2e79e02805520caec346d430dffc88884e146e03))
### 🚜 Refactor
- *(background)* Remove background.html and import directly as ES module ([7a707c9](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/7a707c9fb0a442c6f5834afcd69c866dce37495d))
- *(popup)* Remove "browser_style" setting and include cleaned up extension.css ([d2d9aa7](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/d2d9aa70caea4a77ce1f8b19858d8b98b7732a48))
### 📚 Documentation
- *(js)* Add type definitions for Calendar and SpaceApi ([848e1ab](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/848e1abee4339d5a52d3292b9a588baa9ea8e089))
- *(changelog)* Update changelog with new version ([df67e40](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/df67e402a77e97f89d796a15cf811472eace1505))
### ⚙️ Miscellaneous Tasks
- *(package)* Update husky ([9541d3e](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/9541d3ee4bd359fa5b45303e75b2075d0e8ffdc4))
- *(ci)* Improve CHANGELOG config ([25708ea](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/25708ea410080d5aeba30190f301d597e30e49c7))
- *(js)* Add .ts files editorconfig and fix styling ([ca37e15](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/ca37e153e1e3b0933c98098627795f71f5d8908e))
- *(package)* Update @types/firefox-webext-browser and add web-ext to devDependencies ([c396c74](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/c396c74d4ab2db879c2b689501f32dabf885a9a6))
- *(package)* Update @types/firefox-webext-browser and web-ext ([21ef55b](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/21ef55bb0e369ff2b6ff527fad6711698678c126))
- *(package)* Update web-ext ([8f2f805](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/8f2f8051a5ebbbb8a3796a0da811168dc9d255eb))
- *(package)* Update git-cliff ([4bb9a19](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/4bb9a19f7a71ae66b1ba9516bd460b113a1e2410))
- Unify and improve codestyle ([701ec4b](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/701ec4b226f4a8eafc4f6177f0a521ec472f1aea))
### ✳️ Other
- Init
- Add first readme
- Add LICENSE and improve README
- Add icons and improve styling
- Improve styling
- Use config
- Offen/Geschlossen-Info schön im Pop-Up
- Add space status change notification
- Small fix
- Make text over icon more readable
- Switch from GitLab to Gitea
- Missing change from Gitlab to Gitea
- Update browser-polyfill
- Add sections
- Add time element for event date
- Improve badge color
- Combine updateBadge promises
- Check for online/offline events if fetching should be enabled
- *(uncategorized)* Add pre-commit hook with husky ([bae19bf](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/bae19bff3c68524f64f8519bd6e60877536a755b))
- *(uncategorized)* Improve git-cliff config ([0d88ee7](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/0d88ee76e24f36deeb28e23e871f7358d800c738))
## [0.9.1](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.9.0..v0.9.1) - 2023-01-22
### ✳️ Other
- *(uncategorized)* Extract code into setBadgeStatus and createStatusChangedNotification function ([ad9abe3](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/ad9abe3c946088fecea7aea5844bf7f958907271))
- *(uncategorized)* Don't fetch data if offline ([82bcdef](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/82bcdef199bd5c0ec6c2359b710c10cdc41c553b))
- *(uncategorized)* Replace web-ext types package ([5ea42bc](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/5ea42bccb4d0d17d2c7a5e03af288adf7501c0e3))
- *(uncategorized)* Await init ([5682f23](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/5682f2322be007c3b1a72c72d53311f8fd4e7423))
- *(uncategorized)* Add link to Pad ([e985995](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/e985995ddd85e904b7c984de9d13bba64ba40b03))
## [0.9.0](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.8.7..v0.9.0) - 2023-01-20
### ✳️ Other
- *(uncategorized)* Manifest_v3 ([a389058](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/a3890589b3d176f663d7f3946962326abc1f9c66))
- *(uncategorized)* Update to manifest_version v3 ([c91e519](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/c91e519c0867d17c1a195b205fcb971c2c9b6b8f))
- *(uncategorized)* Make code compatible with manifest_version v3 ([74a0d57](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/74a0d577ee309145a03ada6162987fee36f3f0f6))
## [0.8.7](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.8.6..v0.8.7) - 2023-01-20
### ✳️ Other
- *(uncategorized)* Add badges to README ([7a25513](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/7a255136d2ffc50d23b7dc1fe7bb63bb735099ba))
- *(uncategorized)* Improve README ([5dc8680](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/5dc8680a09fb61033de2d09cdc48d34f215572b7))
- *(uncategorized)* Improve badges ([85fd3fd](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/85fd3fd86a85e16ae1ae6a9c61b13d2fe23bbca4))
- *(uncategorized)* Improve config ([f97b9a7](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/f97b9a7538922b989f20e56c76d1105d72d9ef4d))
- *(uncategorized)* Use globalThis instead of window to also work in service worker ([8202083](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/820208371032c7e410c0f2487ad608fca74ac9aa))
- *(uncategorized)* Remove unnecessary permissions ([05c6cb5](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/05c6cb5cfa551af2a4372bc817a2b81a932fc3d0))
- *(uncategorized)* Remove persistent flag in manifest config ([60c3675](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/60c367521ea0a486f6eaecb6ba8c59cf065fb4e4))
- *(uncategorized)* Open usrspace.at homepage on install ([c216676](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/c2166760842cfb96aca4c9872a6d114c3ed98fe4))
## [0.8.6](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.8.5..v0.8.6) - 2023-01-05
### ✳️ Other
- *(uncategorized)* Change addon id to currently used one ([f7e38cb](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/f7e38cbcc51d11ac96579b598dd3b7ec0e504535))
## [0.8.5](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.8.4..v0.8.5) - 2023-01-05
### ✳️ Other
- *(uncategorized)* Add web-ext-config.js and add watch scripts ([86b3b7e](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/86b3b7ef5ee6863a3e976e8352e6d03f25494e6a))
- *(uncategorized)* Improve README ([9740fc4](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/9740fc47a749fc1850476085d5a885138a5ad14d))
- *(uncategorized)* Add development docs ([b749f17](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/b749f17f3581f65532b835a2995312a2bdd0d0d6))
- *(uncategorized)* Inject browser-polyfill only in chromium builds ([ae0c2de](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/ae0c2ded1b73c5dbfa2c29d011b33ad718199c9c))
- *(uncategorized)* Add addon id ([5e4dd40](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/5e4dd40d0cf26c09c9f3ffa7ad3480376240a642))
## [0.8.4](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.8.3..v0.8.4) - 2023-01-05
### ✳️ Other
- *(uncategorized)* Use html template tag ([c07f823](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/c07f82322d7e89f5690b1bbda3fd298b59ed81de))
- *(uncategorized)* Change strict_min_version to v79 ([6c95aa9](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/6c95aa978e43a30f3325eac14b5af171aaba75fd))
- *(uncategorized)* Simplify updateSpaceApiJson ([859f9bc](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/859f9bce1990f101c66c6e4ab5a6041cd1bd75ca))
- *(uncategorized)* Add lint script ([c7dcd62](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/c7dcd6218b52f005965fe5417ef17c6f05033604))
## [0.8.3](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.8.2..v0.8.3) - 2023-01-04
### ✳️ Other
- *(uncategorized)* Update strict_min_version to 57.0 ([a5c4a0c](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/a5c4a0cf048fbbd857ce807a2b96ec22f0a4059e))
## [0.8.2](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.8.1..v0.8.2) - 2023-01-04
### ✳️ Other
- *(uncategorized)* Explicit set persistent=true and add browser_specific_settings in manifest.json ([4de8c9c](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/4de8c9c1cb71e5ed7d55616b42a79dbbb66bd29d))
- *(uncategorized)* Set html lang by browser language ([c2cc850](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/c2cc850e1f16c55d721e4e1d30cee28b656e7b16))
- *(uncategorized)* Improve popup styling ([d72359e](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/d72359e9a599fffcaa10f0bff6fc3bda41ada70e))
## [0.8.1](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.8.0..v0.8.1) - 2022-12-25
### 🐛 Bug Fixes
- Fix copy-version script ([67382ea](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/67382eadc0e9a07d5f95d5d62ff2b353cfe95199))
### ✳️ Other
- *(uncategorized)* Manifest l10n ([489d675](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/489d675ba80fb87b819ee26779a728c2c1b5d7bf))
- *(uncategorized)* Faster data fetching, badge improvements ([c3cf1e9](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/c3cf1e9b9690289bf12a9fdb79ca21f563ae8867))
- *(uncategorized)* Cursor pointer on clickable elements ([b41bf2b](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/b41bf2b183da3d26eef91a7eaf5c6161539bead0))
- *(uncategorized)* Move manifest and _locales into src ([a1cf58d](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/a1cf58d8d36e7710fccea1ad35a7d3fbc4fd02f0))
- *(uncategorized)* Update package-lock ([4f717f7](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/4f717f7c8057b72e7b4f026fcba17d5277d7802e))
- *(uncategorized)* Store data in localStorage ([fc2ad7a](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/fc2ad7afad7da64a0ad3ddd81b89941ddb395f21))
- *(uncategorized)* Use storage api ([6b69d7c](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/6b69d7cd6a0d5d442ca20adedb14409ccbe71c97))
- *(uncategorized)* Use browser.alarms api ([de70d42](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/de70d42b2b38a15488d038c3a560c8f09e913b78))
- *(uncategorized)* Unfiy codestyle ([cbf21a2](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/cbf21a24ade1087cd230841c9d01fe6b814cf8df))
- *(uncategorized)* Cleanup data on startup ([45c8deb](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/45c8deb007d9b809e985b57d2942f1d1357c1405))
## [0.8.0](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.7..v0.8.0) - 2022-12-24
### ✳️ Other
- *(uncategorized)* Improve code, doc, tooling ([863315d](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/863315d77c720f65cc81e7c0c8d3a40825413b1b))
- *(uncategorized)* Npm version scripts ([dc89ef4](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/dc89ef43b50762b738f6196e2456026ce0fac77d))
- *(uncategorized)* Copy browser-polyfill ([57d290c](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/57d290c744a473f7faa261aedc415d3d6a79df69))
- *(uncategorized)* Import config as module ([ea13c09](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/ea13c092896c8cf8fbe4f4154d9b148dd1c423ef))
- *(uncategorized)* Move code into src dir ([e3d6cce](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/e3d6cce769a7e456bad26ca630f6be01a329d173))
- *(uncategorized)* Add JsDoc and small code improvements ([0476519](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/0476519e996059223ff50e58e8ffeb0774e9c98f))
- *(uncategorized)* Add build script ([d898b1e](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/d898b1ea2a6efd6678b1f83b8aa00405c18c57af))
- *(uncategorized)* Improve code ([2f5e6ec](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/2f5e6ecdb1a0b515b54027937bf2b1afedf74947))
- *(uncategorized)* Remove old icons ([50d97a6](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/50d97a681e85901651006727d98bbe20b6ed1c91))
- *(uncategorized)* Add l10n ([241715e](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/241715e7accdf28472429e483592130afa523157))
- *(uncategorized)* Cleanup manifest.json ([7d36a61](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/7d36a610dc01bca0d619b39b0731c72b53cbc926))
- *(uncategorized)* Increase svg size ([e1fdc19](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/e1fdc193f5c6d90f077db90268eb109db112d7eb))
- *(uncategorized)* Set build filename ([27fe41e](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/27fe41e9b36bd687711287b2347ff29484bbb15e))
## [0.7](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.4..v0.7) - 2021-11-06
### 🐛 Bug Fixes
- Fix new urls ([31e4a33](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/31e4a3375aa530ebb0179315dd7e2886bce6b401))
- Fix dates if no date is found ([c63516d](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/c63516d96291936fa8739af4a4d5fb98c76cfc69))
- Fix data, remove logging, improve code ([52e0ea1](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/52e0ea105e24bd5d5f18a2c6277bc64460eb963a))
### ✳️ Other
- *(uncategorized)* Change spaceApiUrl and nextcloud label ([562d58b](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/562d58be71f6366b000852df90cd143f7a322cab))
- *(uncategorized)* Add release info ([1b26a0e](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/1b26a0e7af4acd2b638a335ba7ae49a70936880c))
- *(uncategorized)* Add editorconfig ([a025fc9](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/a025fc9d366d7ccb905a59bfbba11907bf2f82f5))
- *(uncategorized)* Reformat code ([cfc6e98](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/cfc6e98097ab4a43acbc4d5472c9b35aca4df724))
- *(uncategorized)* Add package.json for typescript type definitions ([dcdd759](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/dcdd759e9e0517c740f39ea3c014a4ff9ba2f3e4))
- *(uncategorized)* Use template strings ([71fbce2](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/71fbce24e9b92e672aeb4e7cb10994ccfc8d3ac5))
- *(uncategorized)* Format datetime ([7aaf0d9](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/7aaf0d9840b8fcff840b6cc3d2fe4b317e3d5045))
- *(uncategorized)* Change to normal function and use async/await ([05d2d25](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/05d2d257e24fba7124680ae91216a7dc3b7207c3))
- *(uncategorized)* Use css variables and prepare for dark mode support ([50a55ff](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/50a55ff68ba5671133eda42e66093f70186f3090))
- *(uncategorized)* Add Nunito font ([c252a26](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/c252a26c18d970100f9b6f6f32f9b4be33457b7b))
- *(uncategorized)* Change icons, enable darkmode, improve styling ([1aa2ff4](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/1aa2ff4a66c0f8404526e306627e470e6114050d))
- *(uncategorized)* Update license ([d180377](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/d1803778b7fd0855b4671a1f3326d7c2b9e5cfa9))
- *(uncategorized)* Change icon ([ab49fbd](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/ab49fbda15a9b4a9ffc160122c5f5b4c82c698fb))
- *(uncategorized)* Remove old html code and load right svg ([7b95172](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/7b9517297f5761f5394cae27ef58ca264731d03d))
## [0.4](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.3..v0.4) - 2019-10-04
### 🐛 Bug Fixes
- Fix wrong icon ([e50aeeb](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/e50aeeb47ecd8317925160ff055130df488fef93))
## [0.3](https://git.usrspace.at/XimeX/usrspace-browser-addon/compare/v0.2..v0.3) - 2019-10-04
### ✳️ Other
- *(uncategorized)* Improve popup content ([a195654](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/a195654b6bfcdefdcd4e046ecc1fa872e4d3a99e))
## [0.2](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.2) - 2019-08-28
### 🐛 Bug Fixes
- Fix icon style ([5f18a33](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/5f18a33c4c220b8e869272ae2f40761acb575ede))
- Fix compatibility with chromium based browsers ([e21dac9](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/e21dac9934c3989092077bee36d96d5aa0a02f4a))
- Fix typo ([e53b052](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/e53b0527df1d970667a5427dc612d464253d2967))
### ✳️ Other
- *(uncategorized)* Init ([956f82f](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/956f82f7443e9002081615c3068b46ac36a9c916))
- *(uncategorized)* Add first readme ([b84921f](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/b84921fd103175df1db2272d706199f2d45a6057))
- *(uncategorized)* Add LICENSE and improve README ([9381c48](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/9381c4851a45f7bb1cd696d8981ea7ec6d506bde))
- *(uncategorized)* Add icons and improve styling ([92c2e8f](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/92c2e8ffd607195b703e417abfd6b701b01d7683))
- *(uncategorized)* Improve styling ([8575efd](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/8575efd2c753d43fabc86455da618c5a9501b941))
- *(uncategorized)* Use config ([428c374](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/428c37496c7c0be23b00626562a445b9c4cb1f9c))
- *(uncategorized)* Offen/Geschlossen-Info schön im Pop-Up ([103167a](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/103167a6f1945b44782873a559157a18ed032515))
- *(uncategorized)* Add space status change notification ([213f413](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/213f4138ffbe23ec382c04c279a5f8271f0265eb))
- *(uncategorized)* Small fix ([d123a42](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/d123a42167be280fdbcfd3cf3234c53a797b9ec7))
- *(uncategorized)* Make text over icon more readable ([9b82800](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/9b828003d5684bee106beab7f9b16dfb0e437869))
- *(uncategorized)* Switch from GitLab to Gitea ([23391e0](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/23391e06ad78698c8542c6d33fb3256e0d7ebb4d))
- *(uncategorized)* Missing change from Gitlab to Gitea ([7260006](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/7260006db1fd595590055e18496c927a2e3ec789))
- *(uncategorized)* Update browser-polyfill ([a2d4832](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/a2d4832ce18c5f23f491c42b2d515eaeee0d66fd))
- *(uncategorized)* Add sections ([13219a7](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/13219a7f8e38b22ca8233a8ec13beb6e17364284))
- *(uncategorized)* Add time element for event date ([bcec944](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/bcec944781918febd7294b11a791ee7752f71d22))
- *(uncategorized)* Improve badge color ([d450b9e](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/d450b9ef228a4535c956f77abc15c334e13c47af))
- *(uncategorized)* Combine updateBadge promises ([5f3af74](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/5f3af74c078a057f9bf50d5e5d936d2dfb445f7b))
- *(uncategorized)* Check for online/offline events if fetching should be enabled ([944b99d](https://git.usrspace.at/XimeX/usrspace-browser-addon/commit/944b99d1add5800d247f0f4f1c14663e0420ea5c))
<!-- generated by git-cliff -->

View File

@ -1,4 +1,4 @@
# /usr/space Web-Extension (Firefox Add-on)
# /usr/space Web-Extension (Browser Add-on)
[![Mozilla Add-on](https://img.shields.io/amo/v/usr-space?style=for-the-badge)](https://addons.mozilla.org/de/firefox/addon/usr-space/)
[![Mozilla Add-on](https://img.shields.io/amo/dw/usr-space?style=for-the-badge)](https://addons.mozilla.org/de/firefox/addon/usr-space/)
@ -18,7 +18,7 @@
## Install
```ssh
$ git clone https://gitea.usrspace.at/XimeX/usrspace-browser-addon.git
$ git clone https://git.usrspace.at/XimeX/usrspace-browser-addon.git
# optional
$ npm i -g web-ext
$ npm i
@ -43,10 +43,7 @@ Example: `npm run watch:firefox-android -- --firefox-apk=org.mozilla.fenix --fir
## Build
```ssh
// For Firefox
$ npm run build:firefox
// For Chromium
$ npm run build:chromium
$ npm run build
```
## Release

View File

@ -12,26 +12,55 @@ header = """
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://tera.netlify.app/docs/
# https://keats.github.io/tera/docs/#introduction
body = """
{%- macro remote_url() -%}
https://git.usrspace.at/XimeX/usrspace-browser-addon
{%- endmacro -%}
{% macro print_commit(commit) -%}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | trim | upper_first }} \
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
{% endmacro -%}
{% if version %}\
## \\[[{{ version | trim_start_matches(pat="v") }}](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/{{ version }})] - {{ timestamp | date(format="%Y-%m-%d") }}
{% if previous.version %}\
## [{{ version | trim_start_matches(pat="v") }}]\
({{ self::remote_url() }}/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [{{ version | trim_start_matches(pat="v") }}]\
({{ self::remote_url() }}/releases/tag/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
{% endif %}\
{% else %}\
## \\[unreleased]
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}\n
{% for commit in commits %}\
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first | trim_end }}
{% endfor %}\
### {{ group | striptags | trim | upper_first }}
{% for commit in commits
| filter(attribute="scope") %}
{{ self::print_commit(commit=commit) }}
{%- endfor -%}
{% raw %}\n{% endraw %}\
{%- for commit in commits %}
{%- if not commit.scope -%}
{{ self::print_commit(commit=commit) }}
{% endif -%}
{% endfor -%}
{% endfor %}\n
"""
# remove the leading and trailing whitespace from the template
trim = true
# changelog footer
# template for the changelog footer
footer = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing whitespace from the templates
trim = true
# postprocessors
# postprocessors = [
# { pattern = '<REPO>', replace = "https://git.usrspace.at/XimeX/usrspace-browser-addon" }, # replace repository URL
# ]
[git]
# parse the commits based on https://www.conventionalcommits.org
@ -41,9 +70,9 @@ filter_unconventional = false
# process each line of a commit as an individual commit
split_commits = false
# regex for preprocessing the commit messages
commit_preprocessors = [
# { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/issues/${2}))" },
]
# commit_preprocessors = [
# { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))" },
# ]
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->⛰️ Features" },
@ -54,19 +83,23 @@ commit_parsers = [
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
{ message = "^[0-9]+.[0-9]+.[0-9]+", skip = true },
{ message = "^release v0.[0-9]", skip = true },
{ message = "^Merge branch ", skip = true },
{ message = "^chore\\(deps.*\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
{ message = ".*", group = "<!-- 9 -->✳️ Other", default_scope = "uncategorized" },
]
# protect breaking changes from being skipped due to matching a skipping commit_parser
protect_breaking_commits = false
# filter out the commits that are not matched by commit parsers
filter_commits = false
# glob pattern for matching git tags
tag_pattern = "v[0-9]*"
# regex for matching git tags
tag_pattern = "v[0-9].*"
# regex for skipping tags
skip_tags = ""
# regex for ignoring tags

View File

@ -1,3 +1,3 @@
module.exports = {
export default {
extends: ['@commitlint/config-conventional'],
};

31
dprint.jsonc Normal file
View File

@ -0,0 +1,31 @@
{
"typescript": {
"lineWidth": 128,
"quoteProps": "consistent",
"quoteStyle": "alwaysSingle",
"semiColons": "always",
"singleBodyPosition": "nextLine",
"useBraces": "always",
"useTabs": true,
"arrowFunction.useParentheses": "force",
"importDeclaration.sortNamedImports": "maintain"
},
"json": {
"trailingCommas": "maintain",
"useTabs": true
},
"markdown": {},
"toml": {
"useTabs": true
},
"excludes": [
"**/node_modules",
"**/*-lock.json"
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.89.3.wasm",
"https://plugins.dprint.dev/json-0.19.2.wasm",
"https://plugins.dprint.dev/markdown-0.16.4.wasm",
"https://plugins.dprint.dev/toml-0.6.1.wasm"
]
}

45
eslint.config.mjs Normal file
View File

@ -0,0 +1,45 @@
import globals from 'globals';
import js from '@eslint/js';
import unicorn from 'eslint-plugin-unicorn';
import jsdoc from 'eslint-plugin-jsdoc';
import noUnsanitized from 'eslint-plugin-no-unsanitized';
export default [
{
files: ['**/*.js'],
languageOptions: {
globals: {
...globals.browser,
...globals.commonjs,
...globals.webextensions,
},
},
plugins: {
unicorn,
jsdoc,
'no-unsanitized': noUnsanitized,
},
rules: {
// ### ESLint (https://eslint.org/docs/latest/rules/)
...js.configs.recommended.rules,
// ### Unicorn (https://github.com/sindresorhus/eslint-plugin-unicorn#rules)
...unicorn.configs.recommended.rules,
'unicorn/no-nested-ternary': 'off',
'unicorn/no-null': 'off',
'unicorn/prefer-module': 'off',
'unicorn/prevent-abbreviations': 'off',
// ### JSDoc (https://github.com/gajus/eslint-plugin-jsdoc/tree/main#user-content-eslint-plugin-jsdoc-rules)
...jsdoc.configs['flat/recommended-error'].rules,
'jsdoc/check-indentation': 'error',
'jsdoc/require-asterisk-prefix': 'error',
'jsdoc/require-jsdoc': ['error', { exemptEmptyFunctions: true }],
'jsdoc/require-param-description': 'off',
'jsdoc/require-returns-description': 'off',
// ### no-unsanitized (https://github.com/mozilla/eslint-plugin-no-unsanitized#rule-details)
...noUnsanitized.configs.DOM.rules,
},
},
];

3495
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,44 +1,47 @@
{
"name": "usrspace-browser-addon",
"description": "WebExtension for the Hacker-/Maker-Space /usr/space",
"version": "0.9.2",
"dependencies": {
"webextension-polyfill": "^0.10.0"
},
"version": "0.9.5",
"devDependencies": {
"@commitlint/cli": "^17.6.3",
"@commitlint/config-conventional": "^17.6.3",
"@commitlint/cz-commitlint": "^17.5.0",
"@types/firefox-webext-browser": "^111.0.1",
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.2",
"@commitlint/cz-commitlint": "^18.6.1",
"@types/firefox-webext-browser": "^120.0.2",
"commitizen": "^4.3.0",
"git-cliff": "^1.2.0",
"husky": "^8.0.3",
"web-ext": "^7.6.2"
"dprint": "^0.45.0",
"eslint": "^8.57.0",
"eslint-plugin-jsdoc": "^48.2.0",
"eslint-plugin-no-unsanitized": "^4.0.2",
"eslint-plugin-unicorn": "^51.0.1",
"git-cliff": "^2.1.2",
"husky": "^9.0.11",
"stylelint": "^16.2.1",
"stylelint-config-standard": "^36.0.0",
"stylelint-plugin-defensive-css": "^1.0.2",
"stylelint-plugin-logical-css": "^1.0.0",
"web-ext": "^7.11.0"
},
"scripts": {
"copy-browser-polyfill": "cp node_modules/webextension-polyfill/dist/browser-polyfill.js src/browser-polyfill.js",
"inject-browser-polyfill": "sed -i -r \"s#// \\[INJECT-BROWSER-POLYFILL]#import '\\./browser-polyfill\\.js';#\" src/*.js",
"uninject-browser-polyfill": "sed -i -r \"s#import '\\./browser-polyfill\\.js';#// \\[INJECT-BROWSER-POLYFILL]#\" src/*.js",
"copy-version": "sed -i 's/^\t\"version\": \".*\",$/\t\"version\": \"'$(rg '^\t\"version\": \"(.+)\",$' -r '$1' < package.json)'\",/' src/manifest.json",
"update-changelog": "npm exec git-cliff > CHANGELOG.md",
"lint": "web-ext lint -w",
"lint": "npm run lint:web-ext && npm run lint:js && npm run lint:css",
"lint:web-ext": "web-ext lint -w",
"lint:js": "eslint .",
"lint:css": "stylelint \"src/*.css\"",
"fmt": "dprint fmt",
"fmt:check": "dprint check",
"fmt:update": "dprint config update",
"test": "echo \"Error: no test specified\" && exit 0",
"watch:firefox": "web-ext run -t firefox-desktop",
"watch:firefox-android": "web-ext run -t firefox-android",
"watch:chromium": "web-ext run -t chromium",
"prebuild": "cp LICENSE.txt src/",
"prebuild:firefox": "npm run prebuild",
"prebuild:chromium": "npm run prebuild && npm run inject-browser-polyfill",
"build:firefox": "web-ext build -i browser-polyfill.js",
"build:chromium": "web-ext build",
"build": "web-ext build",
"postbuild": "rm src/LICENSE.txt",
"postbuild:firefox": "npm run postbuild",
"postbuild:chromium": "npm run postbuild && npm run uninject-browser-polyfill",
"postinstall": "npm run copy-browser-polyfill",
"preversion": "npm run lint && npm test",
"preversion": "npm run fmt:check && npm run lint && npm test",
"version": "npm run copy-version && npm run update-changelog && git add CHANGELOG.md src/manifest.json",
"postversion": "npm run build:firefox",
"prepare": "husky install",
"postversion": "npm run build",
"prepare": "husky",
"commit": "git-cz"
},
"config": {
@ -48,7 +51,7 @@
},
"repository": {
"type": "git",
"url": "https://gitea.usrspace.at/XimeX/usrspace-browser-addon"
"url": "https://git.usrspace.at/XimeX/usrspace-browser-addon"
},
"keywords": [
"/usr/space"

View File

@ -1,16 +1,19 @@
import { REFRESH_TIMEOUT, API_URLS, BADGE_COLORS } from './config.js';
// [INJECT-BROWSER-POLYFILL]
import { REFRESH_TIMEOUT, HOMEPAGE, API_URLS, BADGE_COLORS } from './config.js';
globalThis.browser ??= chrome;
browser.runtime.onInstalled.addListener(async (details) => {
init();
if (details.reason === 'install') {
await browser.tabs.create({
url: 'https://www.usrspace.at/',
url: HOMEPAGE,
});
}
});
browser.runtime.onStartup.addListener(async () => {
await browser.storage.local.remove(['calendar', 'spaceApi']);
browser.runtime.onStartup.addListener(() => {
init();
});
browser.alarms.onAlarm.addListener((alarm) => {
@ -19,32 +22,26 @@ browser.alarms.onAlarm.addListener((alarm) => {
}
});
/**
* @param {string} url
* @returns {Promise<any>}
*/
async function fetchJson(url) {
const response = await fetch(url);
return response.json();
}
/**
* @param {number} days
* @returns {Promise<import("../types").Calendar>}
*/
function fetchCalendar(days = 28) {
let url = `${API_URLS.calender}?o=json`;
async function fetchCalendar(days = 28) {
const params = new URLSearchParams();
params.set('o', 'json');
if (days) {
url += `&r=${days}`;
params.set('r', `${days}`);
}
return fetchJson(url);
const response = await fetch(`${API_URLS.calender}?${params.toString()}`);
return response.json();
}
/**
* @returns {Promise<import("../types").SpaceApi>}
*/
function fetchSpaceApi() {
return fetchJson(API_URLS.spaceApi);
async function fetchSpaceApi() {
const response = await fetch(API_URLS.spaceApi);
return response.json();
}
async function fetchNewData() {
@ -68,13 +65,13 @@ async function fetchNewData() {
/**
* @type {import("../types").Storage}
*/
const { spaceApi } = await browser.storage.local.get('spaceApi');
const { spaceApi } = await browser.storage.session.get('spaceApi');
if (spaceApi && spaceApi.state.open !== spaceApiJson.state.open) {
await createStatusChangedNotification(spaceApiJson.state.open);
}
}
await browser.storage.local.set({
await browser.storage.session.set({
calendar: calendarJson,
spaceApi: spaceApiJson,
});

View File

@ -1,5 +1,7 @@
export const REFRESH_TIMEOUT = 5;
export const HOMEPAGE = 'https://www.usrspace.at/';
export const API_URLS = {
spaceApi: 'https://www.usrspace.at/spaceapi.json',
calender: 'https://www.usrspace.at/calendar.php',
@ -24,7 +26,7 @@ export const QUICK_LINKS = [
},
{
iconTemplateId: 'template-icon-git',
url: 'https://gitea.usrspace.at/',
url: 'https://git.usrspace.at/',
text: 'Git',
},
{

View File

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* stylelint-disable */
/* Global */
html,
body {

View File

@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "0.9.2",
"version": "0.9.5",
"icons": {
"48": "icons/favicon.svg",
"96": "icons/favicon.svg"
@ -18,13 +18,9 @@
"default_popup": "popup.html"
},
"default_locale": "de",
"permissions": [
"alarms",
"notifications",
"storage"
],
"permissions": ["alarms", "notifications", "storage"],
"author": "Thomas Rupprecht",
"homepage_url": "https://gitea.usrspace.at/XimeX/usrspace-browser-addon",
"homepage_url": "https://git.usrspace.at/XimeX/usrspace-browser-addon",
"developer": {
"name": "Thomas Rupprecht",
"url": "https://blog.ximex.at/"
@ -32,7 +28,7 @@
"browser_specific_settings": {
"gecko": {
"id": "{c9a907ad-a047-4cf6-8b5d-95097d31aa5b}",
"strict_min_version": "112.0"
"strict_min_version": "115.0"
}
}
}

View File

@ -1,15 +1,19 @@
@import url('extension.css') layer(extension);
@font-face {
font-family: 'Nunito Sans';
font-style: normal;
font-weight: normal;
src: url('font/Nunito-Regular.ttf') format('truetype');
}
@font-face {
font-family: 'Nunito Sans';
font-style: normal;
font-weight: bold;
src: url('font/Nunito-Bold.ttf') format('truetype');
}
@font-face {
font-family: 'Nunito Sans';
font-style: italic;
@ -20,45 +24,57 @@
:root {
--light-blue: #2aa1bf;
--dark-blue: #095c81;
--light-color: #0c0c0c;
--dark-color: #ffffff;
--light-background: #f9f9f9;
--dark-background: #4a4a4a;
--light-code-background: #ebebeb;
--dark-code-background: #383838;
--light-color: #15141a;
--dark-color: #fbfbfe;
--light-background: #ffffff;
--dark-background: #42414d;
--light-code-background: #f0f0f4;
--dark-code-background: #2b2a33;
--color: var(--light-color);
--background: var(--light-background);
--code-background: var(--light-code-background);
}
@media (prefers-color-scheme: dark) {
:root {
--color: var(--dark-color);
--background: var(--dark-background);
--code-background: var(--dark-code-background);
}
}
body {
width: 360px;
inline-size: 360px;
padding: 6px 12px;
color: var(--light-color);
background-color: var(--light-background);
font-family: 'Nunito Sans';
}
@media (prefers-color-scheme: dark) {
body {
color: var(--dark-color);
background-color: var(--dark-background);
}
color: var(--color);
background-color: var(--background);
font-family: 'Nunito Sans', sans-serif;
}
section.no-padding {
margin: 0 -12px -6px;
}
h2 {
margin: 6px 0 4px;
}
summary {
margin: 6px 12px 6px;
margin: 6px 12px;
cursor: pointer;
}
summary > h2 {
margin: 0;
display: inline-block;
}
time {
font-style: italic;
}
svg {
vertical-align: text-bottom;
}
@ -66,11 +82,13 @@ svg {
.panel-section-list {
margin: 0 -12px;
}
.panel-list-item > .icon {
text-align: center;
width: 23px;
margin-right: 4px;
inline-size: 23px;
margin-inline-end: 4px;
}
.link {
cursor: pointer;
}
@ -78,29 +96,29 @@ svg {
#state > svg,
#calendar > .calendar-entry > svg,
#calendar > .calendar-entry strong {
margin-right: 8px;
margin-inline-end: 8px;
}
#calendar > .calendar-entry {
#calendar > .calendar-entry,
#calendar > .calendar-entry > div > div {
display: flex;
}
#calendar address {
display: inline;
}
#space-api {
margin: 0;
padding: 0 8px;
height: 122px;
overflow-x: hidden;
overflow-y: scroll;
background-color: var(--light-code-background);
}
@media (prefers-color-scheme: dark) {
#space-api {
background-color: var(--dark-code-background);
}
padding: 4px 8px 8px;
block-size: 159px;
overflow-block: scroll;
scrollbar-gutter: stable;
background-color: var(--code-background);
}
#space-api code {
font-family: monospace;
font-size: 10px;
white-space: break-spaces;
}

View File

@ -3,7 +3,6 @@
<head>
<meta charset="utf-8" />
<title>/usr/space</title>
<link rel="stylesheet" href="extension.css" />
<link rel="stylesheet" href="popup.css" />
<template id="template-icon-closed">
@ -71,7 +70,11 @@
</div>
</template>
<template id="template-calendar-entry-location">
<div>(<address></address>)</div>
<div>
(
<address></address>
)
</div>
</template>
</head>
<body>

View File

@ -1,28 +1,57 @@
import { QUICK_LINKS } from './config.js';
// [INJECT-BROWSER-POLYFILL]
globalThis.browser ??= chrome;
const dateTimeFormat = Intl.DateTimeFormat([], { dateStyle: 'medium', timeStyle: 'short' });
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', async () => {
await init();
});
} else {
await init();
}
async function init() {
setL10n();
setLinks();
/**
* @type {import("../types").Storage}
*/
const { calendar, spaceApi } = await browser.storage.session.get(['calendar', 'spaceApi']);
if (calendar) {
updateNextEvent(calendar);
}
if (spaceApi) {
updateSpaceApiJson(spaceApi);
updateState(spaceApi);
}
}
function setL10n() {
document.querySelector('html').setAttribute('lang', browser.i18n.getUILanguage());
const loadingText = browser.i18n.getMessage('loading');
document.getElementById('state').textContent = loadingText;
document.getElementById('calendar').textContent = loadingText;
document.querySelector('#state').textContent = loadingText;
document.querySelector('#calendar').textContent = loadingText;
document.querySelector('#space-api > code').textContent = loadingText;
document.getElementById('currentState').textContent = browser.i18n.getMessage('currentState');
document.getElementById('links').textContent = browser.i18n.getMessage('links');
document.getElementById('nextEvent').textContent = browser.i18n.getMessage('nextEvent');
document.getElementById('spaceApiJson').textContent = browser.i18n.getMessage('spaceApiJson');
document.querySelector('#currentState').textContent = browser.i18n.getMessage('currentState');
document.querySelector('#links').textContent = browser.i18n.getMessage('links');
document.querySelector('#nextEvent').textContent = browser.i18n.getMessage('nextEvent');
document.querySelector('#spaceApiJson').textContent = browser.i18n.getMessage('spaceApiJson');
}
function setLinks() {
const listElement = document.getElementById('link-list');
const listElement = document.querySelector('#link-list');
QUICK_LINKS.forEach((quickLink) => {
for (const quickLink of QUICK_LINKS) {
const template = getCleanTemplateById('template-link-item');
template.querySelector('.link').dataset.url = quickLink.url;
const linkElement = template.querySelector('.link');
linkElement.dataset.url = quickLink.url;
linkElement.addEventListener('click', linkElementClickListener);
const svgIcon = getCleanTemplateById(quickLink.iconTemplateId);
svgIcon.querySelector('svg').setAttribute('aria-label', quickLink.text);
@ -31,7 +60,7 @@ function setLinks() {
template.querySelector('.text').textContent = quickLink.text;
listElement.append(template);
});
}
}
/**
@ -45,70 +74,54 @@ async function linkElementClickListener(event) {
}
}
async function init() {
setL10n();
setLinks();
const linkElements = Array.from(document.getElementsByClassName('link'));
linkElements.forEach((linkElement) => {
linkElement.addEventListener('click', linkElementClickListener);
});
/**
* @type {import("../types").Storage}
*/
const { calendar, spaceApi } = await browser.storage.local.get(['calendar', 'spaceApi']);
if (calendar) {
updateNextEvent(calendar);
}
if (spaceApi) {
updateSpaceApiJson(spaceApi);
updateState(spaceApi);
}
}
await init();
/**
* @param {import("../types").Calendar} nextEvents
*/
function updateNextEvent(nextEvents) {
const calendarElement = document.getElementById('calendar');
calendarElement.innerText = '';
const calendarElement = document.querySelector('#calendar');
calendarElement.textContent = '';
if (nextEvents.length === 0) {
const strongElement = document.createElement('strong');
strongElement.textContent = browser.i18n.getMessage('noEventsInNext4Weeks');
calendarElement.append(strongElement);
} else {
const nextEventDate = nextEvents[0].begin.substring(0, 10);
const nextEventDate = nextEvents[0].begin.slice(0, 10);
const nextEventDateEvents = nextEvents.filter((nextEvent) => (nextEvent.begin.startsWith(nextEventDate)));
nextEventDateEvents.forEach((nextEventDateEvent) => {
const calendarEntryElement = getCleanTemplateById('template-calendar-entry');
calendarEntryElement.querySelector('svg').setAttribute('aria-label', browser.i18n.getMessage('event'));
calendarEntryElement.querySelector('strong').textContent = nextEventDateEvent.name;
const timeElement = calendarEntryElement.querySelector('time');
const beginDate = new Date(nextEventDateEvent.begin);
timeElement.dateTime = beginDate.toISOString();
timeElement.textContent = dateTimeFormat.format(beginDate);
if (nextEventDateEvent.location) {
const locationElement = getCleanTemplateById('template-calendar-entry-location');
locationElement.querySelector('address').textContent = nextEventDateEvent.location;
calendarEntryElement.querySelector('.calendar-entry > div').append(locationElement);
}
calendarElement.append(calendarEntryElement);
});
for (const nextEventDateEvent of nextEventDateEvents) {
calendarElement.append(buildCalendarEntryElement(nextEventDateEvent));
}
}
}
/**
* @param {import("../types").CalendarEntry} nextEventDateEvent
* @returns {DocumentFragment}
*/
function buildCalendarEntryElement(nextEventDateEvent) {
const calendarEntryElement = getCleanTemplateById('template-calendar-entry');
calendarEntryElement.querySelector('svg').setAttribute('aria-label', browser.i18n.getMessage('event'));
calendarEntryElement.querySelector('strong').textContent = nextEventDateEvent.name;
const timeElement = calendarEntryElement.querySelector('time');
const beginDate = new Date(nextEventDateEvent.begin);
timeElement.dateTime = beginDate.toISOString();
timeElement.textContent = dateTimeFormat.format(beginDate);
if (nextEventDateEvent.location) {
const locationElement = getCleanTemplateById('template-calendar-entry-location');
locationElement.querySelector('address').textContent = nextEventDateEvent.location;
calendarEntryElement.querySelector('.calendar-entry > div').append(locationElement);
}
return calendarEntryElement;
}
/**
* @param {import("../types").SpaceApi} spaceApi
*/
@ -136,8 +149,8 @@ function updateState(spaceApi) {
timeElement.dateTime = since.toISOString();
timeElement.textContent = dateTimeFormat.format(since);
const stateElement = document.getElementById('state');
stateElement.innerText = '';
const stateElement = document.querySelector('#state');
stateElement.textContent = '';
stateElement.append(stateElements);
}
@ -146,11 +159,11 @@ function updateState(spaceApi) {
* @returns {DocumentFragment}
*/
function getCleanTemplateById(templateId) {
const template = document.getElementById(templateId).content.cloneNode(true);
const template = document.querySelector(`#${templateId}`).content.cloneNode(true);
if (template.hasChildNodes()) {
for (const childNode of template.childNodes) {
if (childNode.nodeType !== Node.ELEMENT_NODE) {
template.removeChild(childNode);
childNode.remove();
}
}
}

27
stylelint.config.mjs Normal file
View File

@ -0,0 +1,27 @@
export default {
extends: ['stylelint-config-standard'],
plugins: ['stylelint-plugin-defensive-css', 'stylelint-plugin-logical-css'],
rules: {
'custom-property-empty-line-before': null,
'color-hex-length': 'long',
'plugin/use-defensive-css': [true, {
'accidental-hover': false,
'background-repeat': true,
'custom-property-fallbacks': false,
'flex-wrapping': false,
'scroll-chaining': false,
'scrollbar-gutter': true,
'vendor-prefix-grouping': true,
}],
'plugin/use-logical-properties-and-values': [true, {
'severity': 'warning',
'disable-auto-fix': true,
'ignore': ['overflow-y', 'overflow-x'],
}],
'plugin/use-logical-units': [true, {
'severity': 'warning',
'disable-auto-fix': true,
'ignore': ['dvh', 'dvw'],
}],
},
};

26
types.d.ts vendored
View File

@ -3,17 +3,17 @@ export type Storage = {
spaceApi?: SpaceApi | undefined;
};
export type Calendar = CalendarEntry[];
type CalendarEntry = {
begin: string;
begin_date: `${number}.${number}.${number}`;
begin_time: `${number}:${number}`;
end: string;
end_date: `${number}.${number}.${number}`;
end_time: `${number}:${number}`;
name: string;
description: string | null;
location: string | null;
export type Calendar = readonly CalendarEntry[];
export type CalendarEntry = {
readonly begin: string;
readonly begin_date: `${number}.${number}.${number}`;
readonly begin_time: `${number}:${number}`;
readonly end: string;
readonly end_date: `${number}.${number}.${number}`;
readonly end_time: `${number}:${number}`;
readonly name: string;
readonly description: string | null;
readonly location: string | null;
};
/**
@ -219,7 +219,7 @@ export interface SpaceApi {
*/
matrix?: string;
[k: string]: unknown;
}[]
}[],
];
/**
* URL of the IRC channel
@ -833,7 +833,7 @@ export interface SpaceApi {
*/
description?: string;
[k: string]: unknown;
}[]
}[],
];
[k: string]: unknown;
};