|
@@ -29,9 +29,6 @@ chrome.storage.onChanged.addListener(changes => {
|
|
let item = JSON.parse(changes.executeScript.newValue)
|
|
let item = JSON.parse(changes.executeScript.newValue)
|
|
if (item.executeScript) {
|
|
if (item.executeScript) {
|
|
init()
|
|
init()
|
|
- setTimeout(() => {
|
|
|
|
- addPinedPop();
|
|
|
|
- }, 600)
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -40,12 +37,12 @@ window.onload = () => {
|
|
init()
|
|
init()
|
|
};
|
|
};
|
|
|
|
|
|
-function init(isOnToolbar = true) {
|
|
|
|
|
|
+function init() {
|
|
if (window.location.href.indexOf('twitter.com') < 0) {
|
|
if (window.location.href.indexOf('twitter.com') < 0) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
contentTwitterPinLogin(port);
|
|
contentTwitterPinLogin(port);
|
|
- renderDom(port, isOnToolbar);
|
|
|
|
|
|
+ renderDom(port);
|
|
setIframeRedPacket();
|
|
setIframeRedPacket();
|
|
|
|
|
|
getChromeStorage("popupShowPublishDialog", (res) => {
|
|
getChromeStorage("popupShowPublishDialog", (res) => {
|
|
@@ -60,6 +57,14 @@ function init(isOnToolbar = true) {
|
|
chrome.storage.local.remove("popupShowPublishDialog");
|
|
chrome.storage.local.remove("popupShowPublishDialog");
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ getChromeStorage("userSettings", (res) => {
|
|
|
|
+ if (res && !res.isOnToolbar) {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ addPinedPop();
|
|
|
|
+ chrome.storage.local.remove("userSettings");
|
|
|
|
+ }, 800);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
window.onmessage = (res) => {
|
|
window.onmessage = (res) => {
|