|
@@ -23,13 +23,13 @@ port.onMessage.addListener(function (res) {
|
|
|
case "BACK_TWITTER_LOGIN_SUCCESS":
|
|
|
showGiveDialogHandler();
|
|
|
break;
|
|
|
- // case "BACK_TWITTER_SHORT_LINK":
|
|
|
- // console.log('BACK_TWITTER_SHORT_LINK', res)
|
|
|
- // console.log('needBind', bindTwitterArt.needBind)
|
|
|
- // if (bindTwitterArt.needBind) {
|
|
|
- // bindTwitterArtMethod({ postId: res.post_id, twitterId: res.tweet_id });
|
|
|
- // }
|
|
|
- // break
|
|
|
+ case "BACK_TWITTER_SHORT_LINK":
|
|
|
+ console.log('BACK_TWITTER_SHORT_LINK', res)
|
|
|
+ console.log('needBind', bindTwitterArt.needBind)
|
|
|
+ if (bindTwitterArt.needBind) {
|
|
|
+ bindTwitterArtMethod({ postId: res.post_id, twitterId: res.tweet_id });
|
|
|
+ }
|
|
|
+ break
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -40,14 +40,14 @@ chrome.storage.onChanged.addListener(changes => {
|
|
|
init()
|
|
|
}
|
|
|
}
|
|
|
- if (bindTwitterArt.needBind) {
|
|
|
- let item = JSON.parse(changes.sortLink.newValue)
|
|
|
- for (let i in item) {
|
|
|
- if (item[i].tweet_id) {
|
|
|
- bindTwitterArtMethod({ postId: item[i].post_id, twitterId: item[i].tweet_id });
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ // if (bindTwitterArt.needBind) {
|
|
|
+ // let item = JSON.parse(changes.sortLink.newValue)
|
|
|
+ // for (let i in item) {
|
|
|
+ // if (item[i].tweet_id) {
|
|
|
+ // bindTwitterArtMethod({ postId: item[i].post_id, twitterId: item[i].tweet_id });
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
})
|
|
|
|
|
|
window.onload = () => {
|