Skip to content

Commit

Permalink
popup does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
madneal committed Jun 5, 2017
1 parent 5e4ebe8 commit 2e8ea5d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 3 additions & 4 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@
"permissions": [
"tabs",
"http://*/*",
"https://*/*",
{"fileSystem": ["write", "retainEntries", "directory"]}
"https://*/*"
],
"browser_action": {
"default_title": "Export to Markdown",
"default_icon": "icons/icon-19.png",
"default_popup": "popup.html"
"default_icon": "icons/icon-19.png"
// "default_popup": "popup.html"
},
"manifest_version": 2,
"homepage_url": "https://github.com/neal1991"
Expand Down
1 change: 1 addition & 0 deletions popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="scripts/widget.js"></script>
</head>
<body>
<h1>The export result</h1>
Expand Down
3 changes: 2 additions & 1 deletion scripts/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ chrome.browserAction.onClicked.addListener(function(tab) {
})
.then(function(text) {
const story = parseJsonToMarkdown(text);
const markdownText = story.markdown.join('');
document.querySelector('#source').value = story.markdown;
document.querySelector('.right-area').innerHTML =
document.querySelector('.right-area').innerHTML = snarkdown(story.markdown);
// return story.markdown;
})
// .then(function(contents) {
Expand Down

0 comments on commit 2e8ea5d

Please sign in to comment.