From 28f0155307b8182653e31c1dd969828bbb0249f0 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Thu, 20 Feb 2020 11:01:30 +0100 Subject: Issue #1383 - Remove "Copy raw data to clipboard" button This resolves #1383 --- toolkit/content/aboutSupport.js | 39 ---------------------- toolkit/content/aboutSupport.xhtml | 3 -- .../locales/en-US/chrome/global/aboutSupport.dtd | 1 - .../en-US/chrome/global/aboutSupport.properties | 4 --- 4 files changed, 47 deletions(-) diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js index 4e58bbef9..f49172230 100644 --- a/toolkit/content/aboutSupport.js +++ b/toolkit/content/aboutSupport.js @@ -564,42 +564,6 @@ function sortedArrayFromObject(obj) { return tuples; } -function copyRawDataToClipboard(button) { - if (button) - button.disabled = true; - try { - Troubleshoot.snapshot(function (snapshot) { - if (button) - button.disabled = false; - let str = Cc["@mozilla.org/supports-string;1"]. - createInstance(Ci.nsISupportsString); - str.data = JSON.stringify(snapshot, undefined, 2); - let transferable = Cc["@mozilla.org/widget/transferable;1"]. - createInstance(Ci.nsITransferable); - transferable.init(getLoadContext()); - transferable.addDataFlavor("text/unicode"); - transferable.setTransferData("text/unicode", str, str.data.length * 2); - Cc["@mozilla.org/widget/clipboard;1"]. - getService(Ci.nsIClipboard). - setData(transferable, null, Ci.nsIClipboard.kGlobalClipboard); -#ifdef MOZ_WIDGET_ANDROID - // Present a toast notification. - let message = { - type: "Toast:Show", - message: stringBundle().GetStringFromName("rawDataCopied"), - duration: "short" - }; - Services.androidBridge.handleGeckoMessage(message); -#endif - }); - } - catch (err) { - if (button) - button.disabled = false; - throw err; - } -} - function getLoadContext() { return window.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebNavigation) @@ -912,9 +876,6 @@ function setupEventListeners() { $("reset-box-button").addEventListener("click", function(event) { ResetProfile.openConfirmationDialog(window); }); - $("copy-raw-data-to-clipboard").addEventListener("click", function(event) { - copyRawDataToClipboard(this); - }); $("copy-to-clipboard").addEventListener("click", function(event) { copyContentsToClipboard(); }); diff --git a/toolkit/content/aboutSupport.xhtml b/toolkit/content/aboutSupport.xhtml index fff86dff6..0b7b52164 100644 --- a/toolkit/content/aboutSupport.xhtml +++ b/toolkit/content/aboutSupport.xhtml @@ -61,9 +61,6 @@
- diff --git a/toolkit/locales/en-US/chrome/global/aboutSupport.dtd b/toolkit/locales/en-US/chrome/global/aboutSupport.dtd index 34db4e4c4..02eb34664 100644 --- a/toolkit/locales/en-US/chrome/global/aboutSupport.dtd +++ b/toolkit/locales/en-US/chrome/global/aboutSupport.dtd @@ -106,7 +106,6 @@ variant of aboutSupport.showDir.label. --> - diff --git a/toolkit/locales/en-US/chrome/global/aboutSupport.properties b/toolkit/locales/en-US/chrome/global/aboutSupport.properties index e780bfb67..46e445f66 100644 --- a/toolkit/locales/en-US/chrome/global/aboutSupport.properties +++ b/toolkit/locales/en-US/chrome/global/aboutSupport.properties @@ -33,10 +33,6 @@ pendingReports=All Crash Reports (including #1 pending crash in the given time r # "GPU Accelerated Windows: 0/2" acceleratedWindows = GPU Accelerated Windows -# LOCALIZATION NOTE (rawDataCopied) Text displayed in a mobile "Toast" to user when the -# raw data is successfully copied to the clipboard via button press. -rawDataCopied=Raw data copied to clipboard - # LOCALIZATION NOTE (textCopied) Text displayed in a mobile "Toast" to user when the # text is successfully copied to the clipboard via button press. textCopied=Text copied to clipboard -- cgit v1.2.3