Fix the bug that occasionally the button does not appear
This commit is contained in:
parent
01da417956
commit
ec19496e31
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name JetBra
|
// @name JetBra
|
||||||
// @namespace https://github.com/novice88/jetbra
|
// @namespace https://github.com/novice88/jetbra
|
||||||
// @version 2.1
|
// @version 3.0
|
||||||
// @license MIT
|
// @license MIT
|
||||||
// @description Add a button on the plugin homepage and click to get the plugin activation code
|
// @description Add a button on the plugin homepage and click to get the plugin activation code
|
||||||
// @author novice.li
|
// @author novice.li
|
||||||
|
@ -107,8 +107,9 @@ let addButton = async function () {
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
window.onload = function () {
|
||||||
addButton();
|
addButton();
|
||||||
|
}
|
||||||
if (window.onurlchange === null) {
|
if (window.onurlchange === null) {
|
||||||
window.addEventListener('urlchange', (info) => {
|
window.addEventListener('urlchange', (info) => {
|
||||||
addButton();
|
addButton();
|
||||||
|
|
Loading…
Reference in New Issue