Tampermonkey脚本不自动更新

问题描述 投票:0回答:1

在我的脚本的顶部,我有以下内容:

// ==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==

请注意,这些值仅作为示例。

当我对脚本进行更改并增加github上的版本号然后将更改推送到master时它会更新原始脚本链接,但是我没有从Tampermonkey获得自动更新,就像弹出窗口中说脚本有更新一样。只有在我手动转到链接并重新安装脚本才能更新它时,它才会更新。

如何使用弹出窗口进行自动更新?

userscripts tampermonkey
1个回答
0
投票

我不是usercript的专家,只能从我的篡改猴子工作经验中得知:

为了更新篡改猴子,我不得不将脚本的设置选项卡上的网址粘贴到Update URLhere is a screenshot

(确保明天打开Check updates

然后,如果你在篡改猴子图标上手动Check for userscript updates,你应该看到一个正确的弹出窗口。

© www.soinside.com 2019 - 2024. All rights reserved.