Skip to content

Commit

Permalink
Move Firefox to Manifest v3 API and remove special support for Opera (#…
Browse files Browse the repository at this point in the history
…156)

* Remove special support for Firefox (now supports manifest v3) and opera

* Updated readme

* Use promise version of manifest v3 now

* Fix history empty on Firefox

* Add changelog

---------

Co-authored-by: Simon Heimler <[email protected]>
  • Loading branch information
Fannon and Simon Heimler authored Jan 21, 2025
1 parent c5fd973 commit a647c6d
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 150 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## [unreleased]

## [v1.11.0]

- **IMPROVED**: Firefox build is now using the browser extension Manifest v3, like Chrome or Edge.
- **REMOVED**: Removed special build for Firefox, using Manifest v2.
- **REMOVED**: Removed special build for Opera (they did not apply updates to the extension in their store anyway).

## [v1.10.4]

- **IMPROVED**: Performance of initial load
Expand Down
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
## Installation via Store

- [Chrome Extension](https://chrome.google.com/webstore/detail/tabs-bookmark-and-history/cofpegcepiccpobikjoddpmmocficdjj?hl=en-GB&authuser=0)
- [Firefox Addon](https://addons.mozilla.org/en-US/firefox/addon/search-tabs-bookmarks-history/)
- [Microsoft Edge Addon](https://microsoftedge.microsoft.com/addons/detail/search-tabs-bookmarks-an/ldmbegkendnchhjppahaadhhakgfbfpo)
- [Opera Addon](https://addons.opera.com/en/extensions/details/search-bookmarks-history-and-tabs/)
- [Firefox Addon](https://addons.mozilla.org/en-US/firefox/addon/search-tabs-bookmarks-history/)
- [Opera Addon](https://addons.opera.com/en/extensions/details/search-bookmarks-history-and-tabs/) (only an old version)

## Features

Expand Down Expand Up @@ -175,7 +175,7 @@ This extension is built to respect your privacy:

### Install and Build

Prerequisite: [Node.js](https://nodejs.org/en/)
Prerequisite: [Node.js](https://nodejs.org/en/) and use of bash shell.

```sh
# install dependencies
Expand All @@ -187,11 +187,7 @@ npm run build

The source code for the extension can be found in [popup/](popup/) (HTML, CSS, JS and libs).

The built extensions can be found

- [dist/chrome/](dist/chrome/) for Google Chrome and Microsoft Edge
- [dist/firefox/](dist/firefox/) for Firefox
- [dist/opera/](dist/firefox/) for Opera
The built extensions can be found in [dist/chrome/](dist/chrome/).

### Developer Installation

Expand Down
18 changes: 1 addition & 17 deletions bin/createDist.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
# This shell script compiles, minifies and copies the necessary files
# to the dist/chrome/ folder for publishing purposes.

Expand All @@ -20,28 +21,11 @@ cp -r popup/ dist/chrome/popup/
# Remove mock data
rm -rf dist/chrome/popup/mockData

## FIREFOX ###################

cp -r dist/chrome dist/firefox
cp manifest.firefox.json dist/firefox/manifest.json
cp README.md dist/firefox/README.md

## FIREFOX ###################

cp -r dist/firefox dist/opera
sed -i -e 's/Period/K/g' dist/opera/manifest.json

# Zip dist files for upload to browser stores

if hash 7z 2>/dev/null; then
cd ./dist/chrome/
7z a ../chrome.zip ./* -r

cd ../firefox
7z a ../firefox.zip ./* -r

cd ../opera
7z a ../opera.zip ./* -r
else
echo "7z could not be found"
fi
Expand Down
1 change: 1 addition & 0 deletions bin/updateLibs.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
rm -rf popup/lib
mkdir popup/lib

Expand Down
3 changes: 0 additions & 3 deletions bin/updateManifests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ import fs from 'fs'

const packageJson = JSON.parse(fs.readFileSync('package.json').toString())
const manifestJson = JSON.parse(fs.readFileSync('manifest.json').toString())
const manifestFirefoxJson = JSON.parse(fs.readFileSync('manifest.firefox.json').toString())

console.log('Updating Manifests with version v' + packageJson.version)

manifestJson.version = packageJson.version
manifestFirefoxJson.version = packageJson.version

fs.writeFileSync('manifest.json', JSON.stringify(manifestJson, null, 2))
fs.writeFileSync('manifest.firefox.json', JSON.stringify(manifestFirefoxJson, null, 2))
44 changes: 0 additions & 44 deletions manifest.firefox.json

This file was deleted.

10 changes: 8 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"manifest_version": 3,
"name": "Search Bookmarks, History and Tabs",
"description": "Browser extension to (fuzzy) search and navigate bookmarks, history and open tabs.",
"homepage_url": "https://github.com/Fannon/search-bookmarks-history-and-tabs",
"author": "Simon Heimler",
"version": "1.10.4",
"manifest_version": 3,
"version": "1.11.0",
"permissions": [
"tabs",
"bookmarks",
Expand Down Expand Up @@ -34,5 +34,11 @@
"32": "/images/logo-32.png",
"48": "/images/logo-48.png",
"128": "/images/logo-128.png"
},
"browser_specific_settings": {
"gecko": {
"id": "{9aa67c59-afc3-41c2-9879-545397b91786}",
"strict_min_version": "126.0"
}
}
}
35 changes: 18 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "search-bookmarks-history-and-tabs",
"version": "1.10.4",
"version": "1.11.0",
"description": "Browser extension to (fuzzy) search and navigate bookmarks, history and open tabs.",
"main": "index.js",
"type": "module",
Expand All @@ -11,18 +11,18 @@
"mark.js": "^8.11.1"
},
"devDependencies": {
"cypress": "^13.17.0",
"cypress": "^14.0.0",
"cypress-fail-on-console-error": "^5.1.1",
"eslint": "^9.18.0",
"eslint-plugin-cypress": "^4.1.0",
"fs-extra": "^11.2.0",
"fs-extra": "^11.3.0",
"live-server": "^1.2.2"
},
"scripts": {
"clean": "node bin/clean.js",
"build": "npm run clean && npm run update-libs && npm run update-manifests && npm run create-dist && npm run size",
"update-libs": "sh bin/updateLibs.sh",
"create-dist": "sh bin/createDist.sh",
"update-libs": "bash bin/updateLibs.sh",
"create-dist": "bash bin/createDist.sh",
"update-manifests": "node bin/updateManifests.js",
"test": "npm run e2e",
"e2e": "cypress run --config-file=cypress.config.mjs --spec 'cypress/e2e/**/*'",
Expand Down
2 changes: 1 addition & 1 deletion popup/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ li.error {
}
#edit-bookmark {
padding: 0;
overflow: none;
overflow: hidden;
position: fixed;
top: 0;
left: 0;
Expand Down
Loading

0 comments on commit a647c6d

Please sign in to comment.