Bug 1853560 - Check for presence of pocket button before deletion. r=mhowell

Differential Revision: https://phabricator.services.mozilla.com/D188539
This commit is contained in:
DJ
2023-09-19 14:41:14 +00:00
parent 242b58fc81
commit efe4fe2665

View File

@@ -8379,7 +8379,13 @@ var gPrivateBrowsingUI = {
// Bug 1846583 - hide pocket button in PBM
if (gUseFeltPrivacyUI) {
document.getElementById("save-to-pocket-button").remove();
const saveToPocketButton = document.getElementById(
"save-to-pocket-button"
);
if (saveToPocketButton) {
saveToPocketButton.remove();
document.documentElement.setAttribute("pocketdisabled", "true");
}
}
if (PrivateBrowsingUtils.permanentPrivateBrowsing) {