simov 4 years ago
parent
commit
059f3192d4
4 changed files with 93 additions and 5 deletions
  1. 2 2
      README.md
  2. 85 0
      manifest.edge.json
  3. 1 0
      options/index.html
  4. 5 3
      options/index.js

+ 2 - 2
README.md

@@ -1,7 +1,7 @@
 
 # Markdown Viewer / Browser Extension
 
-**Install: [Chrome]** / **[Firefox]** / **[Opera]**
+**Install: [Chrome]** / **[Firefox]** / **[Opera]** / **[Edge]**
 
 
 # Features
@@ -368,7 +368,7 @@ SOFTWARE.
   [chrome]: https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk
   [firefox]: https://addons.mozilla.org/en-US/firefox/addon/markdown-viewer-chrome/
   [opera]: #opera
-  [edge]: #edge
+  [edge]: https://microsoftedge.microsoft.com/addons/detail/markdown-viewer/cgfmehpekedojlmjepoimbfcafopimdg
   [paypal]: https://www.paypal.me/simeonvelichkov
   [donate]: https://img.shields.io/badge/paypal-donate-blue.svg?style=flat-square (Donate on Paypal)
 

+ 85 - 0
manifest.edge.json

@@ -0,0 +1,85 @@
+{
+  "manifest_version": 2,
+  "name"            : "Markdown Viewer",
+  "version"         : "4.0",
+  "description"     : "Markdown Viewer",
+
+  "browser_action": {
+    "default_icon": {
+      "19" : "/icons/icon19.png",
+      "38" : "/icons/icon38.png"
+    },
+    "default_title": "Markdown Viewer",
+    "default_popup": "/popup/index.html"
+  },
+
+  "options_page": "/options/index.html",
+
+  "background" : {
+    "scripts": [
+      "/vendor/marked.min.js",
+      "/vendor/remark.min.js",
+
+      "/background/compilers/marked.js",
+      "/background/compilers/remark.js",
+
+      "/background/storage.js",
+      "/background/webrequest.js",
+      "/background/detect.js",
+      "/background/inject.js",
+      "/background/messages.js",
+      "/background/mathjax.js",
+      "/background/xhr.js",
+
+      "/background/index.js"
+    ],
+    "persistent": false
+  },
+
+  "web_accessible_resources": [
+    "/themes/github.css",
+    "/themes/github-dark.css",
+
+    "/themes/godspeed.css",
+    "/themes/new-modern.css",
+    "/themes/torpedo.css",
+    "/themes/vostok.css",
+
+    "/themes/ghostwriter.css",
+    "/themes/radar.css",
+    "/themes/foghorn.css",
+    "/themes/markdown.css",
+    "/themes/markedapp-byword.css",
+    "/themes/solarized-dark.css",
+    "/themes/solarized-light.css",
+
+    "/themes/screen.css",
+    "/themes/markdown5.css",
+    "/themes/markdown6.css",
+    "/themes/markdown7.css",
+    "/themes/markdown8.css",
+    "/themes/markdown9.css",
+    "/themes/markdown-alt.css"
+  ],
+
+  "icons": {
+    "16" : "/icons/icon16.png",
+    "48" : "/icons/icon48.png",
+    "128": "/icons/icon128.png"
+  },
+
+  "homepage_url": "https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk",
+
+  "permissions": [
+    "storage",
+    "file:///*"
+  ],
+
+  "optional_permissions": [
+    "https://*/",
+    "http://*/",
+    "*://*/",
+    "webRequest",
+    "webRequestBlocking"
+  ]
+}

+ 1 - 0
options/index.html

@@ -25,6 +25,7 @@
     <nav>
       <a href="https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk" class="icon-chrome icon-hidden">Chrome Store</a>
       <a href="https://addons.mozilla.org/en-US/firefox/addon/markdown-viewer-chrome/" class="icon-firefox icon-hidden">Firefox Store</a>
+      <a href="https://microsoftedge.microsoft.com/addons/detail/markdown-viewer/cgfmehpekedojlmjepoimbfcafopimdg" class="icon-edge icon-hidden">Edge</a>
       <a href="https://github.com/simov/markdown-viewer" class="icon-github">GitHub</a>
     </nav>
   </footer>

+ 5 - 3
options/index.js

@@ -9,6 +9,8 @@ m.mount(document.querySelector('main'), {
 })
 
 // ff: set appropriate footer icon
-document.querySelector(
-  '.icon-' + (/Firefox/.test(navigator.userAgent) ? 'firefox' : 'chrome')
-).classList.remove('icon-hidden')
+document.querySelector('.icon-' + (
+  /Firefox/.test(navigator.userAgent) ? 'firefox' :
+  /Edg/.test(navigator.userAgent) ? 'edge' :
+  'chrome'
+)).classList.remove('icon-hidden')