|
@@ -125,7 +125,7 @@ export function hidePinTips() {
|
|
|
hidePopupPage();
|
|
|
hideNoticeBindTweet();
|
|
|
let pop = document.querySelector('#de-pin-pop');
|
|
|
- if(pop) {
|
|
|
+ if (pop) {
|
|
|
pop.style.display = 'none';
|
|
|
}
|
|
|
}
|
|
@@ -1207,10 +1207,8 @@ export const showBuyNFT = ({ nft_project_Id }) => {
|
|
|
return
|
|
|
}
|
|
|
let iframe = document.querySelector('#nftProjectId')
|
|
|
- if(!iframe.src.includes(nft_project_Id)){
|
|
|
- iframe.src = chrome.runtime.getURL(`/iframe/buy-nft.html?nftProjectId=${nft_project_Id}`)
|
|
|
- }
|
|
|
iframe.style.display = 'block'
|
|
|
+ iframe.src = chrome.runtime.getURL(`/iframe/buy-nft.html?nftProjectId=${nft_project_Id}`)
|
|
|
}
|
|
|
|
|
|
const initBuyNFT = () => {
|
|
@@ -1229,11 +1227,11 @@ export const showNFTCard = () => {
|
|
|
let where = isTwitter && userElem && tabIndex;
|
|
|
if (where) {
|
|
|
let iframe = document.createElement('iframe');
|
|
|
- iframe.src = chrome.runtime.getURL(`/iframe/nft-card.html`)
|
|
|
- iframe.style.cssText = 'border:medium none; width:100%; height:297px;';
|
|
|
+ iframe.src = chrome.runtime.getURL(`/iframe/nft-card.html`)
|
|
|
+ iframe.style.cssText = 'border:medium none; width:100%; height:297px;';
|
|
|
let nftElement = document.createElement('div');
|
|
|
- nftElement.id = 'de-nft-node';
|
|
|
- nftElement.innerHTML = `
|
|
|
+ nftElement.id = 'de-nft-node';
|
|
|
+ nftElement.innerHTML = `
|
|
|
${iframe.outerHTML}
|
|
|
<style>
|
|
|
#de-nft-node {height:297px; margin-bottom:17px; display:none;}
|
|
@@ -1266,7 +1264,7 @@ export const appendPopupPage = (params) => {
|
|
|
|
|
|
export const showPopupPage = (params) => {
|
|
|
let { path = '' } = params;
|
|
|
- appendPopupPage({path});
|
|
|
+ appendPopupPage({ path });
|
|
|
}
|
|
|
|
|
|
export const hidePopupPage = () => {
|
|
@@ -1279,7 +1277,7 @@ export const hidePopupPage = () => {
|
|
|
}
|
|
|
|
|
|
const onBodyClick = () => {
|
|
|
- document.querySelector('body').addEventListener('click', function() {
|
|
|
+ document.querySelector('body').addEventListener('click', function () {
|
|
|
hidePopupPage();
|
|
|
})
|
|
|
}
|