tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

InflightAssetsMessageProvider.sys.mjs (7432B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
      4 */
      5 
      6 // This file is generated by:
      7 // https://github.com/mozilla/messaging-system-inflight-assets/tree/master/scripts/export-all.py
      8 
      9 export const InflightAssetsMessageProvider = {
     10  getMessages() {
     11    return [
     12      {
     13        id: "MILESTONE_MESSAGE_87",
     14        groups: [
     15          "cfr"
     16        ],
     17        content: {
     18          anchor_id: "tracking-protection-icon-container",
     19          bucket_id: "CFR_MILESTONE_MESSAGE",
     20          buttons: {
     21            primary: {
     22              action: {
     23                type: "OPEN_PROTECTION_REPORT"
     24              },
     25              event: "PROTECTION",
     26              label: {
     27                string_id: "cfr-doorhanger-milestone-ok-button"
     28              }
     29            },
     30            secondary: [
     31              {
     32                label: {
     33                  string_id: "cfr-doorhanger-milestone-close-button"
     34                },
     35                action: {
     36                  type: "CANCEL"
     37                },
     38                event: "DISMISS"
     39              }
     40            ]
     41          },
     42          category: "cfrFeatures",
     43          heading_text: {
     44            string_id: "cfr-doorhanger-milestone-heading2"
     45          },
     46          layout: "short_message",
     47          notification_text: "",
     48          skip_address_bar_notifier: true,
     49          text: ""
     50        },
     51        frequency: {
     52          lifetime: 7
     53        },
     54        targeting: "pageLoad >= 4 && firefoxVersion >= 115 && firefoxVersion < 121 && userPrefs.cfrFeatures",
     55        template: "milestone_message",
     56        trigger: {
     57          id: "contentBlocking",
     58          params: [
     59            "ContentBlockingMilestone"
     60          ]
     61        }
     62      },
     63      {
     64        id: "DOH_ROLLOUT_CONFIRMATION_89",
     65        groups: [
     66          "cfr"
     67        ],
     68        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",
     69        template: "infobar",
     70        content: {
     71          priority: 3,
     72          type: "global",
     73          text: {
     74            string_id: "cfr-doorhanger-doh-body"
     75          },
     76          buttons: [
     77            {
     78              label: {
     79                string_id: "cfr-doorhanger-doh-primary-button-2"
     80              },
     81              action: {
     82                type: "ACCEPT_DOH"
     83              },
     84              primary: true
     85            },
     86            {
     87              label: {
     88                string_id: "cfr-doorhanger-doh-secondary-button"
     89              },
     90              action: {
     91                type: "DISABLE_DOH"
     92              }
     93            },
     94            {
     95              label: {
     96                string_id: "notification-learnmore-default-label"
     97              },
     98              supportPage: "dns-over-https",
     99              callback: null,
    100              action: {
    101                type: "CANCEL"
    102              }
    103            }
    104          ],
    105          bucket_id: "DOH_ROLLOUT_CONFIRMATION_89",
    106          category: "cfrFeatures"
    107        },
    108        frequency: {
    109          lifetime: 3
    110        },
    111        trigger: {
    112          id: "openURL",
    113          patterns: [
    114            "*://*/*"
    115          ]
    116        }
    117      },
    118      {
    119        id: "INFOBAR_DEFAULT_AND_PIN_87",
    120        groups: [
    121          "cfr"
    122        ],
    123        content: {
    124          category: "cfrFeatures",
    125          bucket_id: "INFOBAR_DEFAULT_AND_PIN_87",
    126          text: {
    127            string_id: "default-browser-notification-message"
    128          },
    129          type: "global",
    130          buttons: [
    131            {
    132              label: {
    133                string_id: "default-browser-notification-button"
    134              },
    135              action: {
    136                type: "PIN_AND_DEFAULT"
    137              },
    138              primary: true,
    139              accessKey: "P"
    140            }
    141          ]
    142        },
    143        trigger: {
    144          id: "defaultBrowserCheck"
    145        },
    146        template: "infobar",
    147        frequency: {
    148          lifetime: 2,
    149          custom: [
    150            {
    151              period: 3024000000,
    152              cap: 1
    153            }
    154          ]
    155        },
    156        targeting: "((firefoxVersion >= 87 && firefoxVersion < 89) || (firefoxVersion >= 89 && firefoxVersion < 138 && 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"
    157      },
    158      {
    159        id: "CFR_FULL_VIDEO_SUPPORT_EN",
    160        groups: [
    161          "cfr"
    162        ],
    163        targeting: "firefoxVersion < 88 && firefoxVersion != 78 && localeLanguageCode in ['en', 'fr', 'de', 'ru', 'zh', 'es', 'it', 'pl']",
    164        template: "cfr_doorhanger",
    165        content: {
    166          skip_address_bar_notifier: true,
    167          persistent_doorhanger: true,
    168          anchor_id: "PanelUI-menu-button",
    169          layout: "icon_and_message",
    170          text: {
    171            string_id: "cfr-doorhanger-video-support-body"
    172          },
    173          buttons: {
    174            secondary: [
    175              {
    176                label: {
    177                  string_id: "cfr-doorhanger-extension-cancel-button"
    178                },
    179                action: {
    180                  type: "CANCEL"
    181                }
    182              }
    183            ],
    184            primary: {
    185              label: {
    186                string_id: "cfr-doorhanger-video-support-primary-button"
    187              },
    188              action: {
    189                type: "OPEN_URL",
    190                data: {
    191                  args: "https://support.mozilla.org/kb/update-firefox-latest-release",
    192                  where: "tabshifted"
    193                }
    194              }
    195            }
    196          },
    197          bucket_id: "CFR_FULL_VIDEO_SUPPORT_EN",
    198          heading_text: {
    199            string_id: "cfr-doorhanger-video-support-header"
    200          },
    201          info_icon: {
    202            label: {
    203              string_id: "cfr-doorhanger-extension-sumo-link"
    204            },
    205            sumo_path: "extensionrecommendations"
    206          },
    207          notification_text: "Message from Firefox",
    208          category: "cfrFeatures"
    209        },
    210        frequency: {
    211          lifetime: 3
    212        },
    213        trigger: {
    214          id: "openURL",
    215          patterns: [
    216            "https://*/Amazon-Video/*",
    217            "https://*/Prime-Video/*"
    218          ],
    219          params: [
    220            "www.hulu.com",
    221            "hulu.com",
    222            "www.netflix.com",
    223            "netflix.com",
    224            "www.disneyplus.com",
    225            "disneyplus.com",
    226            "www.hbomax.com",
    227            "hbomax.com",
    228            "www.sho.com",
    229            "sho.com",
    230            "www.directv.com",
    231            "directv.com",
    232            "www.starzplay.com",
    233            "starzplay.com",
    234            "www.sling.com",
    235            "sling.com",
    236            "www.facebook.com",
    237            "facebook.com"
    238          ]
    239        }
    240      }
    241    ];
    242  }
    243 };