summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-10-26 21:17:10 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-10-26 21:17:10 -0700
commit695b5f3705fbdb42dd7422e4dc88f25e895d1406 (patch)
tree55335966df6652130fa9e8e62bd94a8e5bc32907
parentf22281f2d15a786d512269ddd546b5b4c0462f4c (diff)
Dingus improvements; moved to top level.
-rw-r--r--Makefile4
-rw-r--r--dingus.html (renamed from js/dingus.html)5
2 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index c2899ea..b1a950b 100644
--- a/Makefile
+++ b/Makefile
@@ -77,7 +77,7 @@ install: libcmark.so $(cmark_HDR) $(HTML_HDR)
install $(HTML_HDR) $(PREFIX)/include/cmark/html/
dingus: js/commonmark.js
- cd js && echo "Starting dingus server at http://localhost:9000" && python -m SimpleHTTPServer 9000
+ echo "Starting dingus server at http://localhost:9000" && python -m SimpleHTTPServer 9000
leakcheck: $(PROG)
cat leakcheck.md | valgrind --leak-check=full --dsymutil=yes $(PROG)
@@ -101,7 +101,7 @@ _site/$(SPECVERSION)/index.html: spec.html
cd _site; git add $(SPECVERSION)/index.html; git commit -a -m "Added version $(SPECVERSION) of spec"; cd ..
update-site: spec.html js/commonmark.js _site/index.html _site/$(SPECVERSION)/index.html _site/spec.html
- cp js/index.html _site/js/
+ cp dingus.html _site/
cp js/commonmark.js _site/js/
cp js/LICENSE _site/js/
(cd _site ; git pull ; git commit -a -m "Updated site for latest spec, js" ; git push; cd ..)
diff --git a/js/dingus.html b/dingus.html
index ecaeb33..8c35fe5 100644
--- a/js/dingus.html
+++ b/dingus.html
@@ -6,7 +6,7 @@
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
- <script src="commonmark.js"></script>
+ <script src="js/commonmark.js"></script>
<script type="text/javascript">
var writer = new commonmark.HtmlRenderer();
@@ -25,7 +25,6 @@ function getQueryVariable(variable)
$(document).ready(function() {
- $("#text").val(getQueryVariable("text"));
var timer;
var x;
var parsed;
@@ -65,6 +64,8 @@ $(document).ready(function() {
render();
}, 0); // ms delay
};
+ $("#text").val(getQueryVariable("text"));
+ parseAndRender();
$("#clear-text-box").click(function(e) {
$("#text").val('');
window.location.search = "";