Skip to content

Commit 14da71c

Browse files
committed
clean up more code
1 parent 40d65e5 commit 14da71c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

docs/demo/demo.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Promise.all([
8080
});
8181

8282
function setInitialText() {
83-
if (search.text) {
83+
if ('text' in search) {
8484
$markdownElem.value = search.text;
8585
} else {
8686
return fetch('./initial.md')
@@ -148,7 +148,7 @@ function setInitialVersion() {
148148
}
149149

150150
function setInitialOptions() {
151-
if (search.options) {
151+
if ('options' in search) {
152152
$optionsElem.value = search.options;
153153
} else {
154154
setDefaultOptions();

docs/demo/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ <h1>Marked Demo</h1>
5858
<noscript>
5959
<h2>You'll need to enable Javascript to use this tool.</h2>
6060
</noscript>
61-
<iframe src="./preview.html" frameborder="0" sandbox="allow-same-origin"></iframe>
61+
<iframe src="./preview.html" frameborder="0" sandbox="allow-same-origin allow-top-navigation-by-user-activation"></iframe>
6262
</div>
6363

6464
<textarea id="html" class="pane" readonly="readonly"></textarea>

docs/demo/initial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ It's easy. It's not overly bloated, unlike HTML. Also, as the creator of [mark
3030
> or formatting instructions.
3131
3232
Ready to start writing? Either start changing stuff on the left or
33-
[clear everything](?text=) with a simple click.
33+
[clear everything](/demo/?text=) with a simple click.
3434

3535
[Marked]: https://github.com/markedjs/marked/
3636
[Markdown]: http://daringfireball.net/projects/markdown/

docs/demo/worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function jsonString(input) {
8383

8484
function loadVersion(ver) {
8585
var promise;
86-
if (ver in versionCache) {
86+
if (versionCache[ver]) {
8787
promise = Promise.resolve(versionCache[ver]);
8888
} else {
8989
promise = fetch(ver)

0 commit comments

Comments
 (0)