This commit is contained in:
Hakadao
2022-08-25 00:42:00 +08:00
parent ce33767efc
commit aa3c4a7a4e
4 changed files with 402 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
import { API_URL } from '.'
export const setupHistoryAPIs = () => {
browser.runtime.onMessage.addListener((message) => {
if (message.contentScriptQuery === 'getHistoryList') {
const url = `https://${API_URL}/x/web-interface/history/cursor`
return fetch(url)
.then(response => response.json())
.then(data => (data))
.catch(error => console.error(error))
}
})
}