【问题标题】:Tampermonkey script not auto-updatingTampermonkey 脚本不会自动更新
【发布时间】:2018-08-29 18:35:03
【问题描述】:

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

// ==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 获得自动更新,因为在弹出窗口中说脚本有更新。只有当我手动转到链接并重新安装脚本来更新它时,它才会更新。

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

【问题讨论】:

  • 我认为如果你在 TM 的 github repo 或他们的论坛上发帖,你将有更好的机会解决它。

标签: userscripts tampermonkey


【解决方案1】:

我不是用户脚本方面的专家,只能从我制作 TamperMonkey 的经验来看:

为了更新 TamperMonkey,我必须将 URL 复制并粘贴到脚本的 Settings 选项卡上的 Update URL: 中:

(确保☒ 检查更新显然已打开。)

然后,如果您在 TamperMonkey 图标上手动检查用户脚本更新,您应该会看到一个正确的弹出窗口。

【讨论】:

  • 这个提示是金子!由于出现拼写错误,安装后我在脚本中更改了// @updateURL ...,但 SettingsUpdatesUpdate URL: i> [...] 没有相应改变。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-11-15
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多