Skip to content

Commit e254b5f

Browse files
authored
Merge pull request #433 from adam-p/firefox-webextensions
Merge WebExtensions changes
2 parents 5308e78 + 28bee96 commit e254b5f

File tree

128 files changed

+340
-9890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+340
-9890
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ Thumbs.db
44

55
*.sublime-project
66
*.sublime-workspace
7+
8+
# Build directory
9+
dist

README.md

+51-20
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,64 @@
1+
# WebExtensions notes
2+
3+
## High
4+
* DON'T FORGET THUNDERBIRD
5+
* Test the WebExtension. Especially on release Firefox. Publish for prelim review/signing.
6+
* Show message to Firefox users about switching to new extension. Probably open options tab with huge message at top.
7+
* Decide on whether to keep using AMO.
8+
9+
10+
## Steps (after work done)
11+
1. Release WebExtension. Get it signed (happens immediately?). Maybe get it preliminarily reviewed.
12+
2. Release XUL update. Point Firefox users at WebExtension.
13+
14+
## Better steps
15+
16+
This results in a cleaner migration for existing Firefox users.
17+
18+
1. Release webext version with new ID.
19+
20+
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.
21+
```
22+
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');
23+
24+
AddonManager.getAddonByID('[email protected]', function(install) {console.log(arguments); install.uninstall()});
25+
```
26+
27+
3. Coordinate with AMO reviewers to allow the install/uninstall action. (Via IRC?)
28+
29+
30+
31+
32+
133
# ![Markdown Here logo](https://raw.github.com/adam-p/markdown-here/master/src/common/images/icon48.png) Markdown Here
234

