summaryrefslogtreecommitdiffstats
path: root/browser/components/newtab/content-src/lib
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /browser/components/newtab/content-src/lib
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/newtab/content-src/lib')
-rw-r--r--browser/components/newtab/content-src/lib/link-menu-options.mjs64
1 files changed, 64 insertions, 0 deletions
diff --git a/browser/components/newtab/content-src/lib/link-menu-options.mjs b/browser/components/newtab/content-src/lib/link-menu-options.mjs
index f10a5e34c6..23dcf8b050 100644
--- a/browser/components/newtab/content-src/lib/link-menu-options.mjs
+++ b/browser/components/newtab/content-src/lib/link-menu-options.mjs
@@ -306,4 +306,68 @@ export const LinkMenuOptions = {
: LinkMenuOptions.EmptyItem(),
OpenInPrivateWindow: (site, index, eventSource, isEnabled) =>
isEnabled ? _OpenInPrivateWindow(site) : LinkMenuOptions.EmptyItem(),
+ ChangeWeatherLocation: () => ({
+ id: "newtab-weather-menu-change-location",
+ action: ac.OnlyToMain({
+ type: at.CHANGE_WEATHER_LOCATION,
+ data: { url: "https://mozilla.org" },
+ }),
+ }),
+ ChangeWeatherDisplaySimple: () => ({
+ id: "newtab-weather-menu-change-weather-display-simple",
+ action: ac.OnlyToMain({
+ type: at.SET_PREF,
+ data: {
+ name: "weather.display",
+ value: "simple",
+ },
+ }),
+ }),
+ ChangeWeatherDisplayDetailed: () => ({
+ id: "newtab-weather-menu-change-weather-display-detailed",
+ action: ac.OnlyToMain({
+ type: at.SET_PREF,
+ data: {
+ name: "weather.display",
+ value: "detailed",
+ },
+ }),
+ }),
+ ChangeTempUnitFahrenheit: () => ({
+ id: "newtab-weather-menu-change-temperature-units-fahrenheit",
+ action: ac.OnlyToMain({
+ type: at.SET_PREF,
+ data: {
+ name: "weather.temperatureUnits",
+ value: "f",
+ },
+ }),
+ }),
+ ChangeTempUnitCelsius: () => ({
+ id: "newtab-weather-menu-change-temperature-units-celsius",
+ action: ac.OnlyToMain({
+ type: at.SET_PREF,
+ data: {
+ name: "weather.temperatureUnits",
+ value: "c",
+ },
+ }),
+ }),
+ HideWeather: () => ({
+ id: "newtab-weather-menu-hide-weather",
+ action: ac.OnlyToMain({
+ type: at.SET_PREF,
+ data: {
+ name: "showWeather",
+ value: false,
+ },
+ }),
+ }),
+ OpenLearnMoreURL: site => ({
+ id: "newtab-weather-menu-learn-more",
+ action: ac.OnlyToMain({
+ type: at.OPEN_LINK,
+ data: { url: site.url },
+ }),
+ }),
};