简体   繁体   English

在 Chrome 扩展程序中看不到任何 JavaScript 文件

[英]Cannot see any JavaScript files in a Chrome extension

As I concern security and privacy, also actually I'm facing Chrome(actually chromium Brave)'s high CPU problem, I needed to check source code of suspicious extensions I have.由于我关心安全和隐私,实际上我也面临 Chrome(实际上是 chromium Brave)的高 CPU 问题,我需要检查我拥有的可疑扩展的源代码。

So first I tried to inspect an extension called Visited (bfcodeehkjogenemacopdbhabjebnbah), it's very simple extension so I thought it shouldn't be hard to inspect.所以首先我尝试检查一个名为 Visited (bfcodeehkjogenemacopdbhabjebnbah) 的扩展,这是一个非常简单的扩展,所以我认为它应该不难检查。 (but of course it should contains at least some JS files, background.js) (当然它应该至少包含一些 JS 文件,background.js)

But when I opened Default\Extensions\bfcodeehkjogenemacopdbhabjebnbah on my editor, there is no JS files, but only five files:但是当我在编辑器上打开Default\Extensions\bfcodeehkjogenemacopdbhabjebnbah时,没有 JS 文件,只有五个文件:

  • _metadata\verified_contents.json _metadata\verified_contents.json
  • _metadata\computed_hashes.json _metadata\computed_hashes.json
  • custom.css定制.css
  • icon128.png图标128.png
  • manifest.json manifest.json

It's so strange.太奇怪了。

I also read gist to inspect Chrome extension source code, I tried all the curl clients2.google.com/service/update2/crx way, robwu.nl/crxviewer way, Chrome extension source viewer way.我还阅读了检查 Chrome 扩展源代码的要点,我尝试了所有 curl clients2.google.com/service/update2/crx方式,robwu.nl/crxviewer 方式,Chrome 扩展源查看器方式。 But none of them worked or showed me the with-no-JS-files source tree.但是它们都没有工作或向我展示了 with-no-JS-files 源代码树。

Where the hell is background.js and JS files? background.js 和 JS 文件到底在哪里? How can I see these files??我怎样才能看到这些文件?

It was because that the extension is implemented only with the one CSS file, and without having power of any JavaScript.这是因为该扩展只用一个 CSS 文件实现,没有任何 JavaScript 的权力。

Also I tried debugging the source code with editor and confirmed it works as expected.我还尝试使用编辑器调试源代码并确认它按预期工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM