1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +01:00

implement copyToClipboard device utils

This commit is contained in:
Kyle Spearrin 2018-02-16 14:00:41 -05:00
parent b7fb8c43b9
commit 7724fe6815

View File

@ -6,6 +6,8 @@ import { DeviceType } from 'jslib/enums';
import { PlatformUtilsService } from 'jslib/abstractions';
import { UtilsService } from 'jslib/services';
const AnalyticsIds = {
[DeviceType.Chrome]: 'UA-81915606-6',
[DeviceType.Firefox]: 'UA-81915606-7',
@ -170,6 +172,11 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
return true;
}
copyToClipboard(text: string, options?: any): void {
const doc = options ? options.doc : null;
UtilsService.copyToClipboard(text, doc);
}
private sidebarViewName(): string {
if ((window as any).chrome.sidebarAction && this.isFirefox()) {
return 'sidebar';