import { injectable } from "tsyringe"; import * as urls from "../../shared/urls"; export default interface BrowserSettingRepository { getHomepageUrls(): Promise; } @injectable() export class BrowserSettingRepositoryImpl implements BrowserSettingRepository { async getHomepageUrls(): Promise { const { value } = await browser.browserSettings.homepageOverride.get({}); return value.split("|").map(urls.normalizeUrl); } }