diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 81877a1..8e953e5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -84,23 +84,3 @@ jobs: client-id: ${{ secrets.EDGE_CLIENT_ID }} client-secret: ${{ secrets.EDGE_CLIENT_SECRET }} access-token-url: ${{ secrets.EDGE_ACCESS_TOKEN_URL }} - - - name: Replace manifest - run: pnpm build:replaceForFirefox ${{ vars.FF_ID }} - - - name: Build extension - run: pnpm build - - - name: Zip the build - run: | - cd build - zip -r ../buildFF.zip . - cd .. - - - name: Firefox upload & release - uses: cardinalby/webext-buildtools-firefox-addons-action@1.0.9 - with: - zipFilePath: buildFF.zip - extensionId: ${{ vars.FF_ID }} - jwtIssuer: ${{ secrets.FF_JWT_ISSUER }} - jwtSecret: ${{ secrets.FF_JWT_SECRET }} diff --git a/build-scripts/replaceForFirefox.cjs b/build-scripts/replaceForFirefox.cjs deleted file mode 100644 index 981456d..0000000 --- a/build-scripts/replaceForFirefox.cjs +++ /dev/null @@ -1,45 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -// replaceForFirefox.cjs -const fs = require('fs'); -const path = require('path'); - -const manifestPath = path.resolve(__dirname, '../static/manifest.json'); - -const args = process.argv.slice(2); -const geckoId = args[0]; - -if (!geckoId) { - console.error('Gecko ID is not provided as an argument.'); - process.exit(1); -} - -fs.readFile(manifestPath, 'utf8', (err, data) => { - if (err) { - console.error('Error reading the manifest file:', err); - return; - } - - const manifest = JSON.parse(data); - const updatedManifest = { - ...manifest, - background: { - scripts: ['scripts/background.js'], - type: 'module' - }, - browser_specific_settings: { - ...manifest.browser_specific_settings, - gecko: { - id: geckoId - } - } - }; - - fs.writeFile(manifestPath, JSON.stringify(updatedManifest, null, 2), 'utf8', (err) => { - if (err) { - console.error('Error writing the manifest file:', err); - return; - } - - console.log('Manifest file updated successfully.'); - }); -}); diff --git a/holo-key-manager-js-client/README.md b/holo-key-manager-js-client/README.md index d9c3b38..6b0b558 100644 --- a/holo-key-manager-js-client/README.md +++ b/holo-key-manager-js-client/README.md @@ -8,7 +8,6 @@ To fully utilize the Holo Key Manager JS Client, you need to install the Holo Ke - [Chrome](https://chrome.google.com/webstore/detail/holo-key-manager/eggfhkdnfdhdpmkfpihjjbnncgmhihce) - [Edge](https://microsoftedge.microsoft.com/addons/detail/jfecdgefjljjfcflgbhgfkbeofjenceh) -- [Mozilla](https://addons.mozilla.org/en-US/firefox/addon/holo-key-manager/) ## Installation and Usage diff --git a/holo-key-manager-js-client/prebuild.cjs b/holo-key-manager-js-client/prebuild.cjs index 3f40d61..4d745aa 100644 --- a/holo-key-manager-js-client/prebuild.cjs +++ b/holo-key-manager-js-client/prebuild.cjs @@ -8,7 +8,6 @@ const path = require('path'); const generateConfigContent = () => ` export const browserConfig = { ChromeID: '${process.env.CHROME_ID}', - FirefoxID: '${process.env.FF_ID}', EdgeID: '${process.env.EDGE_ID}' }; `; diff --git a/holo-key-manager-js-client/src/helpers.ts b/holo-key-manager-js-client/src/helpers.ts index 60a3524..0ed4fd4 100644 --- a/holo-key-manager-js-client/src/helpers.ts +++ b/holo-key-manager-js-client/src/helpers.ts @@ -5,8 +5,6 @@ import { browserConfig } from './browserConfig'; const getBrowserId = () => { if (navigator.userAgent.indexOf('Chrome') !== -1) { return browserConfig.ChromeID; - } else if (navigator.userAgent.indexOf('Firefox') !== -1) { - return browserConfig.FirefoxID; } else if (navigator.userAgent.indexOf('Edge') !== -1) { return browserConfig.EdgeID; } diff --git a/package.json b/package.json index 90acd0f..117368c 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "build:script": "tsc --p scripts/tsconfig.json", "build:removeExport": "node build-scripts/removeExportFromScript.cjs", "build:removeInline": "node build-scripts/removeInlineScript.cjs", - "build:replaceForFirefox": "node build-scripts/replaceForFirefox.cjs", "preview": "vite preview", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",