|
@@ -234,7 +234,7 @@ function _publishTweetEvent(params, cb) {
|
|
|
|
|
|
function onClosePublishDialogHandle(dom, params) {
|
|
|
|
|
|
- if(params.postType == 3) {
|
|
|
+ if (params.postType == 3) {
|
|
|
return;
|
|
|
}
|
|
|
dom.querySelector('div[role="group"]').addEventListener('click', function () {
|
|
@@ -308,7 +308,7 @@ function _addDeNetEditBtn(params = {}) {
|
|
|
if (!innerDeIcon) {
|
|
|
toolElem.firstChild.appendChild(createTweetToolbarDenet())
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
let innerToolBoxIcon = document.getElementById('de-tool-box-btn-01');
|
|
|
if (!innerToolBoxIcon) {
|
|
|
toolElem.firstChild.appendChild(createTweetToolbarToolBox())
|
|
@@ -739,6 +739,10 @@ export const changeQueueNum = (num = 0) => {
|
|
|
|
|
|
let main_observer = null
|
|
|
function onChangePageMain(targetNode) {
|
|
|
+ if (main_observer) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ changeQueueNum(1)
|
|
|
try {
|
|
|
const config = { attributes: false, childList: true, subtree: true };
|
|
|
const callback = (mutationsList, observer) => {
|
|
@@ -857,10 +861,7 @@ function initParseCard() {
|
|
|
if (inTwitter && inTwitterNode) {
|
|
|
clearInterval(timer)
|
|
|
setInterval(() => {
|
|
|
- if (!main_observer) {
|
|
|
- onChangePageMain(inTwitterNode)
|
|
|
- changeQueueNum(1)
|
|
|
- }
|
|
|
+ onChangePageMain(inTwitterNode)
|
|
|
twitterPinLogin()
|
|
|
showNFTGroupIcon()
|
|
|
if (queue_num <= 0) {
|
|
@@ -878,10 +879,7 @@ function initParseCard() {
|
|
|
} else if (inFacebook && inFacebookNode) {
|
|
|
clearInterval(timer)
|
|
|
setInterval(() => {
|
|
|
- if (!main_observer) {
|
|
|
- onChangePageMain(inFacebookNode)
|
|
|
- changeQueueNum(1)
|
|
|
- }
|
|
|
+ onChangePageMain(inTwitterNode)
|
|
|
if (queue_num <= 0) {
|
|
|
return
|
|
|
}
|
|
@@ -2284,7 +2282,7 @@ const fixProfileTabAutoSwitch = () => {
|
|
|
* 设置Tab Group Iframe 样式
|
|
|
*/
|
|
|
export const setTabGroupIframeStyle = (params, isReSize = false) => {
|
|
|
- if(!isReSize) {
|
|
|
+ if (!isReSize) {
|
|
|
getSysTheme();
|
|
|
}
|
|
|
let iframeContent = getGroupTabContentNode();
|
|
@@ -2375,11 +2373,13 @@ const getSysTheme = () => {
|
|
|
const sysThemeChange = () => {
|
|
|
setTimeout(() => {
|
|
|
let bgColor = document.querySelector('body').style.backgroundColor;
|
|
|
-
|
|
|
- chrome.runtime.sendMessage({ actionType: "CONTENT_SYS_THEME_CHANGE", data: {
|
|
|
- theme: systemInfo.theme,
|
|
|
- twitterTheme: bgColor == 'rgb(0, 0, 0)' ? 'dark' : 'light'
|
|
|
- } }, () => { })
|
|
|
+
|
|
|
+ chrome.runtime.sendMessage({
|
|
|
+ actionType: "CONTENT_SYS_THEME_CHANGE", data: {
|
|
|
+ theme: systemInfo.theme,
|
|
|
+ twitterTheme: bgColor == 'rgb(0, 0, 0)' ? 'dark' : 'light'
|
|
|
+ }
|
|
|
+ }, () => { })
|
|
|
}, 800)
|
|
|
}
|
|
|
|