Compare commits
5 commits
333e0b8d80
...
b0a2a4321e
Author | SHA1 | Date | |
---|---|---|---|
b0a2a4321e | |||
9d524dde4d | |||
a4a0db71c5 | |||
db0faab4db | |||
918cf7db91 |
26
.stylelintrc.cjs
Normal file
26
.stylelintrc.cjs
Normal file
|
@ -0,0 +1,26 @@
|
|||
module.exports = {
|
||||
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,
|
||||
"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"]
|
||||
}]
|
||||
}
|
||||
};
|
|
@ -9,15 +9,18 @@ All notable changes to this project will be documented in this file.
|
|||
- Add commitlint to enforce commit message format
|
||||
- Update the changelog automatically on every commit
|
||||
- Improve colors, refactor css, support rtl lang
|
||||
- Add `stylelint` and add check to lint script
|
||||
|
||||
### 🐛 Bug Fixes
|
||||
|
||||
- Correctly update the changelog on release
|
||||
- Add newer version of `addon-linter` via override to support newer browser APIs
|
||||
|
||||
### 🚜 Refactor
|
||||
|
||||
- Improve browser-polyfill inject
|
||||
- Move homepage url to config
|
||||
- Use `storage.session` instead of `storage.local`
|
||||
|
||||
### 📚 Documentation
|
||||
|
||||
|
@ -33,6 +36,8 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
- Update @commitlint/{cli,config-conventional}
|
||||
- Update @commitlint/{cli,config-conventional}
|
||||
- Update @commitlint/{cli,config-conventional,cz-commitlint}
|
||||
- Update @commitlint/{cli,config-conventional,cz-commitlint}, git-cliff
|
||||
|
||||
## \[[0.9.2](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.9.2)] - 2023-05-24
|
||||
|
||||
|
|
1747
package-lock.json
generated
1747
package-lock.json
generated
File diff suppressed because it is too large
Load diff
23
package.json
23
package.json
|
@ -1,27 +1,38 @@
|
|||
{
|
||||
"name": "usrspace-browser-addon",
|
||||
"description": "WebExtension for the Hacker-/Maker-Space /usr/space",
|
||||
"version": "0.9.2",
|
||||
"version": "0.9.3",
|
||||
"dependencies": {
|
||||
"webextension-polyfill": "^0.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^17.6.7",
|
||||
"@commitlint/config-conventional": "^17.6.7",
|
||||
"@commitlint/cz-commitlint": "^17.6.7",
|
||||
"@commitlint/cli": "^17.7.1",
|
||||
"@commitlint/config-conventional": "^17.7.0",
|
||||
"@commitlint/cz-commitlint": "^17.7.1",
|
||||
"@types/firefox-webext-browser": "^111.0.1",
|
||||
"commitizen": "^4.3.0",
|
||||
"git-cliff": "^1.2.0",
|
||||
"git-cliff": "^1.3.0",
|
||||
"husky": "^8.0.3",
|
||||
"stylelint": "^15.10.3",
|
||||
"stylelint-config-standard": "^34.0.0",
|
||||
"stylelint-plugin-defensive-css": "^0.8.1",
|
||||
"stylelint-plugin-logical-css": "^0.13.2",
|
||||
"web-ext": "^7.6.2"
|
||||
},
|
||||
"overrides": {
|
||||
"web-ext@^7.6.2": {
|
||||
"addons-linter": "^6.12.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:css",
|
||||
"lint:web-ext": "web-ext lint -w",
|
||||
"lint:css": "stylelint \"src/*.css\"",
|
||||
"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",
|
||||
|
|
|
@ -9,10 +9,6 @@ browser.runtime.onInstalled.addListener(async (details) => {
|
|||
}
|
||||
});
|
||||
|
||||
browser.runtime.onStartup.addListener(async () => {
|
||||
await browser.storage.local.remove(['calendar', 'spaceApi']);
|
||||
});
|
||||
|
||||
browser.alarms.onAlarm.addListener((alarm) => {
|
||||
if (alarm.name === 'fetchData') {
|
||||
fetchNewData();
|
||||
|
@ -68,13 +64,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,
|
||||
});
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"manifest_version": 3,
|
||||
"name": "__MSG_extensionName__",
|
||||
"description": "__MSG_extensionDescription__",
|
||||
"version": "0.9.2",
|
||||
"version": "0.9.3",
|
||||
"icons": {
|
||||
"48": "icons/favicon.svg",
|
||||
"96": "icons/favicon.svg"
|
||||
|
@ -28,7 +28,7 @@
|
|||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "{c9a907ad-a047-4cf6-8b5d-95097d31aa5b}",
|
||||
"strict_min_version": "112.0"
|
||||
"strict_min_version": "115.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ body {
|
|||
padding: 6px 12px;
|
||||
color: var(--color);
|
||||
background-color: var(--background);
|
||||
font-family: 'Nunito Sans';
|
||||
font-family: 'Nunito Sans', sans-serif;
|
||||
}
|
||||
|
||||
section.no-padding {
|
||||
|
|
|
@ -57,7 +57,7 @@ async function init() {
|
|||
/**
|
||||
* @type {import("../types").Storage}
|
||||
*/
|
||||
const { calendar, spaceApi } = await browser.storage.local.get(['calendar', 'spaceApi']);
|
||||
const { calendar, spaceApi } = await browser.storage.session.get(['calendar', 'spaceApi']);
|
||||
|
||||
if (calendar) {
|
||||
updateNextEvent(calendar);
|
||||
|
|
Loading…
Reference in a new issue