Skip to content

Commit

Permalink
Initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
auroris committed Dec 3, 2023
1 parent 9747519 commit 3a36d62
Show file tree
Hide file tree
Showing 17 changed files with 1,093 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"globals": {
"browser": "readonly"
},
"env": {
"browser": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest"
},
"rules": {
}
}
50 changes: 50 additions & 0 deletions .github/workflows/package-extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Package and Release Firefox Extension

on:
push:
branches:
- main # Adjust this as per your main branch
workflow_dispatch:

jobs:
build-and-release:
runs-on: ubuntu-latest

steps:
- name: Set up Git User
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14' # Set your Node.js version

- name: Install Dependencies
run: npm install

- name: Lint with ESLint
run: npx eslint .

- name: Get Version
id: get_version
run: echo "VERSION=$(jq -r .version manifest.json)" >> $GITHUB_ENV

- name: Package Extension
run: |
cd src
zip -Z deflate ../ImageConverter-${{ env.VERSION }}.zip manifest.json background.js content-script.js icons/icon-48.png icons/icon-96.png
- name: Create and Upload Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: "v${{ env.VERSION }}"
prerelease: false
title: "Release v${{ env.VERSION }}"
files: |
ImageConverter-${{ env.VERSION }}.zip
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# ImageConverter Extension

## Introduction

ImageConverter is a browser extension that enables users to right-click on any image on a webpage and save it in a different format (JPG or PNG). It's designed to make image conversion straightforward and efficient, directly within your browser.

### Key Features and Privacy Assurance

- **Ease of Use**: Easily convert images by right-clicking and selecting the desired format for instant conversion and download.
- **Privacy-Focused**: ImageConverter does not read, process, or store any personal data beyond what is necessary for image conversion.
- **No External Server Interaction**: All image processing is done locally within your browser. The extension does not communicate with any remote servers for its functionality.
- **Required Permissions**:
- `"contextMenus"` to integrate with the browser's context menu.
- `"activeTab"` to access the current tab when you interact with the extension.
- `"<all_urls>"` to allow image manipulation regardless of the source website, necessary to bypass CORS (Cross-Origin Resource Sharing) restrictions. This permission is essential for the extension to access and convert images from any website.

We are committed to user privacy and security. The extension requires the `"<all_urls>"` permission strictly for accessing images across different websites for conversion purposes. It does not use this permission to access or collect your browsing data.

## Installation

### From Firefox Add-ons Store

1. Visit the ImageConverter page on the [Firefox Add-ons store](https://addons.mozilla.org/firefox/addon/image-converter/).
2. Click "Add to Firefox" to install the extension.

## Usage

After installing ImageConverter, simply right-click on any image in your browser and select "Save Image As...". You will then see options to save the image as either JPG or PNG. Choose your desired format, and the image will be converted and downloaded to your computer.

## Contributing

Contributions to ImageConverter are welcome! If you have ideas for improvement or have found a bug, please open an issue or submit a pull request.

### Development Setup

To set up the development environment for ImageConverter:

1. Clone the repository: `git clone https://github.com/your-username/imageconverter.git`
2. Navigate to the project directory: `cd imageconverter`
3. Make your changes in the code.

### Testing Changes

1. Open Firefox and navigate to `about:debugging`.
2. Click "Load Temporary Add-on" and select the `manifest.json` file from your project directory.
3. Test your changes in the browser.

## License

ImageConverter is released under the MIT License.
Loading

0 comments on commit 3a36d62

Please sign in to comment.