Awesome Open Source
Awesome Open Source

Briskine Browser Extension

Write emails faster. Create text templates and insert them with shortcuts on any website.

Development

  • Install Node.js and npm.
  • Run npm install to install all dependencies.
  • Rename the src/store/config-firebase.sample.js file to config-firebase.js and add the required details from the Firebase dashboard.

The following commands are available:

  • npm start - Development mode. Creates development manifest, watches files and recompiles them automatically.
  • npm run build - Build extension and compress extension.
  • Append -- safari to any command to build the Safari version. (eg. npm run build -- safari)

Known issues

  1. Saving a template from the context menus doesn't work with multi-lines.

    Relevant bug: https://code.google.com/p/chromium/issues/detail?id=116429

    This means that when selecting a text to save as a template it will not preserve newlines.

Creating templates

Templates are powered by handlebars.js.

The following template variables are available:

  • subject string
  • from list; Each list element contains:
    • name string
    • firt_name string
    • last_name string
    • email string
  • to list similar to from
  • cc list similar to from
  • bcc list similar to from

To output a string use following syntax:

String variables are denoted by double curly braces: {{subject}}

If subject is My email subject then it be rendered to:

String variables are denoted by double curly braces: My email subject

To output a list use following syntax:

To:
{{#each to}}
- Name {{name}}
- First name {{first_name}}
- Last name {{last_name}}
- Email {{email}}
{{/each}}

You also may want to output list only if it has values:

{{#if to}}
To:
{{#each to}}
- Name {{name}}
- First name {{first_name}}
- Last name {{last_name}}
- Email {{email}}
{{/each}}
{{/if}}

If you want to output only second element from list (note that list numbering starts with 0):

{{#if to.[1]}}
Second To:
- Name {{to.1.name}}
- First name {{to.1.first_name}}
- Last name {{to.1.last_name}}
- Email {{to.1.email}}
{{/if}}

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,551,389
Template (7,718
Chrome Extension (5,871
Firefox Addon (1,037
Linkedin (434
Gmail (399
Outlook (207
Safari Extension (158
Edge Extension (150
Related Projects