From 7724fe68153c0203e43ef227e93f3734926ca800 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 16 Feb 2018 14:00:41 -0500 Subject: [PATCH] implement copyToClipboard device utils --- src/services/browserPlatformUtils.service.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/services/browserPlatformUtils.service.ts b/src/services/browserPlatformUtils.service.ts index 859ac29513..79b9c3b5d8 100644 --- a/src/services/browserPlatformUtils.service.ts +++ b/src/services/browserPlatformUtils.service.ts @@ -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';