new*_*bie 8 userscripts tampermonkey
在我的脚本顶部,我有以下内容:
// ==UserScript==
// @name Test script
// @description testing auto-update
// @namespace http://tampermonkey.net/
// @author newbie
// @version 1.0.0
// @updateURL https://github.com/mygithubaccount/test/raw/master/test.user.js
// @downloadURL https://github.com/mygithubaccount/test/raw/master/test.user.js
// @match http://awebsite.com/*
// @run-at document-end
// @grant GM_getResourceText
// @grant GM_addStyle
// @grant GM_xmlhttpRequest
// @grant GM_getResourceURL
// @grant GM_xmlhttpRequest
// ==/UserScript==
Run Code Online (Sandbox Code Playgroud)
请注意,这些值仅作为示例。
当我对脚本进行更改并增加 github 上的版本号,然后将更改推送到 master 时,它会更新原始脚本链接,但是我没有从 Tampermonkey 获得自动更新,就像在弹出窗口中说脚本有更新一样。只有当我手动转到链接并重新安装脚本以更新它时,它才会更新。
如何使用弹出窗口进行此自动更新?
小智 5
我不是用户脚本方面的专家,只能从我让 TamperMonkey 工作的经验中看出:
为了让 TamperMonkey 更新,我必须将 URL 复制并粘贴到更新 URL 中:在脚本的“设置”选项卡上:
(确定吗?显然,检查更新已打开。)
然后,如果您手动检查TamperMonkey 图标上的用户脚本更新,您应该会看到一个正确的弹出窗口。
| 归档时间: |
|
| 查看次数: |
4033 次 |
| 最近记录: |