Fix the bug that occasionally the button does not appear

This commit is contained in:
novice.li 2024-01-24 22:18:17 +08:00
parent 01da417956
commit ec19496e31
1 changed files with 4 additions and 3 deletions

View File

@ -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();