mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
chore:
This commit is contained in:
13
src/background/apis/history.ts
Normal file
13
src/background/apis/history.ts
Normal 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))
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user