|
@@ -23,7 +23,7 @@ function getDiscordAuthCode() {
|
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
|
const code = urlParams.get('code');
|
|
|
if (code) {
|
|
|
- chrome.runtime.sendMessage({ actionType: "CONTENT_SEND_DISCORD_AUTH_CODE", code}, () => { })
|
|
|
+ chrome.runtime.sendMessage({ actionType: "CONTENT_SEND_DISCORD_AUTH_CODE", code }, () => { })
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -458,18 +458,16 @@ function onWindowResize() {
|
|
|
}
|
|
|
|
|
|
function checkHasDeBtn() {
|
|
|
- setInterval(() => {
|
|
|
- try {
|
|
|
- let toolBar = document.querySelector('div[data-testid="toolBar"]');
|
|
|
- let innerDeIcon = document.getElementById('de-btn1');
|
|
|
- if (toolBar && !innerDeIcon) {
|
|
|
- let dialogScheduleBtn = _getScheduleDom(false);
|
|
|
- _addDeNetEditBtn(dialogScheduleBtn, dom.deBtn1);
|
|
|
- }
|
|
|
- } catch (e) {
|
|
|
- console.log(e)
|
|
|
+ try {
|
|
|
+ let toolBar = document.querySelector('div[data-testid="toolBar"]');
|
|
|
+ let innerDeIcon = document.getElementById('de-btn1');
|
|
|
+ if (toolBar && !innerDeIcon) {
|
|
|
+ let dialogScheduleBtn = _getScheduleDom(false);
|
|
|
+ _addDeNetEditBtn(dialogScheduleBtn, dom.deBtn1);
|
|
|
}
|
|
|
- }, 1000)
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -526,7 +524,6 @@ function onChangePageMain(targetNode) {
|
|
|
try {
|
|
|
const config = { attributes: false, childList: true, subtree: true };
|
|
|
const callback = (mutationsList, observer) => {
|
|
|
- console.log('watch',mutationsList)
|
|
|
changeQueueNum(1)
|
|
|
}
|
|
|
main_observer = new MutationObserver(callback);
|
|
@@ -604,6 +601,7 @@ export function init() {
|
|
|
return
|
|
|
}
|
|
|
setIframeRedPacket()
|
|
|
+ checkHasDeBtn()
|
|
|
changeQueueNum(-1)
|
|
|
}, 1000)
|
|
|
}
|