9 lines
211 B
TypeScript
9 lines
211 B
TypeScript
const getIP = () =>
|
|
fetch('http://ip-api.com/json/')
|
|
.then((response) => response.json())
|
|
.then((ipData) => {
|
|
chrome.storage.sync.set({ ipData })
|
|
return ipData
|
|
})
|
|
|
|
export default getIP
|