diff --git a/src/index.html b/src/index.html
index f8d4dc2..abf7c34 100644
--- a/src/index.html
+++ b/src/index.html
@@ -106,7 +106,7 @@
diff --git a/src/script.js b/src/script.js
index 3841336..aed5612 100644
--- a/src/script.js
+++ b/src/script.js
@@ -91,7 +91,6 @@ runBtn, searchInput, consoleEl, consoleLogEl
;
scope.cm = {};
- scope.consoleCm;
scope.frame = frame;
scope.demoFrameDocument = frame.contentDocument || frame.contentWindow.document;
@@ -1311,7 +1310,10 @@ runBtn, searchInput, consoleEl, consoleLogEl
scope.consoleCm.setValue('');
};
scope.evalConsoleExpr = function (e) {
- if (e.which === 13) {
+ // Clear console on CTRL + L
+ if (((e.which === 76 || e.which === 12) && e.ctrlKey)) {
+ scope.clearConsole();
+ } else if (e.which === 13) {
window.onMessageFromConsole('> ' + e.target.value);
frame.contentWindow._wmEvaluate(e.target.value);
e.target.value = '';
@@ -1322,10 +1324,10 @@ runBtn, searchInput, consoleEl, consoleLogEl
if (arg && arg.indexOf && arg.indexOf('filesystem:chrome-extension') !== -1) {
arg = arg.replace(/filesystem:chrome-extension.*\.js:(\d+):(\d+)/g, 'script $1:$2');
}
- scope.consoleCm.replaceRange('\n' + arg + ((arg + '').match(/\[object \w+\]/) ? JSON.stringify(arg) : '') + ' ', {line: Infinity});
+ scope.consoleCm.replaceRange('\n' + arg + ' ' + ((arg + '').match(/\[object \w+]/) ? JSON.stringify(arg) : ''), { line: Infinity });
scope.consoleCm.scrollTo(0, Infinity);
});
- }
+ };
function compileNodes() {
function attachListenerForEvent(eventName) {
@@ -1339,7 +1341,7 @@ runBtn, searchInput, consoleEl, consoleLogEl
attachListenerForEvent('click');
attachListenerForEvent('change');
attachListenerForEvent('input');
- attachListenerForEvent('keypress');
+ attachListenerForEvent('keyup');
}
function init () {
diff --git a/src/style.css b/src/style.css
index 393e9ef..303d941 100644
--- a/src/style.css
+++ b/src/style.css
@@ -279,9 +279,11 @@ li.CodeMirror-hint-active {
background-color: rgb(18, 19, 27);
color: rgba(255, 255, 255, 0.45);
border-top: 1px solid rgba(255,255,255,0.14);
- z-index: 1;
/*line-height: 20px;*/
}
+.footer {
+ z-index: 1;
+}
.main-header {
border: 0;
border-bottom: 1px solid rgba(255,255,255,0.14);