|
@@ -928,6 +928,7 @@ export function init() {
|
|
|
}
|
|
|
|
|
|
if (window.location.host.includes('twitter.com')) {
|
|
|
+ onPageVisbile();
|
|
|
renderDom();
|
|
|
showNFTCard()
|
|
|
showNFTGroupIcon()
|
|
@@ -971,6 +972,24 @@ export function init() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+function onPageVisbile() {
|
|
|
+ document.addEventListener('visibilitychange', function () {
|
|
|
+ let isHidden = document.hidden;
|
|
|
+ if (!isHidden) {
|
|
|
+ depositUSShowPopupPage();
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+const depositUSShowPopupPage = async () => {
|
|
|
+ let {form = ''} = await getChromeStorage('achPayData') || {};
|
|
|
+ if(form == 'popupPage') {
|
|
|
+ showPopupPage();
|
|
|
+ chrome.storage.local.remove("achPayData");
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
function checkHasSliderDeBtn() {
|
|
|
let deBtn = document.getElementById('de-btn');
|
|
|
let deBtn3 = document.getElementById('de-btn3');
|