简体   繁体   English

无需第三方扩展程序即可永久地在Google Chrome浏览器中执行用户脚本

[英]Executing Userscripts in Google Chrome permanentely without 3rd party Extension

I wrote some userscripts (in JS) and want to execute/run them permanentely as fast as possible without using Extensions like Tampermonkey, Greasemonkey or Control Freak. 我写了一些用户脚本(使用JS),并希望尽可能永久地永久执行/运行它们而不使用Tampermonkey,Greasemonkey或Control Freak等扩展。

I found out that 3rd party Extensions like Tampermonkey reduce the userscript performance quite significantly (0,08 Sec runtime instead of 0,02 Sec for example). 我发现像Tampermonkey这样的第三方扩展大大降低了用户脚本性能(例如,运行时间为0.08秒,而不是0.02秒)。

I found 2 alternaitves which are both not really convenient for me: 我发现了2个对我来说都不方便的替代品:

1) I execute my scripts in the Chrome Console whenever I start the browser. 1)每当我启动浏览器时,我都会在Chrome控制台中执行脚本。 Which is kinda annoying if you have do that several times a day. 如果您一天做几次,那会很烦人。

2) If I add my userscript as Chrome Extension, but then it gets disabled automatically as soon as I restart Chrome as the source is not know in the Chrome Web Store. 2)如果我将用户脚本添加为Chrome扩展程序,但由于Chrome网上应用店中不知道来源,因此我在重新启动Chrome时会自动禁用它。

Is there any workaround for those 2 problems? 这两个问题有什么解决方法吗? What would you suggest? 你有什么建议?

Don't use pack the extension into a .crx . 不要使用扩展名打包到.crx Unpacked extensions work fine. 解压缩的扩展程序工作正常。

  1. Open the extensions page, and check the "Developer Mode" box at the top right. 打开扩展页面,然后选中右上角的“开发人员模式”框。

  2. Click "Load unpacked extensions..." and select your extension's directory. 单击“加载解压的扩展程序...”,然后选择扩展程序的目录。

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

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