Giter Club home page Giter Club logo

Comments (16)

alyssaxuu avatar alyssaxuu commented on April 16, 2024 10

I would like to look into porting the extension to Firefox, I don't think it should be too hard.

from omni.

alyssaxuu avatar alyssaxuu commented on April 16, 2024 5

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.

alyssaxuu avatar alyssaxuu commented on April 16, 2024 3

It's officially live now! https://addons.mozilla.org/en-US/firefox/addon/omnisearch/

from omni.

alyssaxuu avatar alyssaxuu commented on April 16, 2024 2

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 avatar alyssaxuu commented on April 16, 2024 1

@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.

stamatimorellas avatar stamatimorellas commented on April 16, 2024

+1, would love to have this on Firefox :)

from omni.

alexdeplov avatar alexdeplov commented on April 16, 2024

+1, would love to have this on Firefox as well. Thank you

from omni.

oscarCorb avatar oscarCorb commented on April 16, 2024

+1, it would be great!

from omni.

leonhma avatar leonhma commented on April 16, 2024

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.

sr2echa avatar sr2echa commented on April 16, 2024

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.

alyssaxuu avatar alyssaxuu commented on April 16, 2024

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"
    }
  }
}

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.

sr2echa avatar sr2echa commented on April 16, 2024

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"
    }
  }
}

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.

sr2echa avatar sr2echa commented on April 16, 2024

https://github.com/alyssaxuu/omni/blob/master/src/content.js
This file needs a major redo to get it working with firefox

from omni.

leonhma avatar leonhma commented on April 16, 2024

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.

OlaoluwaM avatar OlaoluwaM commented on April 16, 2024

Would like to work on this

from omni.

baruchiro avatar baruchiro commented on April 16, 2024

@alyssaxuu I can't find it in Firefox addons store.

from omni.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.