Comments (16)
I would like to look into porting the extension to Firefox, I don't think it should be too hard.
from omni.
All right, finished. I had to port it over to Manifest V2 but seems to work. I've added a Firefox folder with the code, and I've also submitted it to Firefox Add-ons. Will go live soon (hopefully?) at https://addons.mozilla.org/en-GB/firefox/addon/omnisearch/
from omni.
It's officially live now! https://addons.mozilla.org/en-US/firefox/addon/omnisearch/
from omni.
I'm currently working on it, seems to work fine but need to make some tweaks with the styling. Will update soon.
from omni.
@alyssaxuu I can't find it in Firefox addons store.
Sadly it's still in review for some reason :( I got an email from them saying it is taking longer than usual, it's odd.
from omni.
+1, would love to have this on Firefox :)
from omni.
+1, would love to have this on Firefox as well. Thank you
from omni.
+1, it would be great!
from omni.
For manifest V2 you could just check if chrome
was available and otherwise use browser
const chrome = chrome if typeof chrome !== 'undefined' else browser
With V3 though there are some more changes in the way the API works, although I don't think this extension needs to be changed much for it to work
from omni.
I converted the manifest.json
to v2
but i get these warnings
Reading manifest: Warning processing permissions: Error processing permissions.5: Value "scripting" must either: must either [must either [must either [must either [be one of ["idle"], be one of ["menus.overrideContext"], be one of ["search"], be one of ["activeTab"], be one of ["cookies"], or be one of ["webRequest", "webRequestBlocking"]], be one of ["clipboardRead", "clipboardWrite", "geolocation", "notifications"], be one of ["bookmarks"], be one of ["browsingData"], be one of ["devtools"], be one of ["find"], be one of ["history"], be one of ["pkcs11"], be one of ["sessions"], be one of ["tabs", "tabHide"], be one of ["topSites"], be one of ["browserSettings"], be one of ["downloads", "downloads.open"], be one of ["management"], be one of ["privacy"], be one of ["proxy"], be one of ["nativeMessaging"], or be one of ["webNavigation"]], be one of ["alarms", "mozillaAddons", "storage", "unlimitedStorage"], be one of ["captivePortal"], be one of ["identity"], be one of ["menus", "contextMenus"], be one of ["normandyAddonStudy"], be one of ["geckoProfiler"], be one of ["urlbar"], be one of ["contextualIdentities"], be one of ["dns"], be one of ["activityLog"], be one of ["networkStatus"], be one of ["telemetry"], or be one of ["theme"]], must either [must either [be one of ["idle"], be one of ["menus.overrideContext"], be one of ["search"], be one of ["activeTab"], be one of ["cookies"], or be one of ["webRequest", "webRequestBlocking"]], be one of ["clipboardRead", "clipboardWrite", "geolocation", "notifications"], be one of ["bookmarks"], be one of ["browsingData"], be one of ["devtools"], be one of ["find"], be one of ["history"], be one of ["pkcs11"], be one of ["sessions"], be one of ["tabs", "tabHide"], be one of ["topSites"], be one of ["browserSettings"], be one of ["downloads", "downloads.open"], be one of ["management"], be one of ["privacy"], be one of ["proxy"], be one of ["nativeMessaging"], or be one of ["webNavigation"]], or match the pattern /^experiments(\.\w+)+$/], or must either [be one of ["<all_urls>"], must either [match the pattern /^(https?|wss?|file|ftp|\*):\/\/(\*|\*\.[^*/]+|[^*/]+)\/.*$/, or match the pattern /^file:\/\/\/.*$/], or match the pattern /^resource:\/\/(\*|\*\.[^*/]+|[^*/]+)\/.*$|^about:/]
I am not sure on how to fix it. I am not getting any errors tho.
Ctrl+K seems to be a firefox nightly shortcut, so had to assign a different keybind.
Output : No Omni Menu
Suspected issue : warning [since i dont get any other errors]
V2 Manifest.json
{
"name": "Omni",
"description": "Supercharge Chrome with commands, shortcuts, and more",
"version": "4.0.22",
"manifest_version": 2,
"browser_specific_settings": {
"gecko": {
"id": "[email protected]"
}
},
"icons": {
"16": "assets/logo-16.png",
"48": "assets/logo-48.png",
"128": "assets/logo-128.png"
},
"commands": {
"_execute_browser_action": {
"suggested_key": {
"default": "Ctrl+K",
"mac": "MacCtrl+K"
},
"description": "Opens Omni"
}
},
"background": {
"scripts": ["background.js"]
},
"permissions": ["tabs", "activeTab", "bookmarks", "browsingData", "history", "scripting"],
"content_scripts": [
{
"run_at": "document_end",
"matches": ["*://*/*"],
"js": ["jquery.js", "content.js"],
"css": ["content.css"]
}
],
"web_accessible_resources": [
"content.html",
"assets/*",
"popup.css",
"popup.js"
],
"browser_action": {
"default_icon": {
"16": "assets/logo-16.png",
"48": "assets/logo-48.png",
"128": "assets/logo-128.png"
}
}
}
from omni.
I converted the
manifest.json
tov2
but i get these warningsReading manifest: Warning processing permissions: Error processing permissions.5: Value "scripting" must either: must either [must either [must either [must either [be one of ["idle"], be one of ["menus.overrideContext"], be one of ["search"], be one of ["activeTab"], be one of ["cookies"], or be one of ["webRequest", "webRequestBlocking"]], be one of ["clipboardRead", "clipboardWrite", "geolocation", "notifications"], be one of ["bookmarks"], be one of ["browsingData"], be one of ["devtools"], be one of ["find"], be one of ["history"], be one of ["pkcs11"], be one of ["sessions"], be one of ["tabs", "tabHide"], be one of ["topSites"], be one of ["browserSettings"], be one of ["downloads", "downloads.open"], be one of ["management"], be one of ["privacy"], be one of ["proxy"], be one of ["nativeMessaging"], or be one of ["webNavigation"]], be one of ["alarms", "mozillaAddons", "storage", "unlimitedStorage"], be one of ["captivePortal"], be one of ["identity"], be one of ["menus", "contextMenus"], be one of ["normandyAddonStudy"], be one of ["geckoProfiler"], be one of ["urlbar"], be one of ["contextualIdentities"], be one of ["dns"], be one of ["activityLog"], be one of ["networkStatus"], be one of ["telemetry"], or be one of ["theme"]], must either [must either [be one of ["idle"], be one of ["menus.overrideContext"], be one of ["search"], be one of ["activeTab"], be one of ["cookies"], or be one of ["webRequest", "webRequestBlocking"]], be one of ["clipboardRead", "clipboardWrite", "geolocation", "notifications"], be one of ["bookmarks"], be one of ["browsingData"], be one of ["devtools"], be one of ["find"], be one of ["history"], be one of ["pkcs11"], be one of ["sessions"], be one of ["tabs", "tabHide"], be one of ["topSites"], be one of ["browserSettings"], be one of ["downloads", "downloads.open"], be one of ["management"], be one of ["privacy"], be one of ["proxy"], be one of ["nativeMessaging"], or be one of ["webNavigation"]], or match the pattern /^experiments(\.\w+)+$/], or must either [be one of ["<all_urls>"], must either [match the pattern /^(https?|wss?|file|ftp|\*):\/\/(\*|\*\.[^*/]+|[^*/]+)\/.*$/, or match the pattern /^file:\/\/\/.*$/], or match the pattern /^resource:\/\/(\*|\*\.[^*/]+|[^*/]+)\/.*$|^about:/]
I am not sure on how to fix it. I am not getting any errors tho. Ctrl+K seems to be a firefox nightly shortcut, so had to assign a different keybind.
Output : No Omni Menu
Suspected issue : warning [since i dont get any other errors]
V2 Manifest.json
{ "name": "Omni", "description": "Supercharge Chrome with commands, shortcuts, and more", "version": "4.0.22", "manifest_version": 2, "browser_specific_settings": { "gecko": { "id": "[email protected]" } }, "icons": { "16": "assets/logo-16.png", "48": "assets/logo-48.png", "128": "assets/logo-128.png" }, "commands": { "_execute_browser_action": { "suggested_key": { "default": "Ctrl+K", "mac": "MacCtrl+K" }, "description": "Opens Omni" } }, "background": { "scripts": ["background.js"] }, "permissions": ["tabs", "activeTab", "bookmarks", "browsingData", "history", "scripting"], "content_scripts": [ { "run_at": "document_end", "matches": ["*://*/*"], "js": ["jquery.js", "content.js"], "css": ["content.css"] } ], "web_accessible_resources": [ "content.html", "assets/*", "popup.css", "popup.js" ], "browser_action": { "default_icon": { "16": "assets/logo-16.png", "48": "assets/logo-48.png", "128": "assets/logo-128.png" } } }
In order to make it work for V2 it would need a lot of changes in the code, would take a while to go through it. You would need to basically do the opposite of this: https://developer.chrome.com/docs/extensions/mv3/intro/mv3-migration/
from omni.
I converted the
manifest.json
tov2
but i get these warningsReading manifest: Warning processing permissions: Error processing permissions.5: Value "scripting" must either: must either [must either [must either [must either [be one of ["idle"], be one of ["menus.overrideContext"], be one of ["search"], be one of ["activeTab"], be one of ["cookies"], or be one of ["webRequest", "webRequestBlocking"]], be one of ["clipboardRead", "clipboardWrite", "geolocation", "notifications"], be one of ["bookmarks"], be one of ["browsingData"], be one of ["devtools"], be one of ["find"], be one of ["history"], be one of ["pkcs11"], be one of ["sessions"], be one of ["tabs", "tabHide"], be one of ["topSites"], be one of ["browserSettings"], be one of ["downloads", "downloads.open"], be one of ["management"], be one of ["privacy"], be one of ["proxy"], be one of ["nativeMessaging"], or be one of ["webNavigation"]], be one of ["alarms", "mozillaAddons", "storage", "unlimitedStorage"], be one of ["captivePortal"], be one of ["identity"], be one of ["menus", "contextMenus"], be one of ["normandyAddonStudy"], be one of ["geckoProfiler"], be one of ["urlbar"], be one of ["contextualIdentities"], be one of ["dns"], be one of ["activityLog"], be one of ["networkStatus"], be one of ["telemetry"], or be one of ["theme"]], must either [must either [be one of ["idle"], be one of ["menus.overrideContext"], be one of ["search"], be one of ["activeTab"], be one of ["cookies"], or be one of ["webRequest", "webRequestBlocking"]], be one of ["clipboardRead", "clipboardWrite", "geolocation", "notifications"], be one of ["bookmarks"], be one of ["browsingData"], be one of ["devtools"], be one of ["find"], be one of ["history"], be one of ["pkcs11"], be one of ["sessions"], be one of ["tabs", "tabHide"], be one of ["topSites"], be one of ["browserSettings"], be one of ["downloads", "downloads.open"], be one of ["management"], be one of ["privacy"], be one of ["proxy"], be one of ["nativeMessaging"], or be one of ["webNavigation"]], or match the pattern /^experiments(\.\w+)+$/], or must either [be one of ["<all_urls>"], must either [match the pattern /^(https?|wss?|file|ftp|\*):\/\/(\*|\*\.[^*/]+|[^*/]+)\/.*$/, or match the pattern /^file:\/\/\/.*$/], or match the pattern /^resource:\/\/(\*|\*\.[^*/]+|[^*/]+)\/.*$|^about:/]
I am not sure on how to fix it. I am not getting any errors tho. Ctrl+K seems to be a firefox nightly shortcut, so had to assign a different keybind.
Output : No Omni Menu
Suspected issue : warning [since i dont get any other errors]
V2 Manifest.json
{ "name": "Omni", "description": "Supercharge Chrome with commands, shortcuts, and more", "version": "4.0.22", "manifest_version": 2, "browser_specific_settings": { "gecko": { "id": "[email protected]" } }, "icons": { "16": "assets/logo-16.png", "48": "assets/logo-48.png", "128": "assets/logo-128.png" }, "commands": { "_execute_browser_action": { "suggested_key": { "default": "Ctrl+K", "mac": "MacCtrl+K" }, "description": "Opens Omni" } }, "background": { "scripts": ["background.js"] }, "permissions": ["tabs", "activeTab", "bookmarks", "browsingData", "history", "scripting"], "content_scripts": [ { "run_at": "document_end", "matches": ["*://*/*"], "js": ["jquery.js", "content.js"], "css": ["content.css"] } ], "web_accessible_resources": [ "content.html", "assets/*", "popup.css", "popup.js" ], "browser_action": { "default_icon": { "16": "assets/logo-16.png", "48": "assets/logo-48.png", "128": "assets/logo-128.png" } } }
In order to make it work for V2 it would need a lot of changes in the code, would take a while to go through it. You would need to basically do the opposite of this: https://developer.chrome.com/docs/extensions/mv3/intro/mv3-migration/
I once again checked my manifest.json
(V2 - mentioned above) and the code is all right and working properly in chrome and brave.
The issue seems to be that some chrome permissions
are not compatible with firefox
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions
from omni.
https://github.com/alyssaxuu/omni/blob/master/src/content.js
This file needs a major redo to get it working with firefox
from omni.
The 'scripting' permission doesn't work in manifest V2 that's the error you're getting. This way the omni-box doesn't get injected into the page you're viewing. I'd start by just trying to load the extension in Firefox and seeing what goes wrong
from omni.
Would like to work on this
from omni.
@alyssaxuu I can't find it in Firefox addons store.
from omni.
Related Issues (20)
- What is the logic of direct search results?
- [Suggestion] Add command to move tab to another window HOT 1
- favIconUrl is sometimes undefined on action (tab) (Firefox only?) HOT 1
- Option to remove a bookmark
- Google Docs Header Switching
- [Suggestion] Add chatGPT command
- Feature Request: Custom inputs for Commands HOT 1
- exams
- New bookmarks have not been updated
- Plugin doesn't open sometimes
- [feature request] fuzzy search
- Unexpected requests to `/users/undefined` causing unwanted 404 in Rails-based webapp
- The style displayed when bookmarking the protected script is incorrect
- Doesn't work in new tab
- how to open tab when search? HOT 1
- Feature Request: Integrate actions with Firefox Containers
- Chrome extension
- Some settings ?
- Dark mode not tied to system setting on macOS Ventura 13.6.4
- Invalid browser settings URI on Firefox
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from omni.