Sample code for newsletter subscriptions via basket.mozilla.org
Перейти к файлу
Steve Jalim fac00b815f
Merge pull request #4 from mozilla/alexgibson-patch-1
Update README.md
2024-02-15 14:37:28 +00:00
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct file 2019-03-29 23:03:43 -07:00
LICENSE Add initial working example 2016-09-13 10:02:24 -04:00
README.md Update README.md 2024-02-15 13:11:55 +00:00
basket-client.js Coding style updates. 2016-10-24 22:58:26 -07:00
basket-example.css Add more styles from viewsourceconf.org 2016-09-13 10:24:00 -04:00
index.html Add initial working example 2016-09-13 10:02:24 -04:00

README.md

This repo is outdated

Mozilla's Protocol design system now features a newsletter component that encompasses all the necessary code for handling newsletter subscriptions via Basket. The example code in this repo is outdated and should no longer be used.

Basket Example Code

Sample code for newsletter subscriptions via basket.mozilla.org. See it in action at https://mozilla.github.io/basket-example/.

Tips

  • Use "success@example.com" as the email to have the request return successfully but not actually record a subscription, and "failure@example.com" to always return failure.
  • You may also send "country" and "lang" parameters to indicate the user's country and language respectively (see the forms on mozilla.org for examples)
  • You may also send a "fmt" parameter with the value "H" or "T" for "HTML" and "Text", which will indicate the user's preferred email format. HTML is the default.