Remove "Copy raw data to clipboard" button.
This commit is contained in:
parent
4d1a6e03dd
commit
fb6f3ef045
|
@ -564,42 +564,6 @@ function sortedArrayFromObject(obj) {
|
||||||
return tuples;
|
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() {
|
function getLoadContext() {
|
||||||
return window.QueryInterface(Ci.nsIInterfaceRequestor)
|
return window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
.getInterface(Ci.nsIWebNavigation)
|
.getInterface(Ci.nsIWebNavigation)
|
||||||
|
@ -912,9 +876,6 @@ function setupEventListeners() {
|
||||||
$("reset-box-button").addEventListener("click", function(event) {
|
$("reset-box-button").addEventListener("click", function(event) {
|
||||||
ResetProfile.openConfirmationDialog(window);
|
ResetProfile.openConfirmationDialog(window);
|
||||||
});
|
});
|
||||||
$("copy-raw-data-to-clipboard").addEventListener("click", function(event) {
|
|
||||||
copyRawDataToClipboard(this);
|
|
||||||
});
|
|
||||||
$("copy-to-clipboard").addEventListener("click", function(event) {
|
$("copy-to-clipboard").addEventListener("click", function(event) {
|
||||||
copyContentsToClipboard();
|
copyContentsToClipboard();
|
||||||
});
|
});
|
||||||
|
|
|
@ -61,9 +61,6 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button id="copy-raw-data-to-clipboard">
|
|
||||||
&aboutSupport.copyRawDataToClipboard.label;
|
|
||||||
</button>
|
|
||||||
<button id="copy-to-clipboard">
|
<button id="copy-to-clipboard">
|
||||||
&aboutSupport.copyTextToClipboard.label;
|
&aboutSupport.copyTextToClipboard.label;
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -106,7 +106,6 @@ variant of aboutSupport.showDir.label. -->
|
||||||
<!ENTITY aboutSupport.updateHistoryTitle "Update History">
|
<!ENTITY aboutSupport.updateHistoryTitle "Update History">
|
||||||
|
|
||||||
<!ENTITY aboutSupport.copyTextToClipboard.label "Copy text to clipboard">
|
<!ENTITY aboutSupport.copyTextToClipboard.label "Copy text to clipboard">
|
||||||
<!ENTITY aboutSupport.copyRawDataToClipboard.label "Copy raw data to clipboard">
|
|
||||||
|
|
||||||
<!ENTITY aboutSupport.safeModeTitle "Try Safe Mode">
|
<!ENTITY aboutSupport.safeModeTitle "Try Safe Mode">
|
||||||
<!ENTITY aboutSupport.restartInSafeMode.label "Restart in Safe Mode…">
|
<!ENTITY aboutSupport.restartInSafeMode.label "Restart in Safe Mode…">
|
||||||
|
|
|
@ -33,10 +33,6 @@ pendingReports=All Crash Reports (including #1 pending crash in the given time r
|
||||||
# "GPU Accelerated Windows: 0/2"
|
# "GPU Accelerated Windows: 0/2"
|
||||||
acceleratedWindows = GPU Accelerated Windows
|
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
|
# LOCALIZATION NOTE (textCopied) Text displayed in a mobile "Toast" to user when the
|
||||||
# text is successfully copied to the clipboard via button press.
|
# text is successfully copied to the clipboard via button press.
|
||||||
textCopied=Text copied to clipboard
|
textCopied=Text copied to clipboard
|
||||||
|
|
Loading…
Reference in New Issue
Block a user