我有一个简单的Greasemonkey脚本:
// ==UserScript==
// @name hello
// @namespace http://www.webmonkey.com
// @description A test of accessing documents using file:// protocol
// @include http* file*
// @grant none
// ==/UserScript==
alert("hi");
Run Code Online (Sandbox Code Playgroud)
只要URL具有以下形式,它就可以正常工作http://...如何让脚本在表单的URL上运行file://...?
在"用户设置"部分中,我有http://*和file://*作为包含的页面,在"脚本设置"部分中,我http* file*在"包含的页面"框中.