diff --git a/src/popup/settings/options.component.html b/src/popup/settings/options.component.html index 6104b85d84..938bcd756e 100644 --- a/src/popup/settings/options.component.html +++ b/src/popup/settings/options.component.html @@ -96,7 +96,7 @@ -
+
diff --git a/src/popup/settings/options.component.ts b/src/popup/settings/options.component.ts index 4050060617..e5cf6322bb 100644 --- a/src/popup/settings/options.component.ts +++ b/src/popup/settings/options.component.ts @@ -29,7 +29,6 @@ export class OptionsComponent implements OnInit { disableChangedPasswordNotification = false; dontShowCards = false; dontShowIdentities = false; - showDisableContextMenu = true; showClearClipboard = true; theme: string; themeOptions: any[]; @@ -68,8 +67,6 @@ export class OptionsComponent implements OnInit { } async ngOnInit() { - this.showDisableContextMenu = !this.platformUtilsService.isSafari(); - this.enableAutoFillOnPageLoad = await this.storageService.get( ConstantsService.enableAutoFillOnPageLoadKey); diff --git a/src/services/browserPlatformUtils.service.ts b/src/services/browserPlatformUtils.service.ts index 02d2f5698d..9bd99641a9 100644 --- a/src/services/browserPlatformUtils.service.ts +++ b/src/services/browserPlatformUtils.service.ts @@ -26,7 +26,7 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService return this.deviceCache; } - if (this.isSafariExtension()) { + if (navigator.userAgent.indexOf(' Safari/') !== -1) { this.deviceCache = DeviceType.SafariExtension; } else if (navigator.userAgent.indexOf(' Firefox/') !== -1 || navigator.userAgent.indexOf(' Gecko/') !== -1) { this.deviceCache = DeviceType.FirefoxExtension; @@ -237,7 +237,7 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService doc = options.doc; } - if (this.isSafariExtension()) { + if (this.isSafari()) { return await SafariApp.sendMessageToApp('readFromClipboard'); } else if (this.isFirefox() && (win as any).navigator.clipboard && (win as any).navigator.clipboard.readText) { return await (win as any).navigator.clipboard.readText(); @@ -303,8 +303,4 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService supportsSecureStorage(): boolean { return false; } - - private isSafariExtension(): boolean { - return navigator.userAgent.indexOf(' Safari/') !== -1; - } } diff --git a/src/services/browserStorage.service.ts b/src/services/browserStorage.service.ts index 8f8cf60792..689b4e5128 100644 --- a/src/services/browserStorage.service.ts +++ b/src/services/browserStorage.service.ts @@ -1,7 +1,4 @@ -import { - PlatformUtilsService, - StorageService, -} from 'jslib/abstractions'; +import { StorageService } from 'jslib/abstractions/storage.service'; export default class BrowserStorageService implements StorageService { private chromeStorageApi: any;