ソースを参照

[edit] bug fix

wenliming 2 年 前
コミット
f59d5bb090
3 ファイル変更7 行追加7 行削除
  1. 0 0
      src/iframe/popup-page.js
  2. 6 6
      src/logic/content/twitter.js
  3. 1 1
      src/manifest.json

+ 0 - 0
src/iframe/popup.js → src/iframe/popup-page.js


+ 6 - 6
src/logic/content/twitter.js

@@ -1236,10 +1236,10 @@ export const showNFTSale = () => {
 
 export const appendPopupPage = () => {
     let iframe = document.createElement('iframe');
-    iframe.id = 'de-extension-popup';
-    iframe.src = chrome.runtime.getURL('/iframe/popup.html');
+    iframe.id = 'de-popup-page';
+    iframe.src = chrome.runtime.getURL('/iframe/popup-page.html');
     iframe.style.cssText = `border: medium none; width: 375px;
-    height: 600px;position: fixed; right: 16px; top: 16px;background: #FFFFFF;border: 0.5px solid #919191;box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.2);box-sizing: border-box;display: none`
+    height: 600px;position: fixed; right: 16px; top: 16px;background: #FFFFFF;border: 0.5px solid #919191;box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.2);box-sizing: border-box;display: none;z-index: 1000;`
     let iframeContent = document.getElementById('de-extension-popup');
     if (!iframeContent) {
         document.querySelector('body').appendChild(iframe);
@@ -1248,15 +1248,15 @@ export const appendPopupPage = () => {
 
 export const showPopupPage = (params) => {
     let { path = '' } = params;
-    let iframe = document.getElementById('de-extension-popup');
+    let iframe = document.getElementById('de-popup-page');
     if (iframe) {
-        iframe.src = chrome.runtime.getURL('/iframe/popup.html') + `#${path}`;
+        iframe.src = chrome.runtime.getURL('/iframe/popup-page.html') + `#${path}`;
         iframe.style.display = 'block';
     }
 }
 
 export const hidePopupPage = () => {
-    let iframe = document.getElementById('de-extension-popup');
+    let iframe = document.getElementById('de-popup-page');
     if (iframe) {
         iframe.style.display = 'none';
     }

+ 1 - 1
src/manifest.json

@@ -69,7 +69,7 @@
                 "/iframe/bind-tweet.html",
                 "/iframe/nft-card.html",
                 "/iframe/buy-nft.html",
-                "/iframe/popup.html"
+                "/iframe/popup-page.html"
             ],
             "matches": [
                 "<all_urls>"