run user script on chrome://settings and similar urls

坚强是说给别人听的谎言 提交于 2019-12-11 06:07:57

问题


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?


回答1:


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, or ftp, and that can contain '*' characters).



来源:https://stackoverflow.com/questions/41732961/tampermonkey-script-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!