|
@@ -125,7 +125,12 @@ function addPinedPop() {
|
|
|
popWrapper.appendChild(img);
|
|
|
popWrapper.appendChild(contentDom);
|
|
|
|
|
|
- document.querySelector('body').appendChild(popWrapper);
|
|
|
+ let layersDom = document.getElementById('layers');
|
|
|
+ if(layersDom) {
|
|
|
+ layersDom.appendChild(popWrapper);
|
|
|
+ } else {
|
|
|
+ document.querySelector('body').appendChild(popWrapper);
|
|
|
+ }
|
|
|
|
|
|
let deCheck = document.querySelector('#de-check');
|
|
|
let deRemind = document.querySelector('#de-remind');
|
|
@@ -325,7 +330,13 @@ function _addIframe() {
|
|
|
dom.iframe = iframe;
|
|
|
let iframeContent = document.getElementById('iframe-content');
|
|
|
if (!iframeContent) {
|
|
|
- document.getElementById('layers').appendChild(iframe);
|
|
|
+ let layersDom = document.getElementById('layers');
|
|
|
+ if(layersDom) {
|
|
|
+ layersDom.appendChild(iframe);
|
|
|
+ } else {
|
|
|
+ document.querySelector('body').appendChild(iframe);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -768,13 +779,15 @@ export function init() {
|
|
|
}
|
|
|
});
|
|
|
getChromeStorage("userSettings", (res) => {
|
|
|
- addPinedPop();
|
|
|
- if (res && !res.isOnToolbar) {
|
|
|
- setTimeout(() => {
|
|
|
- showPinTips();
|
|
|
- chrome.storage.local.remove("userSettings");
|
|
|
- }, 800);
|
|
|
- }
|
|
|
+ setTimeout(() => {
|
|
|
+ addPinedPop();
|
|
|
+ if (res && !res.isOnToolbar) {
|
|
|
+ setTimeout(() => {
|
|
|
+ showPinTips();
|
|
|
+ chrome.storage.local.remove("userSettings");
|
|
|
+ }, 800);
|
|
|
+ }
|
|
|
+ }, 800);
|
|
|
});
|
|
|
}
|
|
|
|