1
0
mirror of https://gitee.com/bitdance-team/chrome-extension synced 2025-01-31 07:20:26 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
2022-02-09 23:40:48 +08:00

18 lines
356 B
JavaScript

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()
}
})