diff options
| author | Alon Levy <alon@pobox.com> | 2014-12-04 18:23:00 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-12-04 18:23:00 +0200 |
| commit | 52f4be6d1044f791d98f9d887e09034ec3a23f07 (patch) | |
| tree | 780f2de2c74dc878891279e676d73f0400b4d8a2 | |
| parent | 1ab8b2b0206b35cde4dfb2dec926731d808af78b (diff) | |
Fixes #112: /?debug=1 gives you back debugging helpers
| -rw-r--r-- | res/css/partials/dev-area.scss | 43 | ||||
| -rw-r--r-- | res/css/style.css | 13 | ||||
| -rw-r--r-- | src/main.js | 3 |
3 files changed, 35 insertions, 24 deletions
diff --git a/res/css/partials/dev-area.scss b/res/css/partials/dev-area.scss index 7d344a55..fa1cfbf3 100644 --- a/res/css/partials/dev-area.scss +++ b/res/css/partials/dev-area.scss @@ -1,25 +1,32 @@ .debug-ui { - position:fixed; - bottom:70px; - left:10px; - text-decoration: none; + display: none; } -.debug-ui-row { - float: left; - width: 100%; -} +body.debug { + .debug-ui { + display: inline; + position:fixed; + bottom:70px; + left:10px; + text-decoration: none; + } -.debug-ui-left { - float: left; - width: 50%; -} + .debug-ui-row { + float: left; + width: 100%; + } -.debug-ui-right { - float: right; - width: 50%; -} + .debug-ui-left { + float: left; + width: 50%; + } -.debug{ + .debug-ui-right { + float: right; + width: 50%; + } -}
\ No newline at end of file + .debug{ + + } +} diff --git a/res/css/style.css b/res/css/style.css index d2a214cb..e719243f 100644 --- a/res/css/style.css +++ b/res/css/style.css @@ -128,20 +128,21 @@ table { border-spacing: 0; } .debug-ui { + display: none; } + +body.debug .debug-ui { + display: inline; position: fixed; bottom: 70px; left: 10px; text-decoration: none; } - -.debug-ui-row { +body.debug .debug-ui-row { float: left; width: 100%; } - -.debug-ui-left { +body.debug .debug-ui-left { float: left; width: 50%; } - -.debug-ui-right { +body.debug .debug-ui-right { float: right; width: 50%; } diff --git a/src/main.js b/src/main.js index fd45a76d..4234beaf 100644 --- a/src/main.js +++ b/src/main.js @@ -23,6 +23,9 @@ function(textanalysis_ui, textanalysis, buttons, history, drag_n_drop, if (json) { rz_core.load_from_json(json); } + if (util.getParameterByName('debug')) { + $(document.body).addClass('debug'); + } document.body.onkeyup = function(e) { var key = (e.key || (e.charCode && String.fromCharCode(e.charCode)) |