3-
[**Visit the website.**](http://markdown-here.com)
4-
[**Get it for Chrome.**](https://chrome.google.com/webstore/detail/elifhakcjgalahccnjkneoccemfahfoa)
5-
[**Get it for Firefox.**](https://addons.mozilla.org/en-US/firefox/addon/markdown-here/)
6-
[**Get it for Safari.**](https://s3.amazonaws.com/markdown-here/markdown-here.safariextz)
7-
[**Get it for Thunderbird and Postbox.**](https://addons.mozilla.org/en-US/thunderbird/addon/markdown-here/)
8-
[**Get it for Opera.**](https://addons.opera.com/en/extensions/details/markdown-here/)
9-
[**Discuss it and ask questions in the Google Group.**](https://groups.google.com/forum/?fromgroups#!forum/markdown-here/)
35+
[**Visit the website.**](http://markdown-here.com)<br>
36+
[**Get it for Chrome.**](https://chrome.google.com/webstore/detail/elifhakcjgalahccnjkneoccemfahfoa)<br>
37+
[**Get it for Firefox.**](https://addons.mozilla.org/en-US/firefox/addon/markdown-here/)<br>
38+
[**Get it for Safari.**](https://s3.amazonaws.com/markdown-here/markdown-here.safariextz)<br>
39+
[**Get it for Thunderbird and Postbox.**](https://addons.mozilla.org/en-US/thunderbird/addon/markdown-here/)<br>
40+
[**Get it for Opera.**](https://addons.opera.com/en/extensions/details/markdown-here/)<br>
41+
[**Discuss it and ask questions in the Google Group.**](https://groups.google.com/forum/?fromgroups#!forum/markdown-here/)<br>
1042

1143
*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).
1244

1345
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.
1446

1547
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).
1648

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

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

2254
### Table of Contents
23-
**[Installation Instructions](#installation-instructions)**
24-
**[Usage Instructions](#usage-instructions)**
25-
**[Troubleshooting](#troubleshooting)**
26-
**[Compatibility](#compatibility)**
27-
**[Notes and Miscellaneous](#notes-and-miscellaneous)**
28-
**[Building the Extension Bundles](#building-the-extension-bundles)**
29-
**[Next Steps, Credits, Feedback, License](#next-steps)**
55+
**[Installation Instructions](#installation-instructions)**<br>
56+
**[Usage Instructions](#usage-instructions)**<br>
57+
**[Troubleshooting](#troubleshooting)**<br>
58+
**[Compatibility](#compatibility)**<br>
59+
**[Notes and Miscellaneous](#notes-and-miscellaneous)**<br>
60+
**[Building the Extension Bundles](#building-the-extension-bundles)**<br>
61+
**[Next Steps, Credits, Feedback, License](#next-steps)**<br>
3062

3163
## Installation Instructions
3264

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

6799
### Safari
68100

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

71103
#### Preferences
72104

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

114146
### Replies
115147

116-
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.)
148+
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.)
117149

118150
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.
119151

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

145-
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).
177+
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).
146178

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

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

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

185-
An important preparatory step is to remove any system-generated hidden files that shouldn't be
186-
included in the release file (like Windows' `desktop.ini` and OS X's `.DS_Store`, etc.). This shell command will delete those unwanted files:
217+
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:
187218

188219
```
189220
find . -name "desktop.ini" -or -name ".*" -and -not -name "." -and -not -name ".git*" -print0 | xargs -0 rm -rf

src/_locales/de/messages.json

-9
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@
2828
"description":"Text shown on the context menu.",
2929
"inMozDTD":true
3030
},
31-
"context_menu_item_with_shortcut":{
32-
"message":"Mar&kdown An\/Aus",
33-
"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 '&'."
34-
},
35-
"context_menu_item_shortcut":{
36-
"message":"k",
37-
"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.",
38-
"inMozDTD":true
39-
},
4031
"invalid_field":{
4132
"message":"Das ausgewählte Textfeld kann nicht zu Markdown gerendert werden. Bitte einen Rich-Text–Editor verwenden.",
4233
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"

src/_locales/en/messages.json

-9
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@
2828
"description": "Text shown on the context menu.",
2929
"inMozDTD": true
3030
},
31-
"context_menu_item_with_shortcut": {
32-
"message": "Mar&kdown Toggle",
33-
"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 '&'."
34-
},
35-
"context_menu_item_shortcut": {
36-
"message": "k",
37-
"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.",
38-
"inMozDTD": true
39-
},
4031
"moz_options_dlg_title": {
4132
"message": "Markdown Here Options",
4233
"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.",

src/_locales/es/messages.json

-9
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@
2828
"description":"Text shown on the context menu.",
2929
"inMozDTD":true
3030
},
31-
"context_menu_item_with_shortcut":{
32-
"message":"Mar&kdown Toggle",
33-
"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 '&'."
34-
},
35-
"context_menu_item_shortcut":{
36-
"message":"k",
37-
"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.",
38-
"inMozDTD":true
39-
},
4031
"invalid_field":{
4132
"message":"El campo seleccionado no es válido para el renderizado Markdown. Por favor, use un editor de texto enriquecido.",
4233
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"

src/_locales/fr/messages.json

-9
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@
2828
"description":"Text shown on the context menu.",
2929
"inMozDTD":true
3030
},
31-
"context_menu_item_with_shortcut":{
32-
"message":"Basculer vers Mar&kdown",
33-
"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 '&'."
34-
},
35-
"context_menu_item_shortcut":{
36-
"message":"k",
37-
"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.",
38-
"inMozDTD":true
39-
},
4031
"invalid_field":{
4132
"message":"Le champ sélectionné n'est pas valide pour un rendu avec Markdown. Utilisez un éditeur de texte enrichi.",
4233
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"

src/_locales/it/messages.json

-9
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@
2828
"description":"Text shown on the context menu.",
2929
"inMozDTD":true
3030
},
31-
"context_menu_item_with_shortcut":{
32-
"message":"Commuta Mar&kdown",
33-
"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 '&'."
34-
},
35-
"context_menu_item_shortcut":{
36-
"message":"k",
37-
"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.",
38-
"inMozDTD":true
39-
},
4031
"invalid_field":{
4132
"message":"The selected field is not valid for Markdown rendering. Please use a rich editor.",
4233
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"

src/_locales/ja/messages.json

-9
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@
2828
"description":"Text shown on the context menu.",
2929
"inMozDTD":true
3030
},
31-
"context_menu_item_with_shortcut":{
32-
"message":"Mar&kdownを有効化\/無効化",
33-
"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 '&'."
34-
},
35-
"context_menu_item_shortcut":{
36-
"message":"k",
37-
"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.",
38-
"inMozDTD":true
39-
},
4031
"invalid_field":{
4132
"message":"このテキストフィールドではMarkdownにレンダリングできません。リッチテキストフィールドで行なってください。",
4233
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"

src/_locales/ko/messages.json

-9
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@
2828
"description":"Text shown on the context menu.",
2929
"inMozDTD":true
3030
},
31-
"context_menu_item_with_shortcut":{
32-
"message":"마크다운 토글",
33-
"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 '&'."
34-
},
35-
"context_menu_item_shortcut":{
36-
"message":"k",
37-
"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.",
38-
"inMozDTD":true
39-
},
4031
"invalid_field":{
4132
"message":"The selected field is not valid for Markdown rendering. Please use a rich editor.",
4233
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"

src/_locales/pl/messages.json

-9
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@
2828
"description":"Text shown on the context menu.",
2929
"inMozDTD":true
3030
},
31-
"context_menu_item_with_shortcut":{
32-
"message":"Przełącz Mar&kdown",
33-
"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 '&'."
34-
},
35-
"context_menu_item_shortcut":{
36-
"message":"k",
37-
"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.",
38-
"inMozDTD":true
39-
},
4031
"invalid_field":{
4132
"message":"Wybrane pole nie pozwala na interpretację języka Markdown. Proszę użyj edytora tekstu sformatowanego.",
4233
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"

src/_locales/pt_BR/messages.json

-9
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@
2828
"description":"Text shown on the context menu.",
2929
"inMozDTD":true
3030
},
31-
"context_menu_item_with_shortcut":{
32-
"message":"Alternar Mar&kdwon",
33-
"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 '&'."
34-
},
35-
"context_menu_item_shortcut":{
36-
"message":"k",
37-
"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.",
38-
"inMozDTD":true
39-
},
4031
"invalid_field":{
4132
"message":"O campo selecionado não é válido para renderização em Markdown. Favor usar um editor de texto formatado.",
4233
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"

src/_locales/ru/messages.json

-9
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@
2828
"description":"Text shown on the context menu.",
2929
"inMozDTD":true
3030
},
31-
"context_menu_item_with_shortcut":{
32-
"message":"Переключить Mar&kdown",
33-
"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 '&'."
34-
},
35-
"context_menu_item_shortcut":{
36-
"message":"k",
37-
"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.",
38-
"inMozDTD":true
39-
},
4031
"invalid_field":{
4132
"message":"Рендеринг Markdown не применим к выбранному полю. Пожалуйста используйте WYSIWYG редактор.",
4233
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"

src/_locales/tr/messages.json

-9
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@
2828
"description":"Text shown on the context menu.",
2929
"inMozDTD":true
3030
},
31-
"context_menu_item_with_shortcut":{
32-
"message":"Mar&kdown Toggle",
33-
"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 '&'."
34-
},
35-
"context_menu_item_shortcut":{
36-
"message":"k",
37-
"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.",
38-
"inMozDTD":true
39-
},
4031
"invalid_field":{
4132
"message":"Seçilen alan Markdown dönüşümü için geçerli değildir. Lütfen bir zengin metin editörü kullanın.",
4233
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"

src/_locales/zh_CN/messages.json

-9
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@
2828
"description":"Text shown on the context menu.",
2929
"inMozDTD":true
3030
},
31-
"context_menu_item_with_shortcut":{
32-
"message":"Mar&kdown转换",
33-
"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 '&'."
34-
},
35-
"context_menu_item_shortcut":{
36-
"message":"k",
37-
"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.",
38-
"inMozDTD":true
39-
},
4031
"invalid_field":{
4132
"message":"选定的区域不支持Markdown转换,请使用富文本编辑器。",
4233
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"

src/_locales/zh_TW/messages.json

-9
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@
2828
"description":"Text shown on the context menu.",
2929
"inMozDTD":true
3030
},
31-
"context_menu_item_with_shortcut":{
32-
"message":"Mar&kdown切換",
33-
"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 '&'."
34-
},
35-
"context_menu_item_shortcut":{
36-
"message":"k",
37-
"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.",
38-
"inMozDTD":true
39-
},
4031
"invalid_field":{
4132
"message":"選擇的區域不支援Markdown算繪模式,請使用富文字編輯器。",
4233
"description":"Shown in an alert dialog if the user tries to render a field that cannot be rendered"

0 commit comments

Comments
 (0)