nieyuge 3 سال پیش
والد
کامیت
1abb35d5ff
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      src/logic/content/nft.js

+ 3 - 0
src/logic/content/nft.js

@@ -36,6 +36,9 @@ export const showNFTGroupIcon = () => {
 export const showNFTGroupList = (e) => {
     let { top, left } = getOffsetRect(e.target);
     let oTop = top + e.target.offsetHeight + 10;
+    // 居底判断
+    let wHeight = document.body.offsetHeight || document.body.clientHeight;
+    if ((top + e.target.offsetHeight + 290) > wHeight) oTop = top - 290;
     let iframe = document.createElement('iframe');
         iframe.src = chrome.runtime.getURL(`/iframe/nft-group.html`)
         iframe.style.cssText = 'border:medium none; width:315px; height:260px;';