Giter VIP home page Giter VIP logo

Comments (5)

jinliu avatar jinliu commented on May 19, 2024 1

You are actually not requesting any additional permissions by using host_permissions, since you already requested "Access your data for all websites" with context_scripts.

Anyway, this is very weird since we are using the same browser versions, the only difference seems to be Mac vs Linux. Maybe we close this issue for now (until someone else encounters the same problem)? I can do with using the right-click menu (it works) instead of the floating button to capture.

from logseq-copilot.

EINDEX avatar EINDEX commented on May 19, 2024

This is interesting, I never thought that Behaver will have differences between Chrome and Firefox.

And, Thanks for sharing this.

Setting this as top priority, will fix it soon.

from logseq-copilot.

jinliu avatar jinliu commented on May 19, 2024

This is interesting, I never thought that Behaver will have differences between Chrome and Firefox.

Perhaps not Chrome vs. Firefox, since Vivaldi is using Chrome extension store, and also has the problem.
And I tried a fresh install of Chrome (v112.0.5615.121), has the same problem.

Both can be fixed by adding the "tabs" permission, or even better, by explicitly requesting <all_urls> host permission:
Chrome:
"host_permissions": [ "<all_urls>" ],
Firefox:

"permissions": [
    "<all_urls>",
    "storage",
    "activeTab",
    "contextMenus"
  ],

Since we already requested content_scripts on <all_urls>, this way we requests one less permission from user.

This is a bit weird, since I thought content_scripts implies host_permission, but seems not in my PC.

BTW, the Chrome manifest file seems to have some rendering bug in <all_urls>:

   "content_scripts": [ {
      "css": [ "content-script.css" ],
      "js": [ "content-script.js" ],
      "matches": [ "http://*/*", "https://*/*", "\u003Call_urls>" ]
   } ],

from logseq-copilot.

EINDEX avatar EINDEX commented on May 19, 2024

Interesting, I was try chrome and Firefox on my machine, both working fine.

I don't want to bring unnecessary permission to users, but content_scripts is same as host_permissions when doing the store review.

My OS is macOS 13.2.1(22D68)

Below is the manifest I am using on Firefox Version 112.0.5615.121 (Official Build) (arm64).

{
  "version": "1.10.11",
  "author": "[email protected]",
  "name": "Logseq Copilot",
  "description": "Logseq Copilot, Connect with you logseq API server, bring your information when you browsing.",
  "chrome_url_overrides": {},
  "icons": {
    "192": "assets/img/logo-192.png"
  },
  "content_scripts": [
    {
      "matches": [
        "http://*/*",
        "https://*/*",
        "<all_urls>"
      ],
      "js": [
        "content-script.js"
      ],
      "css": [
        "content-script.css"
      ]
    }
  ],
  "permissions": [
    "storage",
    "activeTab",
    "contextMenus"
  ],
  "options_ui": {
    "page": "options.html",
    "browser_style": false,
    "open_in_tab": true
  },
  "manifest_version": 2,
  "background": {
    "scripts": [
      "background.js"
    ]
  },
  "web_accessible_resources": [
    "content-script.css",
    "assets/img/logo.png"
  ],
  "browser_action": {
    "default_popup": "popup.html",
    "default_title": "Logseq Copilot"
  },
  "browser_specific_settings": {
    "gecko": {
      "id": "{dbe73d0a-f6b8-474a-ad39-0d46a07e4525}"
    }
  }
}

And this for Chrome Version 112.0.5615.121 (Official Build) (arm64):

{"version":"1.10.16","author":"[email protected]","name":"Logseq Copilot","description":"Logseq Copilot, Connect with you logseq API server, bring your information when you browsing.","chrome_url_overrides":{},"icons":{"192":"assets/img/logo-192.png"},

"content_scripts":[{"matches":["http://*/*","https://*/*","<all_urls>"],
"js":["content-script.js"],
"css":["content-script.css"]}],
"permissions":["storage","activeTab","contextMenus"],

"options_ui":{"page":"options.html","browser_style":false,"open_in_tab":true},"manifest_version":3,"key":"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnkAYeXnTWrNIu2h8D4xi9NHWLe0eTR3CX8DDw1c0qyCucaCKxkk/+gZcl89Ifyq5joXc/CeQrM3QVjrL1RAXrKZVqTNvBCUh1H1oJJ47nqkKKI6bNZVT8utjFTjDD1ZYXPYzQhsGuP/cY1wIrlhhIuawFW1h+UUwYlYQtS5FcjJ/RPrao+8KwJaS9p3Cei9rWXhE/PV19ZVOqOUx9ZSzj5/OYCB1u1VWFD5BlUbTXSbzyM/VvXZseAVruVy7oRHJ565AH/uPz2ZVL55Gz0LzcHw4HNRc2f+mSVAbHAuK7JDWtRlrZ3Fbav9qBrcVIAxTpnf5B2I2YMBMcu852Vkc3QIDAQAB","background":{"service_worker":"background.js"},"web_accessible_resources":[{"resources":["content-script.css","assets/img/logo.png"],"matches":[]}],"action":{"default_popup":"popup.html","default_title":"Logseq Copilot"}}

from logseq-copilot.

EINDEX avatar EINDEX commented on May 19, 2024

I add permission back.

from logseq-copilot.

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.