2018-10-10 01:49:51 +03:00
/ * T h i s S o u r c e C o d e F o r m i s s u b j e c t t o t h e t e r m s o f t h e M o z i l l a P u b l i c
* 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/. */
"use strict" ;
const TEST _ICON = "chrome://branding/content/icon64.png" ;
2018-11-23 23:08:02 +03:00
const TEST _ICON _16 = "chrome://branding/content/icon16.png" ;
2018-10-10 01:49:51 +03:00
const MESSAGES = ( ) => ( [
{
"id" : "SIMPLE_TEST_1" ,
"template" : "simple_snippet" ,
2018-11-09 22:26:32 +03:00
"campaign" : "test_campaign_blocking" ,
"content" : {
"icon" : TEST _ICON ,
2018-11-23 23:08:02 +03:00
"title" : "Firefox Account!" ,
"title_icon" : TEST _ICON _16 ,
2018-11-09 22:26:32 +03:00
"text" : "<syncLink>Sync it, link it, take it with you</syncLink>. All this and more with a Firefox Account." ,
"links" : { "syncLink" : { "url" : "https://www.mozilla.org/en-US/firefox/accounts" } } ,
"block_button_text" : "Block" ,
} ,
} ,
{
"id" : "SIMPLE_TEST_1_SAME_CAMPAIGN" ,
"template" : "simple_snippet" ,
"campaign" : "test_campaign_blocking" ,
2018-10-10 01:49:51 +03:00
"content" : {
"icon" : TEST _ICON ,
"text" : "<syncLink>Sync it, link it, take it with you</syncLink>. All this and more with a Firefox Account." ,
"links" : { "syncLink" : { "url" : "https://www.mozilla.org/en-US/firefox/accounts" } } ,
"block_button_text" : "Block" ,
} ,
} ,
2018-10-19 02:34:54 +03:00
{
"id" : "SIMPLE_TEST_TALL" ,
"template" : "simple_snippet" ,
"content" : {
"icon" : TEST _ICON ,
"text" : "<syncLink>Sync it, link it, take it with you</syncLink>. All this and more with a Firefox Account." ,
"links" : { "syncLink" : { "url" : "https://www.mozilla.org/en-US/firefox/accounts" } } ,
"button_label" : "Get one now!" ,
"button_url" : "https://www.mozilla.org/en-US/firefox/accounts" ,
"block_button_text" : "Block" ,
"tall" : true ,
} ,
} ,
2018-10-17 21:14:52 +03:00
{
"id" : "SIMPLE_TEST_BUTTON_URL_1" ,
"template" : "simple_snippet" ,
"content" : {
"icon" : TEST _ICON ,
"button_label" : "Get one now!" ,
"button_url" : "https://www.mozilla.org/en-US/firefox/accounts" ,
"text" : "Sync it, link it, take it with you. All this and more with a Firefox Account." ,
"block_button_text" : "Block" ,
} ,
} ,
2018-10-10 01:49:51 +03:00
{
"id" : "SIMPLE_WITH_TITLE_TEST_1" ,
"template" : "simple_snippet" ,
"content" : {
"icon" : TEST _ICON ,
"title" : "Ready to sync?" ,
"text" : "Get connected with a <syncLink>Firefox account</syncLink>." ,
"links" : { "syncLink" : { "url" : "https://www.mozilla.org/en-US/firefox/accounts" } } ,
"block_button_text" : "Block" ,
} ,
} ,
2018-11-08 01:31:46 +03:00
{
"id" : "NEWSLETTER_TEST_DEFAULTS" ,
"template" : "newsletter_snippet" ,
"content" : {
"scene1_icon" : TEST _ICON ,
"scene1_title" : "Be a part of a movement." ,
2018-11-23 23:08:02 +03:00
"scene1_title_icon" : TEST _ICON _16 ,
2018-11-08 01:31:46 +03:00
"scene1_text" : "Internet shutdowns, hackers, harassment – the health of the internet is on the line. Sign up and Mozilla will keep you updated on how you can help." ,
"scene1_button_label" : "Continue" ,
"scene1_button_color" : "#712b00" ,
"scene1_button_background_color" : "#ff9400" ,
"scene2_title" : "Let's do this!" ,
2018-11-27 20:55:44 +03:00
"locale" : "en-CA" ,
2018-11-08 01:31:46 +03:00
"scene2_dismiss_button_text" : "Dismiss" ,
"scene2_text" : "Sign up for the Mozilla newsletter and we will keep you updated on how you can help." ,
"scene2_privacy_html" : "I'm okay with Mozilla handling my info as explained in this <privacyLink>Privacy Notice</privacyLink>." ,
"scene2_newsletter" : "mozilla-foundation" ,
"success_text" : "Check your inbox for the confirmation!" ,
"error_text" : "Error!" ,
"links" : { "privacyLink" : { "url" : "https://www.mozilla.org/privacy/websites/?sample_rate=0.001&snippet_name=7894" } } ,
} ,
} ,
2018-10-10 01:49:51 +03:00
{
"id" : "NEWSLETTER_TEST_1" ,
"template" : "newsletter_snippet" ,
"content" : {
"scene1_icon" : TEST _ICON ,
"scene1_title" : "Be a part of a movement." ,
"scene1_title_icon" : "" ,
"scene1_text" : "Internet shutdowns, hackers, harassment – the health of the internet is on the line. Sign up and Mozilla will keep you updated on how you can help." ,
"scene1_button_label" : "Continue" ,
2018-10-05 02:02:06 +03:00
"scene1_button_color" : "#712b00" ,
"scene1_button_background_color" : "#ff9400" ,
2018-11-08 01:31:46 +03:00
"scene2_title" : "Let's do this!" ,
"locale" : "en-CA" ,
2018-10-10 01:49:51 +03:00
"scene2_dismiss_button_text" : "Dismiss" ,
"scene2_text" : "Sign up for the Mozilla newsletter and we will keep you updated on how you can help." ,
"scene2_privacy_html" : "I'm okay with Mozilla handling my info as explained in this <privacyLink>Privacy Notice</privacyLink>." ,
"scene2_button_label" : "Sign Me up" ,
"scene2_email_placeholder_text" : "Your email here" ,
2018-11-08 01:31:46 +03:00
"scene2_newsletter" : "mozilla-foundation" ,
2018-10-10 01:49:51 +03:00
"success_text" : "Check your inbox for the confirmation!" ,
"error_text" : "Error!" ,
"links" : { "privacyLink" : { "url" : "https://www.mozilla.org/privacy/websites/?sample_rate=0.001&snippet_name=7894" } } ,
} ,
} ,
{
"id" : "FXA_SNIPPET_TEST_1" ,
"template" : "fxa_signup_snippet" ,
"content" : {
"scene1_icon" : TEST _ICON ,
"scene1_button_label" : "Get connected with sync!" ,
2018-10-05 02:02:06 +03:00
"scene1_button_color" : "#712b00" ,
"scene1_button_background_color" : "#ff9400" ,
2018-10-10 01:49:51 +03:00
"scene1_text" : "Connect to Firefox by securely syncing passwords, bookmarks, and open tabs." ,
"scene1_title" : "Browser better." ,
2018-11-23 23:08:02 +03:00
"scene1_title_icon" : TEST _ICON _16 ,
2018-10-10 01:49:51 +03:00
"scene2_text" : "Connect to your Firefox account to securely sync passwords, bookmarks, and open tabs." ,
2018-10-05 02:02:06 +03:00
"scene2_title" : "Title 123" ,
2018-10-10 01:49:51 +03:00
"scene2_email_placeholder_text" : "Your email" ,
"scene2_button_label" : "Continue" ,
"scene2_dismiss_button_text" : "Dismiss" ,
} ,
} ,
2018-10-05 02:02:06 +03:00
{
id : "SNIPPETS_SEND_TO_DEVICE_TEST" ,
template : "send_to_device_snippet" ,
content : {
include _sms : true ,
locale : "en-CA" ,
country : "us" ,
message _id _sms : "ff-mobilesn-download" ,
message _id _email : "download-firefox-mobile" ,
scene1 _button _background _color : "#6200a4" ,
scene1 _button _color : "#FFFFFF" ,
scene1 _button _label : "Install now" ,
scene1 _icon : TEST _ICON ,
scene1 _text : "Browse without compromise with Firefox Mobile." ,
scene1 _title : "Full-featured. Customizable. Lightning fast" ,
2018-11-23 23:08:02 +03:00
scene1 _title _icon : TEST _ICON _16 ,
2018-10-05 02:02:06 +03:00
scene2 _button _label : "Send" ,
scene2 _disclaimer _html : "The intended recipient of the email must have consented. <privacyLink>Learn more.</privacyLink>" ,
scene2 _dismiss _button _text : "Dismiss" ,
scene2 _icon : TEST _ICON ,
scene2 _input _placeholder : "Your email address or phone number" ,
scene2 _text : "Send Firefox to your phone and take a powerful independent browser with you." ,
2018-11-08 01:31:46 +03:00
scene2 _title : "Let's do this!" ,
2018-10-05 02:02:06 +03:00
error _text : "Oops, there was a problem." ,
success _title : "Your download link was sent." ,
success _text : "Check your device for the email message!" ,
links : { "privacyLink" : { "url" : "https://www.mozilla.org/privacy/websites/?sample_rate=0.001&snippet_name=7894" } } ,
} ,
} ,
2018-10-18 18:04:21 +03:00
{
"id" : "EOY_TEST_1" ,
"template" : "eoy_snippet" ,
"content" : {
"highlight_color" : "#f05" ,
2018-11-23 23:08:02 +03:00
"background_color" : "#ddd" ,
"text_color" : "yellow" ,
2018-10-18 18:04:21 +03:00
"selected_button" : "donation_amount_first" ,
"icon" : TEST _ICON ,
"button_label" : "Donate" ,
"monthly_checkbox_label_text" : "Make my donation monthly" ,
"currency_code" : "usd" ,
"donation_amount_first" : 50 ,
"donation_amount_second" : 25 ,
"donation_amount_third" : 10 ,
"donation_amount_fourth" : 5 ,
2018-11-27 20:55:44 +03:00
"donation_form_url" : "https://donate.mozilla.org/pl/?utm_source=desktop-snippet&utm_medium=snippet&utm_campaign=donate&utm_term=7556" ,
2018-10-18 18:04:21 +03:00
"text" : "Big corporations want to restrict how we access the web. Fake news is making it harder for us to find the truth. Online bullies are silencing inspired voices. The <em>not-for-profit Mozilla Foundation</em> fights for a healthy internet with programs like our Tech Policy Fellowships and Internet Health Report; <b>will you donate today</b>?" ,
} ,
} ,
{
"id" : "EOY_BOLD_TEST_1" ,
"template" : "eoy_snippet" ,
"content" : {
"icon" : TEST _ICON ,
"selected_button" : "donation_amount_second" ,
"button_label" : "Donate" ,
"monthly_checkbox_label_text" : "Make my donation monthly" ,
"currency_code" : "usd" ,
"donation_amount_first" : 50 ,
"donation_amount_second" : 25 ,
"donation_amount_third" : 10 ,
"donation_amount_fourth" : 5 ,
"donation_form_url" : "https://donate.mozilla.org" ,
"text" : "Big corporations want to restrict how we access the web. Fake news is making it harder for us to find the truth. Online bullies are silencing inspired voices. The <em>not-for-profit Mozilla Foundation</em> fights for a healthy internet with programs like our Tech Policy Fellowships and Internet Health Report; <b>will you donate today</b>?" ,
"test" : "bold" ,
} ,
} ,
{
"id" : "EOY_TAKEOVER_TEST_1" ,
"template" : "eoy_snippet" ,
"content" : {
"icon" : TEST _ICON ,
"button_label" : "Donate" ,
"monthly_checkbox_label_text" : "Make my donation monthly" ,
"currency_code" : "usd" ,
"donation_amount_first" : 50 ,
"donation_amount_second" : 25 ,
"donation_amount_third" : 10 ,
"donation_amount_fourth" : 5 ,
"donation_form_url" : "https://donate.mozilla.org" ,
"text" : "Big corporations want to restrict how we access the web. Fake news is making it harder for us to find the truth. Online bullies are silencing inspired voices. The <em>not-for-profit Mozilla Foundation</em> fights for a healthy internet with programs like our Tech Policy Fellowships and Internet Health Report; <b>will you donate today</b>?" ,
"test" : "takeover" ,
} ,
} ,
2018-10-10 01:49:51 +03:00
] ) ;
const SnippetsTestMessageProvider = {
getMessages ( ) {
return MESSAGES ( )
// Ensures we never actually show test except when triggered by debug tools
. map ( message => ( { ... message , targeting : ` providerCohorts.snippets_local_testing == "SHOW_TEST" ` } ) ) ;
} ,
} ;
this . SnippetsTestMessageProvider = SnippetsTestMessageProvider ;
const EXPORTED _SYMBOLS = [ "SnippetsTestMessageProvider" ] ;