Skip to content

Commit

Permalink
Merge pull request adam-p#433 from adam-p/firefox-webextensions
Browse files Browse the repository at this point in the history
Merge WebExtensions changes
  • Loading branch information
adam-p authored May 26, 2017
2 parents 5308e78 + 28bee96 commit e254b5f
Show file tree
Hide file tree
Showing 128 changed files with 340 additions and 9,890 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ Thumbs.db

*.sublime-project
*.sublime-workspace

# Build directory
dist
71 changes: 51 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,64 @@
# WebExtensions notes

## High
* DON'T FORGET THUNDERBIRD
* Test the WebExtension. Especially on release Firefox. Publish for prelim review/signing.
* Show message to Firefox users about switching to new extension. Probably open options tab with huge message at top.
* Decide on whether to keep using AMO.


## Steps (after work done)
1. Release WebExtension. Get it signed (happens immediately?). Maybe get it preliminarily reviewed.
2. Release XUL update. Point Firefox users at WebExtension.

## Better steps

This results in a cleaner migration for existing Firefox users.

1. Release webext version with new ID.

2. Modify old version to detect if it's running on Firefox, prompt the user to install the new extension and uninstall the old extension.
```
AddonManager.getInstallForURL('https://addons.mozilla.org/firefox/downloads/latest/markdown-here/addon-375281-latest.xpi', function(install) {console.log(arguments); install.install()}, 'application/x-xpinstall');
AddonManager.getAddonByID('[email protected]', function(install) {console.log(arguments); install.uninstall()});
```

3. Coordinate with AMO reviewers to allow the install/uninstall action. (Via IRC?)





# ![Markdown Here logo](https://raw.github.com/adam-p/markdown-here/master/src/common/images/icon48.png) Markdown Here

