diff --git a/src/js/Clipboard.js b/src/js/Clipboard.js index 66229d5099..36f448b289 100644 --- a/src/js/Clipboard.js +++ b/src/js/Clipboard.js @@ -1,9 +1,5 @@ // naming BFClipboard to avoid conflict with Clipboard API class BFClipboard { - constructor() { - this.writeText = null; - this.readText = null; - } writeText(text, onSuccess, onError) { navigator.clipboard .writeText(text) diff --git a/src/js/tabs/cli.js b/src/js/tabs/cli.js index a161c5e5e9..5c4b1d323d 100644 --- a/src/js/tabs/cli.js +++ b/src/js/tabs/cli.js @@ -1,5 +1,5 @@ import { i18n } from "../localization"; -import Clipboard from "../Clipboard"; +import BFClipboard from "../Clipboard"; import { generateFilename } from "../utils/generate_filename"; import GUI, { TABS } from '../gui'; import BuildApi from '../BuildApi'; @@ -89,7 +89,7 @@ function copyToClipboard(text) { console.warn(ex); } - Clipboard.writeText(text, onCopySuccessful, onCopyFailed); + BFClipboard.writeText(text, onCopySuccessful, onCopyFailed); } cli.initialize = function (callback) {