1
0
mirror of https://gitee.com/bitdance-team/chrome-extension synced 2025-01-31 15:30:25 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

18 lines
356 B
JavaScript
Raw Normal View History

2022-02-09 23:40:48 +08:00
chrome.storage.sync.get('sessionid', function ({ sessionid }) {
if (!sessionid) {
sessionid = uuid.v4()
console.log(sessionid)
chrome.storage.sync.set({
'sessionid': sessionid
});
}
axios.defaults.headers.common['x-tt-session-v2'] = sessionid
if (typeof sessionCb === 'function') {
sessionCb()
}
})