From e3d6cce769a7e456bad26ca630f6be01a329d173 Mon Sep 17 00:00:00 2001 From: Thomas Rupprecht Date: Sat, 24 Dec 2022 13:37:50 +0100 Subject: [PATCH] move code into src dir --- .editorconfig | 2 +- .gitignore | 2 +- background/index.html | 9 --------- icons/favicon.svg | 23 ----------------------- icons/logo-outline.svg | 12 ------------ icons/logo.svg | 12 ------------ manifest.json | 14 +++++++------- package.json | 2 +- src/background.html | 9 +++++++++ background/index.js => src/background.js | 2 +- config.js => src/config.js | 0 {popup => src}/font/Nunito-Bold.ttf | Bin {popup => src}/font/Nunito-Italic.ttf | Bin {popup => src}/font/Nunito-Regular.ttf | Bin {popup => src}/font/OFL.txt | 0 src/icons/favicon.svg | 23 +++++++++++++++++++++++ {icons => src/icons}/logo-19.png | Bin {icons => src/icons}/logo-38.png | Bin {icons => src/icons}/logo-48.png | Bin {icons => src/icons}/logo-96.png | Bin src/icons/logo-outline.svg | 12 ++++++++++++ {icons => src/icons}/logo.png | Bin src/icons/logo.svg | 12 ++++++++++++ popup/index.css => src/popup.css | 0 popup/index.html => src/popup.html | 6 +++--- popup/index.js => src/popup.js | 0 26 files changed, 70 insertions(+), 70 deletions(-) delete mode 100644 background/index.html delete mode 100644 icons/favicon.svg delete mode 100644 icons/logo-outline.svg delete mode 100644 icons/logo.svg create mode 100644 src/background.html rename background/index.js => src/background.js (98%) rename config.js => src/config.js (100%) rename {popup => src}/font/Nunito-Bold.ttf (100%) rename {popup => src}/font/Nunito-Italic.ttf (100%) rename {popup => src}/font/Nunito-Regular.ttf (100%) rename {popup => src}/font/OFL.txt (100%) create mode 100644 src/icons/favicon.svg rename {icons => src/icons}/logo-19.png (100%) rename {icons => src/icons}/logo-38.png (100%) rename {icons => src/icons}/logo-48.png (100%) rename {icons => src/icons}/logo-96.png (100%) create mode 100644 src/icons/logo-outline.svg rename {icons => src/icons}/logo.png (100%) create mode 100644 src/icons/logo.svg rename popup/index.css => src/popup.css (100%) rename popup/index.html => src/popup.html (95%) rename popup/index.js => src/popup.js (100%) diff --git a/.editorconfig b/.editorconfig index af777b2..50d72c8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,7 +3,7 @@ # top-most EditorConfig file root = true -[*.{html,css,js,json}] +[*.{html,css,js,json,svg}] indent_style = tab indent_size = 2 end_of_line = lf diff --git a/.gitignore b/.gitignore index 2068390..3929abd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ /web-ext-artifacts -browser-polyfill.js +src/browser-polyfill.js diff --git a/background/index.html b/background/index.html deleted file mode 100644 index d2cf982..0000000 --- a/background/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - /usr/space - - - - diff --git a/icons/favicon.svg b/icons/favicon.svg deleted file mode 100644 index c312918..0000000 --- a/icons/favicon.svg +++ /dev/null @@ -1,23 +0,0 @@ - - /usr/space - Logo /usr/space - - - - - - - - - - - diff --git a/icons/logo-outline.svg b/icons/logo-outline.svg deleted file mode 100644 index 72a0d22..0000000 --- a/icons/logo-outline.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - /usr/space - Kernel - HW - - diff --git a/icons/logo.svg b/icons/logo.svg deleted file mode 100644 index ca3ff89..0000000 --- a/icons/logo.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - /usr/space - Kernel - HW - - diff --git a/manifest.json b/manifest.json index 57398df..678c1d0 100644 --- a/manifest.json +++ b/manifest.json @@ -4,23 +4,23 @@ "version": "0.7.0", "description": "WebExtension for the Hacker-/Maker-Space /usr/space", "icons": { - "48": "icons/favicon.svg", - "96": "icons/favicon.svg" + "48": "src/icons/favicon.svg", + "96": "src/icons/favicon.svg" }, "background": { - "page": "background/index.html" + "page": "src/background.html" }, "browser_action": { "browser_style": true, //"chrome_style": true, "default_title": "/usr/space", - //"default_icon": "icons/favicon.svg", + //"default_icon": "src/icons/favicon.svg", "default_icon": { - "16": "icons/favicon.svg", - "32": "icons/favicon.svg" + "16": "src/icons/favicon.svg", + "32": "src/icons/favicon.svg" }, "default_area": "navbar", - "default_popup": "popup/index.html" + "default_popup": "src/popup.html" }, "permissions": [ "https://www.usrspace.at/*", diff --git a/package.json b/package.json index 2fb756b..b06568a 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "web-ext-types": "^3.2.1" }, "scripts": { - "copy-browser-polyfill": "cp node_modules/webextension-polyfill/dist/browser-polyfill.js browser-polyfill.js", + "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)'\",/' manifest.json", "test": "echo \"Error: no test specified\" && exit 0", "postinstall": "npm run copy-browser-polyfill", diff --git a/src/background.html b/src/background.html new file mode 100644 index 0000000..9a30290 --- /dev/null +++ b/src/background.html @@ -0,0 +1,9 @@ + + + + + /usr/space + + + + diff --git a/background/index.js b/src/background.js similarity index 98% rename from background/index.js rename to src/background.js index c5cabbd..00a4f6f 100644 --- a/background/index.js +++ b/src/background.js @@ -1,4 +1,4 @@ -import Config from "../config.js"; +import Config from "./config.js"; function fetchJson(url) { return fetch(url).then((response) => (response.json())); diff --git a/config.js b/src/config.js similarity index 100% rename from config.js rename to src/config.js diff --git a/popup/font/Nunito-Bold.ttf b/src/font/Nunito-Bold.ttf similarity index 100% rename from popup/font/Nunito-Bold.ttf rename to src/font/Nunito-Bold.ttf diff --git a/popup/font/Nunito-Italic.ttf b/src/font/Nunito-Italic.ttf similarity index 100% rename from popup/font/Nunito-Italic.ttf rename to src/font/Nunito-Italic.ttf diff --git a/popup/font/Nunito-Regular.ttf b/src/font/Nunito-Regular.ttf similarity index 100% rename from popup/font/Nunito-Regular.ttf rename to src/font/Nunito-Regular.ttf diff --git a/popup/font/OFL.txt b/src/font/OFL.txt similarity index 100% rename from popup/font/OFL.txt rename to src/font/OFL.txt diff --git a/src/icons/favicon.svg b/src/icons/favicon.svg new file mode 100644 index 0000000..0e86ef6 --- /dev/null +++ b/src/icons/favicon.svg @@ -0,0 +1,23 @@ + + /usr/space + Logo /usr/space + + + + + + + + + + + diff --git a/icons/logo-19.png b/src/icons/logo-19.png similarity index 100% rename from icons/logo-19.png rename to src/icons/logo-19.png diff --git a/icons/logo-38.png b/src/icons/logo-38.png similarity index 100% rename from icons/logo-38.png rename to src/icons/logo-38.png diff --git a/icons/logo-48.png b/src/icons/logo-48.png similarity index 100% rename from icons/logo-48.png rename to src/icons/logo-48.png diff --git a/icons/logo-96.png b/src/icons/logo-96.png similarity index 100% rename from icons/logo-96.png rename to src/icons/logo-96.png diff --git a/src/icons/logo-outline.svg b/src/icons/logo-outline.svg new file mode 100644 index 0000000..44828df --- /dev/null +++ b/src/icons/logo-outline.svg @@ -0,0 +1,12 @@ + + + + + + + + /usr/space + Kernel + HW + + diff --git a/icons/logo.png b/src/icons/logo.png similarity index 100% rename from icons/logo.png rename to src/icons/logo.png diff --git a/src/icons/logo.svg b/src/icons/logo.svg new file mode 100644 index 0000000..5956ba4 --- /dev/null +++ b/src/icons/logo.svg @@ -0,0 +1,12 @@ + + + + + + + + /usr/space + Kernel + HW + + diff --git a/popup/index.css b/src/popup.css similarity index 100% rename from popup/index.css rename to src/popup.css diff --git a/popup/index.html b/src/popup.html similarity index 95% rename from popup/index.html rename to src/popup.html index 55796a8..808cbac 100644 --- a/popup/index.html +++ b/src/popup.html @@ -3,7 +3,7 @@ /usr/space - +
@@ -63,7 +63,7 @@
- - + + diff --git a/popup/index.js b/src/popup.js similarity index 100% rename from popup/index.js rename to src/popup.js