|
@@ -176,7 +176,10 @@ function _addDeNetEditBtn(parent, dom, isClick = false) {
|
|
|
businessType: Report.businessType.buttonView,
|
|
|
objectType: Report.objectType.buttonSecond
|
|
|
});
|
|
|
- parent.parentNode.insertBefore(dom, parent.nextElementSibling);
|
|
|
+ let innerDeIcon = document.getElementById('de-btn1');
|
|
|
+ if (!innerDeIcon) {
|
|
|
+ parent.parentNode.insertBefore(dom, parent.nextElementSibling);
|
|
|
+ }
|
|
|
}
|
|
|
}, 1000)
|
|
|
}
|
|
@@ -286,7 +289,7 @@ function _deNetBtnClick() {
|
|
|
setTimeout(() => {
|
|
|
dom.loadingImg.style.transform = 'rotate(0deg)'
|
|
|
dom.deBtn.innerHTML = '<span>DeNet<span>';
|
|
|
- }, 3000)
|
|
|
+ }, 2000)
|
|
|
|
|
|
chrome.runtime.sendMessage({ actionType: "CONTENT_TWITTER_LOGIN", data: '1' }, (res) => { console.log(res) })
|
|
|
}
|
|
@@ -299,7 +302,7 @@ function _deNetBtnClick() {
|
|
|
* @private
|
|
|
*/
|
|
|
let isSetContent = false;
|
|
|
-function _setPublishContent(content) {
|
|
|
+const _setPublishContent = throttle(function (content) {
|
|
|
if (!isSetContent) {
|
|
|
isSetContent = true;
|
|
|
setTimeout(() => {
|
|
@@ -309,7 +312,7 @@ function _setPublishContent(content) {
|
|
|
}, 2000)
|
|
|
}, 1000);
|
|
|
}
|
|
|
-}
|
|
|
+}, 800);
|
|
|
|
|
|
/**
|
|
|
* 创建deNet按钮 添加到页面
|