[**Visit the website.**](http://markdown-here.com)
[**Get it for Chrome.**](https://chrome.google.com/webstore/detail/elifhakcjgalahccnjkneoccemfahfoa)
[**Get it for Firefox.**](https://addons.mozilla.org/en-US/firefox/addon/markdown-here/)
[**Get it for Safari.**](https://s3.amazonaws.com/markdown-here/markdown-here.safariextz)
[**Get it for Thunderbird and Postbox.**](https://addons.mozilla.org/en-US/thunderbird/addon/markdown-here/)
[**Get it for Opera.**](https://addons.opera.com/en/extensions/details/markdown-here/)
[**Discuss it and ask questions in the Google Group.**](https://groups.google.com/forum/?fromgroups#!forum/markdown-here/)
[**Visit the website.**](http://markdown-here.com)<br>
[**Get it for Chrome.**](https://chrome.google.com/webstore/detail/elifhakcjgalahccnjkneoccemfahfoa)<br>
[**Get it for Firefox.**](https://addons.mozilla.org/en-US/firefox/addon/markdown-here/)<br>
[**Get it for Safari.**](https://s3.amazonaws.com/markdown-here/markdown-here.safariextz)<br>
[**Get it for Thunderbird and Postbox.**](https://addons.mozilla.org/en-US/thunderbird/addon/markdown-here/)<br>
[**Get it for Opera.**](https://addons.opera.com/en/extensions/details/markdown-here/)<br>
[**Discuss it and ask questions in the Google Group.**](https://groups.google.com/forum/?fromgroups#!forum/markdown-here/)<br>

*Markdown Here* is a Google Chrome, Firefox, Safari, Opera, and Thunderbird extension that lets you write email<sup>&dagger;</sup> in Markdown<sup>&Dagger;</sup> and render them before sending. It also supports syntax highlighting (just specify the language in a fenced code block).

Writing email with code in it is pretty tedious. Writing Markdown with code in it is easy. I found myself writing email in Markdown in the Github in-browser editor, then copying the preview into email. This is a pretty absurd workflow, so I decided create a tool to write and render Markdown right in the email.

To discover what can be done with Markdown in *Markdown Here*, check out the [Markdown Here Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Here-Cheatsheet) and the other [wiki pages](https://github.com/adam-p/markdown-here/wiki).

<sup>&dagger;: And Google Groups posts, and Blogger posts, and Evernote notes, and Wordpress posts! [See more](#compatibility).</sup>
<sup>&dagger;: And Google Groups posts, and Blogger posts, and Evernote notes, and Wordpress posts! [See more](#compatibility).</sup><br>
<sup>&Dagger;: And TeX mathematical formulae!</sup>

![screenshot of conversion](https://raw.github.com/adam-p/markdown-here/master/store-assets/markdown-here-image1.gimp.png)

### Table of Contents
**[Installation Instructions](#installation-instructions)**
**[Usage Instructions](#usage-instructions)**
**[Troubleshooting](#troubleshooting)**
**[Compatibility](#compatibility)**
**[Notes and Miscellaneous](#notes-and-miscellaneous)**
**[Building the Extension Bundles](#building-the-extension-bundles)**
**[Next Steps, Credits, Feedback, License](#next-steps)**
**[Installation Instructions](#installation-instructions)**<br>
**[Usage Instructions](#usage-instructions)**<br>
**[Troubleshooting](#troubleshooting)**<br>
**[Compatibility](#compatibility)**<br>
**[Notes and Miscellaneous](#notes-and-miscellaneous)**<br>
**[Building the Extension Bundles](#building-the-extension-bundles)**<br>
**[Next Steps, Credits, Feedback, License](#next-steps)**<br>

## Installation Instructions

Expand Down Expand Up @@ -66,7 +98,7 @@ After installing, make sure to restart Firefox/Thunderbird!

### Safari

[Download the extension directly.](https://s3.amazonaws.com/markdown-here/markdown-here.safariextz) When it has finished downloading, double click it to install.
[Download the extension directly.](https://s3.amazonaws.com/markdown-here/markdown-here.safariextz) When it has finished downloading, double click it to install.

#### Preferences

Expand Down Expand Up @@ -113,7 +145,7 @@ In Gmail, you can also use the browser's Undo command (<kbd>CTRL</kbd>+<kbd>Z</k

### Replies

In Gmail, Thunderbird, and Google Groups, you can use "Markdown Toggle" normally: just write your reply (top, bottom, inline, wherever) and then convert. The original email that you're replying to will be left alone. (Technically: Existing `blockquote` blocks will be left intact.)
In Gmail, Thunderbird, and Google Groups, you can use "Markdown Toggle" normally: just write your reply (top, bottom, inline, wherever) and then convert. The original email that you're replying to will be left alone. (Technically: Existing `blockquote` blocks will be left intact.)

In Hotmail and Yahoo (which don't put the original in a `blockquote`), and optionally in Gmail, Thunderbird, and Google Groups, you can ensure that only the part of the reply that you wrote gets converted by selecting what you want to convert and then clicking "Markdown Toggle" -- see the next section.

Expand Down Expand Up @@ -142,7 +174,7 @@ The *Markdown Here* Options page can be accessed via the Chrome, Firefox, Safari
* TeX math formulae processing enabling and customization.
* What the hotkey should be.

For Chrome and Firefox, any changes made in the *Markdown Here* Options are automatically synchronized between your other installations of that browser (if you have the sync feature enabled in the browser).
For Chrome and Firefox, any changes made in the *Markdown Here* Options are automatically synchronized between your other installations of that browser (if you have the sync feature enabled in the browser).

![screenshot of options](https://raw.githubusercontent.com/adam-p/markdown-here/master/store-assets/markdown-here-chrome-options-1.gimp.png)

Expand Down Expand Up @@ -182,8 +214,7 @@ See the [Compatibility wiki page](https://github.com/adam-p/markdown-here/wiki/C

Before zipping, delete the `src/common/test` directory. This will prevent the autotests from ending up in the release.

An important preparatory step is to remove any system-generated hidden files that shouldn't be
included in the release file (like Windows' `desktop.ini` and OS X's `.DS_Store`, etc.). This shell command will delete those unwanted files:
An important preparatory step is to remove any system-generated hidden files that shouldn't be included in the release file (like Windows' `desktop.ini` and OS X's `.DS_Store`, etc.). This shell command will delete those unwanted files:

```
find . -name "desktop.ini" -or -name ".*" -and -not -name "." -and -not -name ".git*" -print0 | xargs -0 rm -rf
Expand Down
9 changes: 0 additions & 9 deletions src/_locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@
"description":"Text shown on the context menu.",
"inMozDTD":true
},
"context_menu_item_with_shortcut":{
"message":"Mar&kdown An\/Aus",
"description":"Text shown on the context menu. The '&' comes before the shortcut character. If a shortcut key doesn't make sense for your language\/locale\/keyboard, you can just leave out the '&'."
},
"context_menu_item_shortcut":{
"message":"k",
"description":"The shortcut key for the context menu. Must be one of the letters in the context menu item text. If you excluded '&' in 'context_menu_item_with_shortcut', then you can leave this blank.",
"inMozDTD":true
},
"invalid_field":{
"message":"Das ausgewählte Textfeld kann nicht zu Markdown gerendert werden. Bitte einen Rich-Text–Editor verwenden.",
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"
Expand Down
9 changes: 0 additions & 9 deletions src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@
"description": "Text shown on the context menu.",
"inMozDTD": true
},
"context_menu_item_with_shortcut": {
"message": "Mar&kdown Toggle",
"description": "Text shown on the context menu. The '&' comes before the shortcut character. If a shortcut key doesn't make sense for your language/locale/keyboard, you can just leave out the '&'."
},
"context_menu_item_shortcut": {
"message": "k",
"description": "The shortcut key for the context menu. Must be one of the letters in the context menu item text. If you excluded '&' in 'context_menu_item_with_shortcut', then you can leave this blank.",
"inMozDTD": true
},
"moz_options_dlg_title": {
"message": "Markdown Here Options",
"description": "In Thunderbird, in order to open the options tab we first have to open a temporary dialog box. This is the title for that box.",
Expand Down
9 changes: 0 additions & 9 deletions src/_locales/es/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@
"description":"Text shown on the context menu.",
"inMozDTD":true
},
"context_menu_item_with_shortcut":{
"message":"Mar&kdown Toggle",
"description":"Text shown on the context menu. The '&' comes before the shortcut character. If a shortcut key doesn't make sense for your language\/locale\/keyboard, you can just leave out the '&'."
},
"context_menu_item_shortcut":{
"message":"k",
"description":"The shortcut key for the context menu. Must be one of the letters in the context menu item text. If you excluded '&' in 'context_menu_item_with_shortcut', then you can leave this blank.",
"inMozDTD":true
},
"invalid_field":{
"message":"El campo seleccionado no es válido para el renderizado Markdown. Por favor, use un editor de texto enriquecido.",
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"
Expand Down
9 changes: 0 additions & 9 deletions src/_locales/fr/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@
"description":"Text shown on the context menu.",
"inMozDTD":true
},
"context_menu_item_with_shortcut":{
"message":"Basculer vers Mar&kdown",
"description":"Text shown on the context menu. The '&' comes before the shortcut character. If a shortcut key doesn't make sense for your language\/locale\/keyboard, you can just leave out the '&'."
},
"context_menu_item_shortcut":{
"message":"k",
"description":"The shortcut key for the context menu. Must be one of the letters in the context menu item text. If you excluded '&' in 'context_menu_item_with_shortcut', then you can leave this blank.",
"inMozDTD":true
},
"invalid_field":{
"message":"Le champ sélectionné n'est pas valide pour un rendu avec Markdown. Utilisez un éditeur de texte enrichi.",
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"
Expand Down
9 changes: 0 additions & 9 deletions src/_locales/it/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@
"description":"Text shown on the context menu.",
"inMozDTD":true
},
"context_menu_item_with_shortcut":{
"message":"Commuta Mar&kdown",
"description":"Text shown on the context menu. The '&' comes before the shortcut character. If a shortcut key doesn't make sense for your language\/locale\/keyboard, you can just leave out the '&'."
},
"context_menu_item_shortcut":{
"message":"k",
"description":"The shortcut key for the context menu. Must be one of the letters in the context menu item text. If you excluded '&' in 'context_menu_item_with_shortcut', then you can leave this blank.",
"inMozDTD":true
},
"invalid_field":{
"message":"The selected field is not valid for Markdown rendering. Please use a rich editor.",
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"
Expand Down
9 changes: 0 additions & 9 deletions src/_locales/ja/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@
"description":"Text shown on the context menu.",
"inMozDTD":true
},
"context_menu_item_with_shortcut":{
"message":"Mar&kdownを有効化\/無効化",
"description":"Text shown on the context menu. The '&' comes before the shortcut character. If a shortcut key doesn't make sense for your language\/locale\/keyboard, you can just leave out the '&'."
},
"context_menu_item_shortcut":{
"message":"k",
"description":"The shortcut key for the context menu. Must be one of the letters in the context menu item text. If you excluded '&' in 'context_menu_item_with_shortcut', then you can leave this blank.",
"inMozDTD":true
},
"invalid_field":{
"message":"このテキストフィールドではMarkdownにレンダリングできません。リッチテキストフィールドで行なってください。",
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"
Expand Down
9 changes: 0 additions & 9 deletions src/_locales/ko/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@
"description":"Text shown on the context menu.",
"inMozDTD":true
},
"context_menu_item_with_shortcut":{
"message":"마크다운 토글",
"description":"Text shown on the context menu. The '&' comes before the shortcut character. If a shortcut key doesn't make sense for your language\/locale\/keyboard, you can just leave out the '&'."
},
"context_menu_item_shortcut":{
"message":"k",
"description":"The shortcut key for the context menu. Must be one of the letters in the context menu item text. If you excluded '&' in 'context_menu_item_with_shortcut', then you can leave this blank.",
"inMozDTD":true
},
"invalid_field":{
"message":"The selected field is not valid for Markdown rendering. Please use a rich editor.",
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"
Expand Down
9 changes: 0 additions & 9 deletions src/_locales/pl/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@
"description":"Text shown on the context menu.",
"inMozDTD":true
},
"context_menu_item_with_shortcut":{
"message":"Przełącz Mar&kdown",
"description":"Text shown on the context menu. The '&' comes before the shortcut character. If a shortcut key doesn't make sense for your language\/locale\/keyboard, you can just leave out the '&'."
},
"context_menu_item_shortcut":{
"message":"k",
"description":"The shortcut key for the context menu. Must be one of the letters in the context menu item text. If you excluded '&' in 'context_menu_item_with_shortcut', then you can leave this blank.",
"inMozDTD":true
},
"invalid_field":{
"message":"Wybrane pole nie pozwala na interpretację języka Markdown. Proszę użyj edytora tekstu sformatowanego.",
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"
Expand Down
9 changes: 0 additions & 9 deletions src/_locales/pt_BR/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@
"description":"Text shown on the context menu.",
"inMozDTD":true
},
"context_menu_item_with_shortcut":{
"message":"Alternar Mar&kdwon",
"description":"Text shown on the context menu. The '&' comes before the shortcut character. If a shortcut key doesn't make sense for your language\/locale\/keyboard, you can just leave out the '&'."
},
"context_menu_item_shortcut":{
"message":"k",
"description":"The shortcut key for the context menu. Must be one of the letters in the context menu item text. If you excluded '&' in 'context_menu_item_with_shortcut', then you can leave this blank.",
"inMozDTD":true
},
"invalid_field":{
"message":"O campo selecionado não é válido para renderização em Markdown. Favor usar um editor de texto formatado.",
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"
Expand Down
9 changes: 0 additions & 9 deletions src/_locales/ru/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@
"description":"Text shown on the context menu.",
"inMozDTD":true
},
"context_menu_item_with_shortcut":{
"message":"Переключить Mar&kdown",
"description":"Text shown on the context menu. The '&' comes before the shortcut character. If a shortcut key doesn't make sense for your language\/locale\/keyboard, you can just leave out the '&'."
},
"context_menu_item_shortcut":{
"message":"k",
"description":"The shortcut key for the context menu. Must be one of the letters in the context menu item text. If you excluded '&' in 'context_menu_item_with_shortcut', then you can leave this blank.",
"inMozDTD":true
},
"invalid_field":{
"message":"Рендеринг Markdown не применим к выбранному полю. Пожалуйста используйте WYSIWYG редактор.",
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"
Expand Down
9 changes: 0 additions & 9 deletions src/_locales/tr/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@
"description":"Text shown on the context menu.",
"inMozDTD":true
},
"context_menu_item_with_shortcut":{
"message":"Mar&kdown Toggle",
"description":"Text shown on the context menu. The '&' comes before the shortcut character. If a shortcut key doesn't make sense for your language\/locale\/keyboard, you can just leave out the '&'."
},
"context_menu_item_shortcut":{
"message":"k",
"description":"The shortcut key for the context menu. Must be one of the letters in the context menu item text. If you excluded '&' in 'context_menu_item_with_shortcut', then you can leave this blank.",
"inMozDTD":true
},
"invalid_field":{
"message":"Seçilen alan Markdown dönüşümü için geçerli değildir. Lütfen bir zengin metin editörü kullanın.",
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"
Expand Down
9 changes: 0 additions & 9 deletions src/_locales/zh_CN/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@
"description":"Text shown on the context menu.",
"inMozDTD":true
},
"context_menu_item_with_shortcut":{
"message":"Mar&kdown转换",
"description":"Text shown on the context menu. The '&' comes before the shortcut character. If a shortcut key doesn't make sense for your language\/locale\/keyboard, you can just leave out the '&'."
},
"context_menu_item_shortcut":{
"message":"k",
"description":"The shortcut key for the context menu. Must be one of the letters in the context menu item text. If you excluded '&' in 'context_menu_item_with_shortcut', then you can leave this blank.",
"inMozDTD":true
},
"invalid_field":{
"message":"选定的区域不支持Markdown转换,请使用富文本编辑器。",
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"
Expand Down
9 changes: 0 additions & 9 deletions src/_locales/zh_TW/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@
"description":"Text shown on the context menu.",
"inMozDTD":true
},
"context_menu_item_with_shortcut":{
"message":"Mar&kdown切換",
"description":"Text shown on the context menu. The '&' comes before the shortcut character. If a shortcut key doesn't make sense for your language\/locale\/keyboard, you can just leave out the '&'."
},
"context_menu_item_shortcut":{
"message":"k",
"description":"The shortcut key for the context menu. Must be one of the letters in the context menu item text. If you excluded '&' in 'context_menu_item_with_shortcut', then you can leave this blank.",
"inMozDTD":true
},
"invalid_field":{
"message":"選擇的區域不支援Markdown算繪模式,請使用富文字編輯器。",
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"
Expand Down
Loading

0 comments on commit e254b5f

Please sign in to comment.