firefox-patches/disable-pocket.patch

91 lines
4.0 KiB
Diff

--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -204,7 +204,7 @@ pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.name", "chrome://browser
pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.description", "chrome://browser/locale/browser.properties");
pref("extensions.webextensions.themes.enabled", true);
-pref("extensions.webextensions.themes.icons.buttons", "back,forward,reload,stop,bookmark_star,bookmark_menu,downloads,home,app_menu,cut,copy,paste,new_window,new_private_window,save_page,print,history,full_screen,find,options,addons,developer,synced_tabs,open_file,sidebars,share_page,subscribe,text_encoding,email_link,forget,pocket");
+pref("extensions.webextensions.themes.icons.buttons", "back,forward,reload,stop,bookmark_star,bookmark_menu,downloads,home,app_menu,cut,copy,paste,new_window,new_private_window,save_page,print,history,full_screen,find,options,addons,developer,synced_tabs,open_file,sidebars,share_page,subscribe,text_encoding,email_link,forget");
pref("lightweightThemes.update.enabled", true);
pref("lightweightThemes.getMoreURL", "https://addons.mozilla.org/%LOCALE%/firefox/themes");
@@ -1656,8 +1656,6 @@ pref("browser.migrate.chrome.history.maxAgeInDays", 180);
// Enable browser frames for use on desktop. Only exposed to chrome callers.
pref("dom.mozBrowserFramesEnabled", true);
-pref("extensions.pocket.enabled", true);
-
pref("signon.schemeUpgrades", true);
// "Simplify Page" feature in Print Preview. This feature is disabled by default
--- a/browser/components/uitour/UITour.jsm
+++ b/browser/components/uitour/UITour.jsm
@@ -183,11 +183,6 @@ this.UITour = {
aDocument.getElementById(buttonId) : null;
}
}],
- ["pocket", {
- allowAdd: true,
- query: "#pocket-button",
- widgetName: "pocket-button",
- }],
["privateWindow", {
query(aDocument) {
let buttonId = gPhotonStructure ? "appMenu-private-window-button"
@@ -1367,45 +1362,6 @@ this.UITour = {
popup.addEventListener("popupshown", onPopupShown);
}
aWindow.document.getElementById("identity-box").click();
- } else if (aMenuName == "pocket") {
- this.getTarget(aWindow, "pocket").then(async function onPocketTarget(target) {
- let widgetGroupWrapper = CustomizableUI.getWidget(target.widgetName);
- if (widgetGroupWrapper.type != "view" || !widgetGroupWrapper.viewId) {
- log.error("Can't open the pocket menu without a view");
- return;
- }
- let placement = CustomizableUI.getPlacementOfWidget(target.widgetName);
- if (!placement || !placement.area) {
- log.error("Can't open the pocket menu without a placement");
- return;
- }
-
- if (placement.area == CustomizableUI.AREA_PANEL) {
- // Open the appMenu and wait for it if it's not already opened or showing a subview.
- await new Promise((resolve, reject) => {
- if (aWindow.PanelUI.panel.state != "closed") {
- if (aWindow.PanelUI.multiView.showingSubView) {
- reject("A subview is already showing");
- return;
- }
-
- resolve();
- return;
- }
-
- aWindow.PanelUI.panel.addEventListener("popupshown", function() {
- resolve();
- }, {once: true});
-
- aWindow.PanelUI.show();
- });
- }
-
- let widgetWrapper = widgetGroupWrapper.forWindow(aWindow);
- aWindow.PanelUI.showSubView(widgetGroupWrapper.viewId,
- widgetWrapper.anchor,
- placement.area);
- }).catch(log.error);
} else if (aMenuName == "urlbar") {
this.getTarget(aWindow, "urlbar").then(target => {
let urlbar = target.node;
--- a/browser/extensions/moz.build
+++ b/browser/extensions/moz.build
@@ -13,7 +13,6 @@ DIRS += [
'formautofill',
'onboarding',
'pdfjs',
- 'pocket',
'screenshots',
'shield-recipe-client',
'webcompat',