Compare commits

...

4 commits

Author SHA1 Message Date
Thomas Rupprecht 39b69904ac 0.8.4 2023-01-05 14:39:04 +01:00
Thomas Rupprecht c7dcd6218b add lint script 2023-01-05 14:37:59 +01:00
Thomas Rupprecht 859f9bce19 simplify updateSpaceApiJson 2023-01-05 14:29:15 +01:00
Thomas Rupprecht 6c95aa978e change strict_min_version to v79 2023-01-05 14:11:22 +01:00
4 changed files with 8 additions and 13 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "usrspace-browser-addon",
"version": "0.8.3",
"version": "0.8.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "usrspace-browser-addon",
"version": "0.8.3",
"version": "0.8.4",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {

View file

@ -1,7 +1,7 @@
{
"name": "usrspace-browser-addon",
"description": "WebExtension for the Hacker-/Maker-Space /usr/space",
"version": "0.8.3",
"version": "0.8.4",
"dependencies": {
"webextension-polyfill": "^0.10.0"
},
@ -11,12 +11,13 @@
"scripts": {
"copy-browser-polyfill": "cp node_modules/webextension-polyfill/dist/browser-polyfill.js src/browser-polyfill.js",
"copy-version": "sed -i 's/^\t\"version\": \".*\",$/\t\"version\": \"'$(rg '^\t\"version\": \"(.+)\",$' -r '$1' < package.json)'\",/' src/manifest.json",
"lint": "web-ext lint -w -s src/",
"prebuild": "cp LICENSE.txt src/",
"build": "web-ext build -o -s src/ -n \"_usr_space-{version}.zip\"",
"postbuild": "rm src/LICENSE.txt",
"test": "echo \"Error: no test specified\" && exit 0",
"postinstall": "npm run copy-browser-polyfill",
"preversion": "npm test",
"preversion": "npm run lint && npm test",
"version": "npm run copy-version && git add -u",
"postversion": "npm run build"
},

View file

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "0.8.3",
"version": "0.8.4",
"icons": {
"48": "icons/favicon.svg",
"96": "icons/favicon.svg"
@ -34,7 +34,7 @@
},
"browser_specific_settings": {
"gecko": {
"strict_min_version": "57.0"
"strict_min_version": "79.0"
}
}
}

View file

@ -109,14 +109,8 @@ function updateNextEvent(nextEvents) {
* @param {object} spaceApi
*/
function updateSpaceApiJson(spaceApi) {
const json = JSON.stringify(spaceApi, null, 2)
.replace(/ /g, '&nbsp;')
.replace(/\n/g, '<br/>');
const spaceApiElement = document.querySelector('#space-api > code');
spaceApiElement.innerHTML = json;
// const jsonNode = document.createTextNode(json);
// spaceApiElement.innerText = '';
// spaceApiElement.append(jsonNode);
spaceApiElement.textContent = JSON.stringify(spaceApi, null, 2);
}
/**