RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / 问题

问题[chrome-extension]

Martin Hope
Oliver Patterson
Asked: 2022-08-14 13:19:46 +0000 UTC

在 Google Chrome 中创建自定义主题时出现面板轮廓

  • 0

我有一个这样的manifest.json:

{
    "name": "Theme",
    "description": "Theme",
    "version": "1",
    "manifest_version": 3,
    "theme": {
        "images": {
            "theme_toolbar": "/images/theme_toolbar.png"
        },
        "colors": {
            "background_tab": [30, 30, 30],
            "background_tab_inactive": [30, 30, 30],
            "background_tab_incognito": [30, 30, 30],
            "background_tab_incognito_inactive": [30, 30, 30],

            "tab_background_text": [170, 170, 170],
            "tab_background_text_inactive": [170, 170, 170],
            "tab_background_text_incognito": [170, 170, 170],
            "tab_background_text_incognito_inactive": [170, 170, 170],

            "tab_text": [220, 66, 66],
            "toolbar_text": [220, 66, 66],

            "bookmark_text": [150, 150, 150],

            "frame": [10, 10, 10],
            "frame_inactive": [10, 10, 10],
            "frame_incognito": [10, 10, 10],
            "frame_incognito_inactive": [10, 10, 10],

            "ntp_background": [10, 10, 10],
            "ntp_header": [10, 10, 10],
            "ntp_link": [6, 55, 116],
            "ntp_text": [0, 0, 0],

            "omnibox_background": [25, 25, 25],
            "omnibox_text": [190, 190, 190],

            "toolbar": [35, 35, 35],
            "toolbar_button_icon": [220, 66, 66]
        }
    }
}

theme_toolbar.png:

主题工具栏.png

由于某种原因,它看起来像这样:
在此处输入图像描述

我试着换了一个主题,但最后这行也出现了,虽然我是逐行添加的,但删除最后的更改后,该行仍然存在,不想离开。
如何将其移除?

google-chrome chrome-extension
  • 1 个回答
  • 19 Views
Martin Hope
BART96
Asked: 2020-04-12 09:33:04 +0000 UTC

访问 chrome.storage 时同步执行异步代码

  • 2

chrome API 具有保存一些数据的功能 - https://developer.chrome.com/apps/storage

  • chrome.storage.local...- 数据位于本地。
  • chrome.storage.sync...- 数据在具有相同谷歌帐户的设备上同步。

这两种方法都是异步运行的。我想改变这一点。但是,我不明白如何

// Не работает

(async () => {
  await chrome.storage.local.get('config', data => {
    console.log('first 111');
  });

  console.log('END 222');
})();

一个具体的问题:是否可以等待请求完成(chrome.storage ...)而不使用回调,然后才显示“END 222”?

Z.s. 我知道localStorage,但我想处理chrome.storage。

chrome-extension
  • 1 个回答
  • 10 Views
Martin Hope
Tick-Tack
Asked: 2020-01-30 03:32:41 +0000 UTC

如何使无法访问扩展程序的源代码?

  • 2

我有一个扩展程序(它是从 Chrome 安装的,我只向某些人授予测试人员访问权限)并且我需要当一个人安装它时,他无权访问它(即,他无权访问代码,因为如果您愿意,您可以找到带有代码的文件夹),因为如果一个人找到带有代码的文件夹,他可以将所有代码发送给另一个人,并且他可以使用扩展名。告诉我,是否可以将部分扩展代码传输到服务器,但它仍然适用于客户端?或者,您如何使用 Chrome API 在扩展程序中通过 google 帐户实现绑定?

chrome-extension
  • 6 个回答
  • 10 Views
Martin Hope
Mr Lucky Tomas
Asked: 2020-01-28 23:02:08 +0000 UTC

如何使用 chrome 扩展读取和更改打开页面的代码

  • 0

我正在制作我的 1 chrome 扩展程序,我向该站点发出了 xhr 请求,我能够从那里获取数据。但是现在我想从用户被授权的站点获取数据,xhr 在这里无济于事。我也想比较一下这个站点的数据和xhr收到的数据,直接在用户的页面上显示结果。这些数据是商品的价格,在一个站点上是 1,在另一个站点上是不同的,因此有必要找到一个有利可图的报价。

chrome-extension
  • 1 个回答
  • 10 Views
Martin Hope
rodigy
Asked: 2020-12-28 06:07:49 +0000 UTC

Chrome 扩展获取活动标签的 id 或 url

  • 0

我总是得到undefined,以各种流行的方式尝试过,例如:

var tabId = chrome.tabs.query({active: true, currentWindow: true}, function (tabs) {
   return tabs[0].id;
});

当单击弹出窗口中的链接以打开另一个页面并获取其中活动选项卡的 url 或 tabId(获取 url)时,这是必要的。

应用程序权限为 activeTab、tabs

chrome-extension
  • 1 个回答
  • 10 Views

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    我看不懂措辞

    • 1 个回答
  • Marko Smith

    请求的模块“del”不提供名为“default”的导出

    • 3 个回答
  • Marko Smith

    "!+tab" 在 HTML 的 vs 代码中不起作用

    • 5 个回答
  • Marko Smith

    我正在尝试解决“猜词”的问题。Python

    • 2 个回答
  • Marko Smith

    可以使用哪些命令将当前指针移动到指定的提交而不更改工作目录中的文件?

    • 1 个回答
  • Marko Smith

    Python解析野莓

    • 1 个回答
  • Marko Smith

    问题:“警告:检查最新版本的 pip 时出错。”

    • 2 个回答
  • Marko Smith

    帮助编写一个用值填充变量的循环。解决这个问题

    • 2 个回答
  • Marko Smith

    尽管依赖数组为空,但在渲染上调用了 2 次 useEffect

    • 2 个回答
  • Marko Smith

    数据不通过 Telegram.WebApp.sendData 发送

    • 1 个回答
  • Martin Hope
    Alexandr_TT 2020年新年大赛! 2020-12-20 18:20:21 +0000 UTC
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5