Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion js/plt.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ $(function() {
var cssNode = document.createElement('style');
cssNode.innerHTML = "body { font-family: sans-serif; }";
cssNode.innerHTML += "code { display: block; white-space: pre; margin-bottom: 1em; }";
cssNode.innerHTML += "#repl { height: 50px; }";
cssNode.innerHTML += "#repl { height: 20%; position: fixed; right: 0.5em; bottom: 0.5em; left: 0.5em; padding: 0.75em; overflow: scroll; background-color: rgb(240,240,240); box-shadow: inset 0px 2px 4px gray; border-bottom: solid lightgray 0.1em; border-radius: 0.5em; color: black; }";
cssNode.innerHTML += "#container { height: 69%; overflow: scroll; }";
cssNode.innerHTML += "textarea { opacity:0 }";
cssNode.innerHTML += ".jqconsole-cursor { background: gray; }";
document.body.appendChild(cssNode);
Expand All @@ -31,6 +32,12 @@ $(function() {
PLT.parser = PEG.buildParser(grammarElement.text())
grammarElement.remove();

// takes the content of the 'body' and moves it into the newly created <div id="container">
var body = $('body').html();
$('body').html('');
$('body').prepend('<div id="container"></div>');
$('#container').html(body);

// build repl object
$('<div id="repl">').
appendTo("body");
Expand Down