Scr*_*ter 19 greasemonkey auto-update tampermonkey
我有一个用于Firefox的Greasemonkey脚本.该脚本包括这个元块和一些代码行.
我想在服务器上更新我的脚本,然后自动更新浏览器的脚本.该requireSecureUpdates选项已关闭.
我究竟做错了什么?
我的1.meta.js
// ==UserScript==
// @name Ibood autosubmit
// @include https://*.ibood.com/*
// @include http://*.ibood.com/*
// @include *
// @version 1.1
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @grant GM_addStyle
// @downloadURL http://www.tipsvoorbesparen.nl/1.user.js
// @updateURL http://www.tipsvoorbesparen.nl/1.meta.js
// ==/UserScript==
Run Code Online (Sandbox Code Playgroud)
Bro*_*ams 23
两个问题:
目前,您的1.meta.js是:
// ==UserScript==
// @name Ibood autosubmit
// @include https://*.ibood.com/*
// @include http://*.ibood.com/*
// @include *
// @version 1.7
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @grant GM_addStyle
// @downloadURL http://www.tipsvoorbesparen.nl/1.user.js
// @updateURL http://www.tipsvoorbesparen.nl/1.meta.js
// ==/UserScript==
Run Code Online (Sandbox Code Playgroud)
注意领先的空间?
由于设计限制1, Greasemonkey无法处理其元数据块的前导空格.
当前脚本版本似乎是1.8,但元文件的版本为1.7.
~~~~~
对于您在自己网站上托管的小脚本,请不要理会@updateURL设置.这主要是为了节省带宽,尤其是在像userscripts.org这样的网站上.
没有@updateURL设置,Greasemonkey将使用/检查设置的任何内容@downloadURL.这可以节省您额外的维护工作(可能像这样的SNAFU).
最后,在一个不相关的说明,不要使用@include *!
使用@include *:
1.具体来说,GM源文件中的这一位,parseScript.js:
var gAllMetaRegexp = new RegExp(
'^// ==UserScript==([\\s\\S]*?)^// ==/UserScript==', 'm');
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13442 次 |
| 最近记录: |