mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 18:23:31 +00:00
Cleanup a few more safari things
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user