import { Injectable } from 'angular-ts-decorators' ; import autobind from 'autobind-decorator' ; import { BrowserName , PlatformType } from '../../../../shared/global-shared.enum' ; import { WebExtPlatformService } from '../../../shared/webext-platform/webext-platform.service' ; @ autobind @ Injectable ( 'PlatformService' ) export class ChromiumPlatformService extends WebExtPlatformService { platformName = PlatformType . Chromium ; getNewTabUrl ( ) { const browserName = this . utilitySvc . getBrowserName ( ) ; switch ( browserName ) { case BrowserName . Edge : return 'edge://newtab/' ; default : return 'chrome://newtab/' ; } } urlIsNativeConfigPage ( url ) { return /(chrome|edge):\/\//i . test ( url ?? '' ) ; } urlIsSupported ( url ) { return /^[\w-]+:/i . test ( url ?? '' ) ; } }