|
@@ -794,6 +794,13 @@ export function init() {
|
|
|
getDiscordAuthCode();
|
|
|
appendPopupPage();
|
|
|
|
|
|
+ chrome.runtime.sendMessage({
|
|
|
+ actionType: "CONTENT_SET_POPUP_CONFIG",
|
|
|
+ data: {
|
|
|
+ popup: 'popup.html'
|
|
|
+ }
|
|
|
+ }, () => { });
|
|
|
+
|
|
|
let where = window.location.href.indexOf('twitter.com') < 0 && window.location.href.indexOf('facebook.com') < 0;
|
|
|
if (where) {
|
|
|
return
|
|
@@ -806,7 +813,7 @@ export function init() {
|
|
|
checkTwitterTaskState();
|
|
|
|
|
|
onBodyClick();
|
|
|
- initBuyNFT()
|
|
|
+ initBuyNFT();
|
|
|
|
|
|
getChromeStorage("popupShowPublishDialog", (res) => {
|
|
|
console.log("popupShowPublishDialog", res);
|
|
@@ -1353,6 +1360,13 @@ export const showPopupPage = (params = {}) => {
|
|
|
actionType: "CONTENT_POPUP_PAGE_SHOW",
|
|
|
data: { }
|
|
|
}, () => { });
|
|
|
+
|
|
|
+ chrome.runtime.sendMessage({
|
|
|
+ actionType: "CONTENT_SET_POPUP_CONFIG",
|
|
|
+ data: {
|
|
|
+ popup: ''
|
|
|
+ }
|
|
|
+ }, () => { });
|
|
|
|
|
|
let overlay = document.getElementById('de-popup-overlay');
|
|
|
overlay.style.display = 'block';
|
|
@@ -1376,6 +1390,14 @@ export const hidePopupPage = () => {
|
|
|
if(htmlDom) {
|
|
|
htmlDom.style.overflowY = 'auto';
|
|
|
}
|
|
|
+
|
|
|
+ chrome.runtime.sendMessage({
|
|
|
+ actionType: "CONTENT_SET_POPUP_CONFIG",
|
|
|
+ data: {
|
|
|
+ popup: 'popup.html'
|
|
|
+ }
|
|
|
+ }, () => { });
|
|
|
+
|
|
|
if(showPopupPageFrom == 'BUY_NFT_FINISH') {
|
|
|
chrome.runtime.sendMessage({
|
|
|
actionType: "CONTENT_GET_PINED",
|
|
@@ -1418,4 +1440,35 @@ const onBodyClick = () => {
|
|
|
// hidePopupPage();
|
|
|
})
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+export const setPopupConfByPopupPage = () => {
|
|
|
+ let iframe = document.getElementById('de-popup-page');
|
|
|
+ if (iframe) {
|
|
|
+ let {transform = ''} = iframe.style;
|
|
|
+
|
|
|
+ if(transform && transform == 'translateX(-395px)') {
|
|
|
+ chrome.runtime.sendMessage({
|
|
|
+ actionType: "CONTENT_SET_POPUP_CONFIG",
|
|
|
+ data: {
|
|
|
+ popup: ''
|
|
|
+ }
|
|
|
+ }, () => { });
|
|
|
+ } else {
|
|
|
+ chrome.runtime.sendMessage({
|
|
|
+ actionType: "CONTENT_SET_POPUP_CONFIG",
|
|
|
+ data: {
|
|
|
+ popup: 'popup.html'
|
|
|
+ }
|
|
|
+ }, () => { });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ chrome.runtime.sendMessage({
|
|
|
+ actionType: "CONTENT_SET_POPUP_CONFIG",
|
|
|
+ data: {
|
|
|
+ popup: 'popup.html'
|
|
|
+ }
|
|
|
+ }, () => { });
|
|
|
+ }
|
|
|
}
|