diff --git a/README.md b/README.md index c9e1e432..7b60c8b8 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,23 @@ +# WebExtensions notes + +* Ampersand in context menu item (just remove? programmatically?) +* Toolbar logo looks crap on dark background + - Doesn't seem to be a way to detect theme and show appropriate icon. (See [this SO question](https://stackoverflow.com/questions/37366781/how-to-detect-firefox-theme)). Maybe will need to provide an option for user to choose icon. +* Hotkey doesn't work +* Build stuff and MetaScript stuff will need to change. Separate Firefox from Thunderbird et al. +* `applications` key can't be in `manifest.json` for Chrome +* Decide on whether to keep using AMO. + + # ![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)
+[**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/)
*Markdown Here* is a Google Chrome, Firefox, Safari, Opera, and Thunderbird extension that lets you write email in Markdown and render them before sending. It also supports syntax highlighting (just specify the language in a fenced code block). @@ -14,19 +25,19 @@ Writing email with code in it is pretty tedious. Writing Markdown with code in i 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). -†: And Google Groups posts, and Blogger posts, and Evernote notes, and Wordpress posts! [See more](#compatibility). +†: And Google Groups posts, and Blogger posts, and Evernote notes, and Wordpress posts! [See more](#compatibility).
‡: And TeX mathematical formulae! ![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)**
+**[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 @@ -66,7 +77,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 @@ -113,7 +124,7 @@ In Gmail, you can also use the browser's Undo command (CTRL+Z= 0) { +if (typeof(navigator) !== 'undefined' && + (navigator.userAgent.indexOf('Chrome') >= 0 || navigator.userAgent.indexOf('Firefox') >= 0)) { this.OptionsStore = ChromeOptionsStore; } else if (typeof(navigator) !== 'undefined' && navigator.userAgent.match(/AppleWebKit.*Version.*Safari/)) { this.OptionsStore = SafariOptionsStore; } -else /*? } */ { +else /*? } */ { // Thunderbird, Postbox, Icedove this.OptionsStore = MozillaOptionsStore; } diff --git a/src/common/test/utils-test.js b/src/common/test/utils-test.js index 7ee066f1..c8ce4016 100644 --- a/src/common/test/utils-test.js +++ b/src/common/test/utils-test.js @@ -548,10 +548,15 @@ describe('Utils', function() { // The sibling of the selected node *is not* intersected. expect(Utils.rangeIntersectsNode(range, $('#test-elem-2')[0])).to.be.false; + }); + + // I have found that Range.intersectsNode is broken on Chrome. I'm adding + // test to see if/when it gets fixed. + it('Range.intersectsNode is broken on Chrome', function() { + var range = document.createRange(); + range.selectNode($('#test-elem-1')[0]); - // I have found that Range.intersectsNode is broken on Chrome. I'm adding - // test to see if/when it gets fixed. - if (typeof(window.chrome) !== 'undefined') { + if (typeof(window.chrome) !== 'undefined' && navigator.userAgent.indexOf('Chrome') >= 0) { expect(range.intersectsNode($('#test-elem-2')[0])).to.be.true; } }); diff --git a/src/common/utils.js b/src/common/utils.js index 24f78765..9bcbfdd3 100644 --- a/src/common/utils.js +++ b/src/common/utils.js @@ -451,10 +451,10 @@ function makeRequestToPrivilegedScript(doc, requestObj, callback) { // If `callback` is undefined and we pass it anyway, Chrome complains with this: // Uncaught Error: Invocation of form extension.sendMessage(object, undefined, null) doesn't match definition extension.sendMessage(optional string extensionId, any message, optional function responseCallback) if (callback) { - chrome.extension.sendMessage(requestObj, callback); + chrome.runtime.sendMessage(requestObj, callback); } else { - chrome.extension.sendMessage(requestObj); + chrome.runtime.sendMessage(requestObj); } } else if (typeof(safari) !== 'undefined') { diff --git a/src/manifest.json b/src/manifest.json index 5a91f968..7be90b0b 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -4,7 +4,6 @@ "version": "2.12.0", "description": "__MSG_app_slogan__", "homepage_url": "http://markdown-here.com", - "minimum_chrome_version": "6", "default_locale": "en", "icons": { "16": "common/images/icon16.png", @@ -36,5 +35,15 @@ }, "default_title": "__MSG_toggle_button_tooltip__" }, - "options_page": "common/options.html" + "options_ui": { + "page": "common/options.html", + "open_in_tab": true + }, + + "applications": { + "gecko": { + "id": "markdown-here@adam.pritchard", + "update_url": "https://example.com/updates.json" + } + } }