Skip to content

Update Dependencies #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
"sourceType": "module"
},
"rules": {
"no-empty": "off",
"no-extra-semi": "off",
"no-func-assign": "off",
"no-undef": "off",
"no-unused-vars": "off"
"no-undef": "off"
}
}
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Release Version Check"
if: ${{ github.event_name == 'release' }}
Expand All @@ -25,17 +25,17 @@ jobs:
fi

- name: "Setup Node"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

- name: "Build All"
run: |
npm install
npm run build

- name: "Upload to Actions"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifacts
path: web-ext-artifacts/
Expand Down
39 changes: 19 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ All **Chromium** Based Browsers can install the extension from the

# Features

* Patch or Play ROM's from the Popup
* Patch or Play ROM's by Right-clicking Links

Please submit a [Feature Request](https://github.com/cssnr/smwc-web-extension/discussions/new?category=feature-requests) for new features.
For any issues, bugs or concerns; please [Open an Issue](https://github.com/cssnr/smwc-web-extension/issues/new).

Expand All @@ -48,22 +51,31 @@ You can pin the Addon by clicking the `Puzzle Piece`, find the SMWC Web Extensio

**Quick Start**

To install and run chrome or firefox with web-ext.
First, clone (or download) this repository and change into the directory.

Second, install the dependencies:
```shell
npm isntall
```

Finally, to run Chrome or Firefox with web-ext, run one of the following:
```shell
npm run chrome
npm run firefox
```

To Load Unpacked/Temporary Add-on make a `manifest.json` and run from the [src](src) folder.
Additionally, to Load Unpacked/Temporary Add-on make a `manifest.json` and run from the [src](src) folder, run one of the following:
```shell
npm run manifest:chrome
npm run manifest:firefox
```

Chrome: [https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world#load-unpacked](https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world#load-unpacked)
Firefox: [https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/](https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/)

For more information on web-ext, [read this documentation](https://extensionworkshop.com/documentation/develop/web-ext-command-reference/).
To pass additional arguments to an `npm run` command, use `--`.
Example: `npm run chrome -- --chromium-binary=...`
Example: `npm run chrome -- --chromium-binary=...`

## Building

Expand All @@ -73,25 +85,17 @@ See [gulpfile.js](gulpfile.js) for more information on `postinstall`.
npm install
```

To load unpacked or temporary addon from the [src](src) folder, you must generate the `src/manifest.json` for the desired browser.
```shell
npm run manifest:chrome
npm run manifest:firefox
```

If you would like to create a `.zip` archive of the [src](src) directory for the desired browser.
To create a `.zip` archive of the [src](src) directory for the desired browser run one of the following:
```shell
npm run build
npm run build:chrome
npm run build:firefox
```

For more information on building, see the scripts in the [package.json](package.json) file.
For more information on building, see the scripts section in the [package.json](package.json) file.

## Chrome Setup

To install for production: https://chromewebstore.google.com/detail/smwc-web-extension/foalfafgmnglcgpgkhhmcfhjgmdcjide

1. Build or Download a [Release](https://github.com/cssnr/smwc-web-extension/releases).
1. Unzip the archive, place the folder where it must remain and note its location for later.
1. Open Chrome, click the `3 dots` in the top right, click `Extensions`, click `Manage Extensions`.
Expand All @@ -100,19 +104,14 @@ To install for production: https://chromewebstore.google.com/detail/smwc-web-ext

## Firefox Setup

To install for production: https://addons.mozilla.org/addon/smwc-web-extension

Note: Firefox Temporary addon's will **not** remain after restarting Firefox, therefore;
it is very useful to keep addon storage after uninstall/restart with `keepStorageOnUninstall`.

1. Build or Download a [Release](https://github.com/cssnr/smwc-web-extension/releases).
1. Unzip the archive, place the folder where it must remain and note its location for later.
1. Go to `about:debugging#/runtime/this-firefox` and click `Load Temporary Add-on...`
1. Navigate to the folder you extracted earlier, select `manifest.json` then click `Select File`.
1. Open `about:config` search for `extensions.webextensions.keepStorageOnUninstall` and set to `true`.

If you need to test a build or browser restart, you must pack the addon.
This only works in ESR, Development, or Nightly.
If you need to test a restart, you must pack the addon. This only works in ESR, Development, or Nightly.
You may also use an Unbranded Build: [https://wiki.mozilla.org/Add-ons/Extension_Signing#Unbranded_Builds](https://wiki.mozilla.org/Add-ons/Extension_Signing#Unbranded_Builds)

1. Run `npm run build:firefox` then use `web-ext-artifacts/{name}-firefox-{version}.zip`.
1. Open `about:config` search for `xpinstall.signatures.required` and set to `false`.
Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "SMWC Web Extension",
"description": "SMWC.world Web Extension and Browser Addon to Easily Patch and Play SMW ROMs.",
"description": "SMWC.world Web Extension and Browser Addon to Easily Patch and Play SMW ROMs Online.",
"homepage_url": "https://smwc.world",
"author": "Shane",
"version": "0.1.2",
"version": "0.1.3",
"manifest_version": 3,
"commands": {
"_execute_action": {
Expand Down
Loading