From ec19496e31a02502b35a871af1ff997d968c5368 Mon Sep 17 00:00:00 2001 From: "novice.li" Date: Wed, 24 Jan 2024 22:18:17 +0800 Subject: [PATCH] Fix the bug that occasionally the button does not appear --- jetbra.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jetbra.js b/jetbra.js index d73e9cd..0a36196 100644 --- a/jetbra.js +++ b/jetbra.js @@ -1,7 +1,7 @@ // ==UserScript== // @name JetBra // @namespace https://github.com/novice88/jetbra -// @version 2.1 +// @version 3.0 // @license MIT // @description Add a button on the plugin homepage and click to get the plugin activation code // @author novice.li @@ -107,8 +107,9 @@ let addButton = async function () { }); }) }; - -addButton(); +window.onload = function () { + addButton(); +} if (window.onurlchange === null) { window.addEventListener('urlchange', (info) => { addButton();