mirror of
https://github.com/thedevs-network/kutt-extension.git
synced 2026-02-03 05:43:24 +00:00
refactor: remove opera from build
This commit is contained in:
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -51,12 +51,6 @@ jobs:
|
||||
name: firefox-extension
|
||||
path: extension/firefox.xpi
|
||||
|
||||
- name: Upload Opera extension artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: opera-extension
|
||||
path: extension/opera.crx
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
- `npm run dev:chrome`
|
||||
- Firefox
|
||||
- `npm run dev:firefox`
|
||||
- Opera
|
||||
- `npm run dev:opera`
|
||||
|
||||
(Reload Extension Manually in the browser)
|
||||
|
||||
@@ -36,13 +34,6 @@
|
||||
|
||||
<img width="400" src="https://i.imgur.com/aAL5dQg.png" />
|
||||
|
||||
- ### Opera
|
||||
|
||||
- Load the extension via `opera:extensions`
|
||||
- Check the `Developer Mode` and load as unpacked from extension’s extracted directory.
|
||||
|
||||
<img width="400" src="https://i.imgur.com/qUwfSNJ.png" />
|
||||
|
||||
- Generate an API Key from <a href="https://kutt.it">`https://kutt.it/`</a> (Settings page)
|
||||
- Paste and Save the `Key` in extension's `options page`.
|
||||
|
||||
@@ -63,12 +54,3 @@ height="50">](https://github.com/thedevs-network/kutt-extension/releases)
|
||||
- **Enable Developer Options** to use with self-hosted kutt
|
||||
- Save the self hosted domain in the input (eg: https://mykutt.it)
|
||||
- **Note**: the api endpoint is automatically appended during the api call.
|
||||
|
||||
### For Opera Users
|
||||
|
||||
In order to install this extension from Chrome Web Store, another opera extension called **Install Chrome Extension** should be installed first.
|
||||
|
||||
- [Opera addon :: Install Chrome Extension](https://addons.opera.com/en/extensions/details/install-chrome-extensions/)
|
||||
- [Opera addon :: Kutt](https://chrome.google.com/webstore/detail/kutt/pklakpjfiegjacoppcodencchehlfnpd)
|
||||
|
||||

|
||||
|
||||
@@ -45,15 +45,14 @@
|
||||
|
||||
This extension uses **Manifest V3**.
|
||||
|
||||
| [](https://chrome.google.com/webstore/detail/kutt/pklakpjfiegjacoppcodencchehlfnpd) | [](https://addons.mozilla.org/firefox/addon/kutt/) | [](CONTRIBUTING.md#for-opera-users) | [](https://chrome.google.com/webstore/detail/kutt/pklakpjfiegjacoppcodencchehlfnpd) | [](https://chrome.google.com/webstore/detail/kutt/pklakpjfiegjacoppcodencchehlfnpd) |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| 88+ | 109+ | 74+ | 88+ (Chromium) | Latest (Chromium) |
|
||||
| [](https://chrome.google.com/webstore/detail/kutt/pklakpjfiegjacoppcodencchehlfnpd) | [](https://addons.mozilla.org/firefox/addon/kutt/) | [](https://chrome.google.com/webstore/detail/kutt/pklakpjfiegjacoppcodencchehlfnpd) | [](https://chrome.google.com/webstore/detail/kutt/pklakpjfiegjacoppcodencchehlfnpd) | [](https://chrome.google.com/webstore/detail/kutt/pklakpjfiegjacoppcodencchehlfnpd) |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| 88+ | 109+ | 74+ | 88+ | 1.21+ |
|
||||
|
||||
## Installation
|
||||
|
||||
- **Chrome**: [Kutt :: Chrome Web Store](https://chrome.google.com/webstore/detail/kutt/pklakpjfiegjacoppcodencchehlfnpd)
|
||||
- **Firefox**: [Kutt :: Add-ons for Firefox](https://addons.mozilla.org/firefox/addon/kutt/)
|
||||
- **Opera**: [Kutt :: Opera addons](CONTRIBUTING.md#for-opera-users)
|
||||
- **Edge**: [Kutt :: Chrome Web Store](https://chrome.google.com/webstore/detail/kutt/pklakpjfiegjacoppcodencchehlfnpd)
|
||||
|
||||
## How to Use
|
||||
|
||||
@@ -16,11 +16,9 @@
|
||||
"scripts": {
|
||||
"dev:chrome": "cross-env TARGET_BROWSER=chrome vite build --config vite.config.ts --mode development --watch",
|
||||
"dev:firefox": "cross-env TARGET_BROWSER=firefox vite build --config vite.config.ts --mode development --watch",
|
||||
"dev:opera": "cross-env TARGET_BROWSER=opera vite build --config vite.config.ts --mode development --watch",
|
||||
"build:chrome": "cross-env TARGET_BROWSER=chrome vite build --config vite.config.ts",
|
||||
"build:firefox": "cross-env TARGET_BROWSER=firefox vite build --config vite.config.ts",
|
||||
"build:opera": "cross-env TARGET_BROWSER=opera vite build --config vite.config.ts",
|
||||
"build": "npm run build:chrome && npm run build:firefox && npm run build:opera",
|
||||
"build": "npm run build:chrome && npm run build:firefox",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix"
|
||||
},
|
||||
|
||||
2
source/globals.d.ts
vendored
2
source/globals.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
declare const __DEV__: boolean;
|
||||
declare const __TARGET_BROWSER__: 'chrome' | 'firefox' | 'opera';
|
||||
declare const __TARGET_BROWSER__: 'chrome' | 'firefox';
|
||||
|
||||
declare module '*.module.scss' {
|
||||
const classes: {readonly [key: string]: string};
|
||||
|
||||
@@ -18,9 +18,6 @@
|
||||
}
|
||||
},
|
||||
"__chrome|firefox__author": "abhijithvijayan",
|
||||
"__opera__developer": {
|
||||
"name": "abhijithvijayan"
|
||||
},
|
||||
"action": {
|
||||
"default_popup": "Popup/popup.html",
|
||||
"default_icon": {
|
||||
@@ -32,13 +29,12 @@
|
||||
"default_title": "Shorten this URL"
|
||||
},
|
||||
"background": {
|
||||
"__chrome|opera__service_worker": "assets/js/background.bundle.js",
|
||||
"__chrome|opera__type": "module",
|
||||
"__chrome__service_worker": "assets/js/background.bundle.js",
|
||||
"__chrome__type": "module",
|
||||
"__firefox__scripts": ["assets/js/background.bundle.js"],
|
||||
"__firefox__type": "module"
|
||||
},
|
||||
"__chrome__minimum_chrome_version": "88",
|
||||
"__opera__minimum_opera_version": "74",
|
||||
"permissions": [
|
||||
"activeTab",
|
||||
"storage"
|
||||
@@ -50,7 +46,7 @@
|
||||
"content_security_policy": {
|
||||
"extension_pages": "script-src 'self'; object-src 'self';"
|
||||
},
|
||||
"__chrome|opera__options_page": "Options/options.html",
|
||||
"__chrome__options_page": "Options/options.html",
|
||||
"options_ui": {
|
||||
"page": "Options/options.html",
|
||||
"open_in_tab": true
|
||||
|
||||
@@ -16,10 +16,6 @@ export default defineConfig(({mode}) => {
|
||||
|
||||
const getExtensionZipFileName = () => {
|
||||
switch (targetBrowser) {
|
||||
case 'opera': {
|
||||
return `${targetBrowser}.crx`;
|
||||
}
|
||||
|
||||
case 'firefox': {
|
||||
return `${targetBrowser}.xpi`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user