Skip to content

Commit 7a3a288

Browse files
Update 1.5.0
- Updated version for release of TOC menu and emoji - Tweaked use of Promise from storage.get() - BTW no longer works in Chrome; it doesn't follow spec
1 parent 89d8ff6 commit 7a3a288

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

ext/content.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ function addExtensionStylesheet(href, media) {
1818

1919
function addCustomStylesheet() {
2020
var p = webext.storage.sync.get('custom_css')
21-
p.then((storage) => {
21+
return p.then((storage) => {
2222
if ('custom_css' in storage) {
2323
var style = document.createElement('style');
2424
style.textContent = storage.custom_css;
2525
document.head.appendChild(style);
2626
}
2727
});
28-
return p;
2928
}
3029

3130
function makeAnchor(node) {
@@ -319,11 +318,10 @@ if (body.childNodes.length === 1 &&
319318
if (hash > 0) url = url.substr(0, hash); // Exclude fragment id from key.
320319
var scrollPosKey = encodeURIComponent(url) + ".scrollPosition";
321320

322-
processMarkdown(textContent).then(() =>
323-
addMarkdownViewerMenu().then(() =>
324-
createHTMLSourceBlob()
325-
)
326-
)
321+
processMarkdown(textContent)
322+
.then(() => addMarkdownViewerMenu())
323+
.then(() => createHTMLSourceBlob());
324+
327325
try {
328326
window.scrollTo.apply(window, JSON.parse(sessionStorage[scrollPosKey] || '[0,0]'));
329327
} catch(err) {}

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "Markdown Viewer Webext",
4-
"version": "1.4.0",
4+
"version": "1.5.0",
55
"author": "Keith L Robertson",
66
"homepage_url": "https://github.com/KeithLRobertson/markdown-viewer",
77
"description": "Displays markdown documents beautified in your browser.",

0 commit comments

Comments
 (0)