如何在浏览器之外编辑Tampermonkey脚本 [英] How to edit Tampermonkey scripts outside of the browser

查看:96
本文介绍了如何在浏览器之外编辑Tampermonkey脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在浏览器之外编辑Tampermonkey脚本?宁愿在一个好的IDE中,而不是试图在浏览器中进行编辑。

How do I edit Tampermonkey scripts outside of the browser? Would rather be in a good IDE instead of trying to make the edits in the browser.

我曾经能够在Firefox中开发Greasemonkey脚本时执行此操作,但是我无法使用Chrome找到.user.js文件。

I used to be able to do this when I developed Greasemonkey scripts in Firefox, but I can't locate the .user.js files with Chrome.

推荐答案

由于Chrome扩展程序不是真的(下面有解释)有权访问文件系统Tampermonkey将脚本存储在内部存储器中。

Since Chrome extensions don't really (explanation below) have access to the filesystem Tampermonkey stores the scripts at an internal storage.

你可以做的是允许Tampermonkey访问您的本地文件,将脚本的标题复制到Tampermonkey并另外 @require 位于硬盘某处的完整脚本

What you can do is to allow Tampermonkey to access your local files, copy the header of your script to Tampermonkey and additionally @require the full script that is located somewhere at your hard disk.

不是真的意味着LocalFileSystem API允许文件访问,但名称和文件不是必需的y映射到真正的文件系统。 此外,LocalFileSystem现在似乎已被弃用

"don't really" means the LocalFileSystem API allows file access but the names and also the files are not necessarily mapped to the real filesystem. Furthermore LocalFileSystem seems to be deprecated now.

这篇关于如何在浏览器之外编辑Tampermonkey脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