diff --git a/client/src/components/video.vue b/client/src/components/video.vue index 28014bd..763c37c 100644 --- a/client/src/components/video.vue +++ b/client/src/components/video.vue @@ -34,7 +34,7 @@
  • - + @@ -237,6 +237,10 @@ return this.$accessor.settings.scroll_invert } + get clipboard_available() { + return 'clipboard' in navigator + } + get clipboard() { return this.$accessor.remote.clipboard } @@ -310,7 +314,7 @@ @Watch('clipboard') onClipboardChanged(clipboard: string) { - if (navigator.clipboard && typeof navigator.clipboard.writeText === 'function') { + if (this.clipboard_available && typeof navigator.clipboard.writeText === 'function') { navigator.clipboard.writeText(clipboard).catch(console.error) } } @@ -428,7 +432,7 @@ return } - if (this.hosting && navigator.clipboard && typeof navigator.clipboard.readText === 'function') { + if (this.hosting && this.clipboard_available && typeof navigator.clipboard.readText === 'function') { navigator.clipboard .readText() .then(text => {