Syncrhonize apiClient with chrome storage
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
import DomainCheck from "./services/DomainCheck"
|
||||
import apiClient from "api/client"
|
||||
import config from "./config"
|
||||
|
||||
apiClient.registerStorage(chrome.storage)
|
||||
apiClient.setClientVersion(chrome.runtime.getManifest().version)
|
||||
|
||||
const domainCheck = new DomainCheck(config)
|
||||
|
||||
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
|
||||
// inject files only after the page is fully loaded
|
||||
// run only after the page is fully loaded
|
||||
if (changeInfo.status != "complete") {
|
||||
return
|
||||
}
|
||||
|
||||
// inject files only for supported services
|
||||
const service = domainCheck.match(tab.url)
|
||||
|
||||
if (service) {
|
||||
|
||||
Reference in New Issue
Block a user