Greasemonkey显示警报一次

时间:2015-09-01 15:48:25

标签: javascript greasemonkey tampermonkey

首次加载greasemonkey脚本时,是否只能显示一次警报?我希望它告诉用户脚本已升级到新版本。

1 个答案:

答案 0 :(得分:1)

阅读最后存储的版本并检查实际版本:

+++++ request_hiscores_for() running +++++10032
<type 'str'>
 using request_hiscores_for()32
 using request_hiscores_for()32
  Requesting hiscores for BLA using request_hiscores_for()
----- request_hiscores_for() ending ------

+++++ request_hiscores_for() running +++++123 Lvs 2 Go
<type 'str'>
 using request_hiscores_for() Lvs 2 Go
 using request_hiscores_for() Lvs 2 Go
  Requesting hiscores for BLA using request_hiscores_for()
----- request_hiscores_for() ending ------

当您更改脚本时,当然应该更新所有三个版本实例。