From 5ab73dccab7f7777b9d5a4de2a92d97dd9001ecd Mon Sep 17 00:00:00 2001 From: yudax42 Date: Fri, 17 Dec 2021 04:39:12 +0100 Subject: [PATCH] automate build --- .gitignore | 1 + build.sh | 18 ++++++++++++++++++ js/content.js | 2 +- manifest-firefox.json | 37 ------------------------------------- manifest.json | 2 -- themes | 2 +- 6 files changed, 21 insertions(+), 41 deletions(-) create mode 100755 build.sh delete mode 100644 manifest-firefox.json diff --git a/.gitignore b/.gitignore index f9d5b78..b01cc5f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ themes +build \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..450fe69 --- /dev/null +++ b/build.sh @@ -0,0 +1,18 @@ +#!/bin/sh + + + +# Copy neccesary files +mkdir ext +cp -r ./assets ./icons ./js ./background.js ./options.html ./popup.html ./manifest.json ./ext + +cd ext +# Generate Firefox .xpi +7z a -r build/firefox.xpi * + +# Generate Chrome .crx +7z a -r build/chrome.zip * + +# delete uneccesary files +mv build ../ +rm -rf ../ext \ No newline at end of file diff --git a/js/content.js b/js/content.js index 22a6718..d319b60 100644 --- a/js/content.js +++ b/js/content.js @@ -33,7 +33,7 @@ const getTheme = async () => { if (path && name && style) { const global = await sendMessage({ query: "getTheme", - url: `${BASE_URL}/${style}/global.min.css?random=${Math.random()}`, + url: `${BASE_URL}/${style}/global.css?random=${Math.random()}`, }); const theme = await sendMessage({ query: "getTheme", diff --git a/manifest-firefox.json b/manifest-firefox.json deleted file mode 100644 index 81c8c03..0000000 --- a/manifest-firefox.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "manifest_version": 2, - "name": "notionthemes", - "version": "0.0.1", - "description": "Beautiful themes for Notion Web.", - "permissions": ["storage", "https://notionthemes.netlify.app/"], - "icons": { - "16": "icons/16.png", - "48": "icons/48.png", - "128": "icons/128.png" - }, - "background": { - "scripts": ["background.js"] - }, - "content_scripts": [ - { - "matches": ["https://www.notion.so/*"], - "js": ["js/content.js"] - } - ], - "browser_action": { - "default_popup": "popup.html", - "default_icon": { - "19": "icons/16.png", - "38": "icons/48.png" - } - }, - "options_ui": { - "page": "options.html", - "open_in_tab": true - }, - "applications": { - "gecko": { - "id": "notionthemes@notionthemes" - } - } -} diff --git a/manifest.json b/manifest.json index f12f752..2dc14d2 100644 --- a/manifest.json +++ b/manifest.json @@ -28,8 +28,6 @@ }, "options_ui": { "page": "options.html", - "browser_style": true, - "chrome_style": true, "open_in_tab": true } } diff --git a/themes b/themes index 4040d0f..9bd502a 160000 --- a/themes +++ b/themes @@ -1 +1 @@ -Subproject commit 4040d0fd3858c9da4ed4e9dd22194ddbe838e9ab +Subproject commit 9bd502acd2f105b0738d20401798a78dbb74b46b