|
@@ -35,7 +35,7 @@ function twitterPinLogin() {
|
|
|
|
|
|
if (code) {
|
|
|
pin_login = true
|
|
|
- chrome.runtime.sendMessage({ actionType: "CONTENT_SEND_CODE", code: code.innerText }, () => { })
|
|
|
+ chrome.runtime.sendMessage({ actionType: "CONTENT_SEND_CODE", code: code.innerText })
|
|
|
// port.postMessage({ state: 'CONTENT_SEND_CODE', code: code.innerText })
|
|
|
}
|
|
|
}
|
|
@@ -46,7 +46,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 })
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -910,6 +910,8 @@ export function init() {
|
|
|
}
|
|
|
inited = true
|
|
|
console.log('init')
|
|
|
+ // 渲染dom
|
|
|
+ initParseCard()
|
|
|
twitterPinLogin()
|
|
|
getDiscordAuthCode();
|
|
|
appendPopupPage();
|
|
@@ -919,7 +921,7 @@ export function init() {
|
|
|
data: {
|
|
|
popup: 'popup.html'
|
|
|
}
|
|
|
- }, () => { });
|
|
|
+ });
|
|
|
|
|
|
let where = window.location.host.indexOf('twitter.com') < 0 && window.location.host.indexOf('facebook.com') < 0;
|
|
|
if (where) {
|
|
@@ -941,8 +943,7 @@ export function init() {
|
|
|
// 预加载全屏 toobbox
|
|
|
toolBox.initFull()
|
|
|
}
|
|
|
- // 渲染dom
|
|
|
- initParseCard()
|
|
|
+
|
|
|
|
|
|
|
|
|
getChromeStorage("popupShowPublishDialog", (res) => {
|
|
@@ -1523,14 +1524,14 @@ export const publishNFTTweetPost = ({ postId, srcContent, groupId }) => {
|
|
|
chrome.runtime.sendMessage({
|
|
|
actionType: "CONTENT_NFT_TXT_PUBLISH",
|
|
|
data: params
|
|
|
- }, () => { });
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
const contentGetNftPostPre = (data) => {
|
|
|
chrome.runtime.sendMessage({
|
|
|
actionType: "CONTENT_GET_TWITTER_NFT_POST_PRE",
|
|
|
data
|
|
|
- }, () => { });
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
let tweet_nft_content = {}
|
|
@@ -1739,14 +1740,14 @@ export const showPopupPage = (params = {}) => {
|
|
|
path,
|
|
|
showJoinGroupFinish,
|
|
|
}
|
|
|
- }, () => { });
|
|
|
+ });
|
|
|
|
|
|
chrome.runtime.sendMessage({
|
|
|
actionType: "CONTENT_SET_POPUP_CONFIG",
|
|
|
data: {
|
|
|
popup: ''
|
|
|
}
|
|
|
- }, () => { });
|
|
|
+ });
|
|
|
|
|
|
let overlay = document.getElementById('de-popup-overlay');
|
|
|
overlay.style.display = 'block';
|
|
@@ -1776,13 +1777,13 @@ export const hidePopupPage = () => {
|
|
|
data: {
|
|
|
popup: 'popup.html'
|
|
|
}
|
|
|
- }, () => { });
|
|
|
+ });
|
|
|
|
|
|
if (showPopupPageFrom == 'BUY_NFT_FINISH') {
|
|
|
chrome.runtime.sendMessage({
|
|
|
actionType: "CONTENT_GET_PINED",
|
|
|
data: {}
|
|
|
- }, () => { });
|
|
|
+ });
|
|
|
showPopupPageFrom = '';
|
|
|
}
|
|
|
}
|
|
@@ -1824,14 +1825,14 @@ export const setPopupConfByPopupPage = () => {
|
|
|
data: {
|
|
|
popup: ''
|
|
|
}
|
|
|
- }, () => { });
|
|
|
+ });
|
|
|
} else {
|
|
|
chrome.runtime.sendMessage({
|
|
|
actionType: "CONTENT_SET_POPUP_CONFIG",
|
|
|
data: {
|
|
|
popup: 'popup.html'
|
|
|
}
|
|
|
- }, () => { });
|
|
|
+ });
|
|
|
}
|
|
|
} else {
|
|
|
chrome.runtime.sendMessage({
|
|
@@ -1839,7 +1840,7 @@ export const setPopupConfByPopupPage = () => {
|
|
|
data: {
|
|
|
popup: 'popup.html'
|
|
|
}
|
|
|
- }, () => { });
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2067,6 +2068,7 @@ const onShowGroupBanner = () => {
|
|
|
}
|
|
|
break
|
|
|
}
|
|
|
+ sendResponse && sendResponse()
|
|
|
})
|
|
|
}
|
|
|
|