在chrome://settings和类似的网址上运行用户脚本 [英] run user script on chrome://settings and similar urls
问题描述
为什么篡改键对chrome://history/
或chrome://settings/
这样的网址不起作用?还可以在此页面上运行用户脚本吗?
不幸的是,这是不可能的,因为@match
的能力不支持chrome
方案(chrome://
).>
UserScript也使用Chrome的 match
规范,因此Chrome扩展程序不能这样做.也不行.
根据链接的规范:
主机权限和内容脚本匹配基于匹配模式定义的一组URL.匹配模式本质上是一个以允许的方案(
http
,https
,file
或ftp
,并且可以包含'*
'个字符)开头的URL.
Why doesn't tampermonkey work on urls such as chrome://history/
or chrome://settings/
? Any way to run an user script on this pages as well?
Unfortunately, this isn't possible, because the chrome
scheme (chrome://
) isn't supported in @match
's abilities.
UserScripts also use Chrome's match
spec, so a Chrome extension to do that wouldn't work either.
From the linked spec:
Host permissions and content script matching are based on a set of URLs defined by match patterns. A match pattern is essentially a URL that begins with a permitted scheme (
http
,https
,file
, orftp
, and that can contain '*
' characters).
这篇关于在chrome://settings和类似的网址上运行用户脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!