blob: 1dde19079cd54c14b9c4aa74ff083018cac7d49f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import { injectable } from "tsyringe";
import * as urls from "../../shared/urls";
export default interface BrowserSettingRepository {
getHomepageUrls(): Promise<string[]>;
}
@injectable()
export class BrowserSettingRepositoryImpl implements BrowserSettingRepository {
async getHomepageUrls(): Promise<string[]> {
const { value } = await browser.browserSettings.homepageOverride.get({});
return value.split("|").map(urls.normalizeUrl);
}
}
|