Skip to content

Commit

Permalink
Add edge
Browse files Browse the repository at this point in the history
  • Loading branch information
simov committed Jan 14, 2021
1 parent 455cc00 commit 059f319
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Markdown Viewer / Browser Extension

**Install: [Chrome]** / **[Firefox]** / **[Opera]**
**Install: [Chrome]** / **[Firefox]** / **[Opera]** / **[Edge]**


# Features
Expand Down Expand Up @@ -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)

Expand Down
85 changes: 85 additions & 0 deletions manifest.edge.json
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions options/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
8 changes: 5 additions & 3 deletions options/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')

0 comments on commit 059f319

Please sign in to comment.