Skip to content

Commit

Permalink
clean up more code
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Feb 14, 2019
1 parent 40d65e5 commit 14da71c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Promise.all([
});

function setInitialText() {
if (search.text) {
if ('text' in search) {
$markdownElem.value = search.text;
} else {
return fetch('./initial.md')
Expand Down Expand Up @@ -148,7 +148,7 @@ function setInitialVersion() {
}

function setInitialOptions() {
if (search.options) {
if ('options' in search) {
$optionsElem.value = search.options;
} else {
setDefaultOptions();
Expand Down
2 changes: 1 addition & 1 deletion docs/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h1>Marked Demo</h1>
<noscript>
<h2>You'll need to enable Javascript to use this tool.</h2>
</noscript>
<iframe src="./preview.html" frameborder="0" sandbox="allow-same-origin"></iframe>
<iframe src="./preview.html" frameborder="0" sandbox="allow-same-origin allow-top-navigation-by-user-activation"></iframe>
</div>

<textarea id="html" class="pane" readonly="readonly"></textarea>
Expand Down
2 changes: 1 addition & 1 deletion docs/demo/initial.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ It's easy. It's not overly bloated, unlike HTML. Also, as the creator of [mark
> or formatting instructions.
Ready to start writing? Either start changing stuff on the left or
[clear everything](?text=) with a simple click.
[clear everything](/demo/?text=) with a simple click.

[Marked]: https://github.com/markedjs/marked/
[Markdown]: http://daringfireball.net/projects/markdown/
2 changes: 1 addition & 1 deletion docs/demo/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function jsonString(input) {

function loadVersion(ver) {
var promise;
if (ver in versionCache) {
if (versionCache[ver]) {
promise = Promise.resolve(versionCache[ver]);
} else {
promise = fetch(ver)
Expand Down

0 comments on commit 14da71c

Please sign in to comment.