diff --git a/.github/scripts/run-firefox.sh b/.github/scripts/run-firefox.sh index fd9ac6b..95aa809 100644 --- a/.github/scripts/run-firefox.sh +++ b/.github/scripts/run-firefox.sh @@ -1,32 +1,3 @@ #!/usr/bin/env bash -setup() { - # Ensure files to move exist - if [ ! -f manifest-v2.json ] || [ ! -f manifest.json ]; then - echo "manifest-v2.json or manifest.json was not found. Please run this script from the root of the extension." - exit 1 - fi - # Copy the v2 manifest to use instead of the v3 manifest - mv manifest.json manifest-v3.json && mv manifest-v2.json manifest.json - # Run cleanup in case of Ctrl+C - trap cleanup SIGINT -} - -cleanup() { - # Ensure files to move exist - if [ ! -f manifest-v3.json ] || [ ! -f manifest.json ]; then - echo "manifest-v3.json or manifest.json was not found. Please run this script from the root of the extension." - exit 1 - fi - # Copy the v3 manifest back to the v2 manifest - mv manifest.json manifest-v2.json && mv manifest-v3.json manifest.json -} - -run() { - # Run extension in Firefox development mode - web-ext run -} - -setup -run -cleanup +web-ext run diff --git a/.github/scripts/sign-firefox.sh b/.github/scripts/sign-firefox.sh index a9ecfa9..2cc1b7c 100644 --- a/.github/scripts/sign-firefox.sh +++ b/.github/scripts/sign-firefox.sh @@ -1,32 +1,3 @@ #!/usr/bin/env bash -setup() { - # Ensure files to move exist - if [ ! -f manifest-v2.json ] || [ ! -f manifest.json ]; then - echo "manifest-v2.json or manifest.json was not found. Please run this script from the root of the extension." - exit 1 - fi - # Copy the v2 manifest to use instead of the v3 manifest - mv manifest.json manifest-v3.json && mv manifest-v2.json manifest.json - # Run cleanup in case of Ctrl+C - trap cleanup SIGINT -} - -cleanup() { - # Ensure files to move exist - if [ ! -f manifest-v3.json ] || [ ! -f manifest.json ]; then - echo "manifest-v3.json or manifest.json was not found. Please run this script from the root of the extension." - exit 1 - fi - # Copy the v3 manifest back to the v2 manifest - mv manifest.json manifest-v2.json && mv manifest-v3.json manifest.json -} - -sign() { - # Sign the Firefox extension - web-ext sign --api-key=$JWT_USER --api-secret=$JWT_SECRET -} - -setup -sign -cleanup +web-ext sign --api-key=$JWT_USER --api-secret=$JWT_SECRET diff --git a/manifest-v2.json b/manifest-v2.json deleted file mode 100644 index e32e20c..0000000 --- a/manifest-v2.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "manifest_version": 2, - "name": "Unedit and Undelete for Reddit", - "description": "Show original comments and posts from before they were edited or removed", - "version": "3.16.2", - "content_scripts": [ - { - "run_at": "document_idle", - "matches": [ - "*://*.reddit.com/", - "*://*.reddit.com/me/f/*", - "*://*.reddit.com/message/*", - "*://*.reddit.com/r/*", - "*://*.reddit.com/user/*" - ], - "exclude_matches": [ - "*://*.reddit.com/*/about/banned*", - "*://*.reddit.com/*/about/contributors*", - "*://*.reddit.com/*/about/edit*", - "*://*.reddit.com/*/about/flair*", - "*://*.reddit.com/*/about/log*", - "*://*.reddit.com/*/about/moderators*", - "*://*.reddit.com/*/about/muted*", - "*://*.reddit.com/*/about/rules*", - "*://*.reddit.com/*/about/stylesheet*", - "*://*.reddit.com/*/about/traffic*", - "*://*.reddit.com/*/wiki/*", - "*://mod.reddit.com/*" - ], - "js": ["vendor/showdown.min.js", "script.js"] - } - ], - "web_accessible_resources": ["vendor/showdown.min.js.map"], - "page_action": { - "default_icon": "images/logo64.png", - "default_title": "Unedit and Undelete for Reddit" - }, - "icons": { - "16": "images/logo16.png", - "32": "images/logo32.png", - "48": "images/logo48.png", - "128": "images/logo128.png" - }, - "permissions": ["*://*.pushshift.io/*"] -} diff --git a/manifest.json b/manifest.json index d0fef61..4046439 100644 --- a/manifest.json +++ b/manifest.json @@ -45,6 +45,5 @@ "32": "images/logo32.png", "48": "images/logo48.png", "128": "images/logo128.png" - }, - "host_permissions": ["https://api.pushshift.io/reddit/search/*"] + } }