diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-02-20 11:01:30 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-02-20 11:01:30 +0100 |
commit | e3d81b698ea104e4b55ee618b931ea1311c04169 (patch) | |
tree | b85ef8d4c62f7ea3e964be1346c8fdeb929c0f3b /toolkit/content | |
parent | 0a8530b91630440aa2f478d729cd7b92128883c4 (diff) | |
download | uxp-e3d81b698ea104e4b55ee618b931ea1311c04169.tar.gz |
Issue #1383 - Remove "Copy raw data to clipboard" button
This resolves #1383
Diffstat (limited to 'toolkit/content')
-rw-r--r-- | toolkit/content/aboutSupport.js | 39 | ||||
-rw-r--r-- | toolkit/content/aboutSupport.xhtml | 3 |
2 files changed, 0 insertions, 42 deletions
diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js index 4e58bbef9a..f49172230e 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 fff86dff67..0b7b52164d 100644 --- a/toolkit/content/aboutSupport.xhtml +++ b/toolkit/content/aboutSupport.xhtml @@ -61,9 +61,6 @@ </div> <div> - <button id="copy-raw-data-to-clipboard"> - &aboutSupport.copyRawDataToClipboard.label; - </button> <button id="copy-to-clipboard"> &aboutSupport.copyTextToClipboard.label; </button> |