summaryrefslogtreecommitdiffstats
path: root/browser/components/asrouter/tests/InflightAssetsMessageProvider.sys.mjs
blob: adb14ecc3855700a4ff9f2d3ca70ad4055e8f97a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

// This file is generated by:
// https://github.com/mozilla/messaging-system-inflight-assets/tree/master/scripts/export-all.py

export const InflightAssetsMessageProvider = {
  getMessages() {
    return [
      {
        id: "MILESTONE_MESSAGE_87",
        groups: ["cfr"],
        content: {
          anchor_id: "tracking-protection-icon-container",
          bucket_id: "CFR_MILESTONE_MESSAGE",
          buttons: {
            primary: {
              action: {
                type: "OPEN_PROTECTION_REPORT",
              },
              event: "PROTECTION",
              label: {
                string_id: "cfr-doorhanger-milestone-ok-button",
              },
            },
            secondary: [
              {
                label: {
                  string_id: "cfr-doorhanger-milestone-close-button",
                },
                action: {
                  type: "CANCEL",
                },
                event: "DISMISS",
              },
            ],
          },
          category: "cfrFeatures",
          heading_text: {
            string_id: "cfr-doorhanger-milestone-heading2",
          },
          layout: "short_message",
          notification_text: "",
          skip_address_bar_notifier: true,
          text: "",
        },
        frequency: {
          lifetime: 7,
        },
        targeting:
          "pageLoad >= 4 && firefoxVersion >= 115 && firefoxVersion < 121 && userPrefs.cfrFeatures",
        template: "milestone_message",
        trigger: {
          id: "contentBlocking",
          params: ["ContentBlockingMilestone"],
        },
      },
      {
        id: "DOH_ROLLOUT_CONFIRMATION_89",
        groups: ["cfr"],
        targeting:
          "profileAgeCreated < 1572480000000 && ( 'doh-rollout.enabled'|preferenceValue || 'doh-rollout.self-enabled'|preferenceValue || 'doh-rollout.ru.enabled'|preferenceValue || 'doh-rollout.ua.enabled'|preferenceValue ) && !( 'doh-rollout.disable-heuristics'|preferenceValue || 'doh-rollout.skipHeuristicsCheck'|preferenceValue || 'doh-rollout.doorhanger-decision'|preferenceValue ) && firefoxVersion >= 89",
        template: "infobar",
        content: {
          priority: 3,
          type: "global",
          text: {
            string_id: "cfr-doorhanger-doh-body",
          },
          buttons: [
            {
              label: {
                string_id: "cfr-doorhanger-doh-primary-button-2",
              },
              action: {
                type: "ACCEPT_DOH",
              },
              primary: true,
            },
            {
              label: {
                string_id: "cfr-doorhanger-doh-secondary-button",
              },
              action: {
                type: "DISABLE_DOH",
              },
            },
            {
              label: {
                string_id: "notification-learnmore-default-label",
              },
              supportPage: "dns-over-https",
              callback: null,
              action: {
                type: "CANCEL",
              },
            },
          ],
          bucket_id: "DOH_ROLLOUT_CONFIRMATION_89",
          category: "cfrFeatures",
        },
        frequency: {
          lifetime: 3,
        },
        trigger: {
          id: "openURL",
          patterns: ["*://*/*"],
        },
      },
      {
        id: "INFOBAR_DEFAULT_AND_PIN_87",
        groups: ["cfr"],
        content: {
          category: "cfrFeatures",
          bucket_id: "INFOBAR_DEFAULT_AND_PIN_87",
          text: {
            string_id: "default-browser-notification-message",
          },
          type: "global",
          buttons: [
            {
              label: {
                string_id: "default-browser-notification-button",
              },
              action: {
                type: "PIN_AND_DEFAULT",
              },
              primary: true,
              accessKey: "P",
            },
          ],
        },
        trigger: {
          id: "defaultBrowserCheck",
        },
        template: "infobar",
        frequency: {
          lifetime: 2,
          custom: [
            {
              period: 3024000000,
              cap: 1,
            },
          ],
        },
        targeting:
          "((firefoxVersion >= 87 && firefoxVersion < 89) || (firefoxVersion >= 89 && source == 'startup')) && !isDefaultBrowser && !'browser.shell.checkDefaultBrowser'|preferenceValue && isMajorUpgrade != true && platformName != 'linux' && ((currentDate|date - profileAgeCreated) / 604800000) >= 5 && !activeNotifications && 'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features'|preferenceValue && ((currentDate|date - profileAgeCreated) / 604800000) < 15",
      },
      {
        id: "CFR_FULL_VIDEO_SUPPORT_EN",
        groups: ["cfr"],
        targeting:
          "firefoxVersion < 88 && firefoxVersion != 78 && localeLanguageCode in ['en', 'fr', 'de', 'ru', 'zh', 'es', 'it', 'pl']",
        template: "cfr_doorhanger",
        content: {
          skip_address_bar_notifier: true,
          persistent_doorhanger: true,
          anchor_id: "PanelUI-menu-button",
          layout: "icon_and_message",
          text: {
            string_id: "cfr-doorhanger-video-support-body",
          },
          buttons: {
            secondary: [
              {
                label: {
                  string_id: "cfr-doorhanger-extension-cancel-button",
                },
                action: {
                  type: "CANCEL",
                },
              },
            ],
            primary: {
              label: {
                string_id: "cfr-doorhanger-video-support-primary-button",
              },
              action: {
                type: "OPEN_URL",
                data: {
                  args: "https://support.mozilla.org/kb/update-firefox-latest-release",
                  where: "tabshifted",
                },
              },
            },
          },
          bucket_id: "CFR_FULL_VIDEO_SUPPORT_EN",
          heading_text: {
            string_id: "cfr-doorhanger-video-support-header",
          },
          info_icon: {
            label: {
              string_id: "cfr-doorhanger-extension-sumo-link",
            },
            sumo_path: "extensionrecommendations",
          },
          notification_text: "Message from Firefox",
          category: "cfrFeatures",
        },
        frequency: {
          lifetime: 3,
        },
        trigger: {
          id: "openURL",
          patterns: ["https://*/Amazon-Video/*", "https://*/Prime-Video/*"],
          params: [
            "www.hulu.com",
            "hulu.com",
            "www.netflix.com",
            "netflix.com",
            "www.disneyplus.com",
            "disneyplus.com",
            "www.hbomax.com",
            "hbomax.com",
            "www.sho.com",
            "sho.com",
            "www.directv.com",
            "directv.com",
            "www.starzplay.com",
            "starzplay.com",
            "www.sling.com",
            "sling.com",
            "www.facebook.com",
            "facebook.com",
          ],
        },
      },
    ];
  },
};