diff --git a/css/style.css b/css/style.css index b3e2e62602..76c43cbf17 100644 --- a/css/style.css +++ b/css/style.css @@ -117,8 +117,9 @@ a:hover { #bin { top: 52px; width: 100%; - opacity: 0; -} +/* opacity: 0; + filter:alpha(opacity=0); +*/} div.html { left: 50%; @@ -153,6 +154,16 @@ div.code, #live, .resize { } .block { + border: 0; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 99999; + width: 100%; + height: 100%; + background: transparent; cursor: ew-resize; } @@ -480,10 +491,10 @@ body.preview #source select { } textarea { - opacity: 0; +/* opacity: 0; -moz-opacity: 0; filter:alpha(opacity=0); - margin: 0.4em; +*/ margin: 0.4em; border: 0; padding: 0; font-family: Menlo, Monaco, consolas, monospace; @@ -1021,21 +1032,14 @@ details li, .details li { margin: .6em; } -.javascript .CodeMirror > div { +.javascript .CodeMirror-scroll { margin-top: 25px; } -.html .CodeMirror > div { +.html .CodeMirror-scroll { margin-top: 60px; } -.ie .html .CodeMirror > div { - margin-top: 30px; -} - -.CodeMirror pre { -/* white-space: pre-wrap !important;*/ -} .editor .CodeMirror { height: 100%; @@ -1046,14 +1050,20 @@ details li, .details li { .CodeMirror { overflow: auto; height: 300px; -/* top: 0;*/ -/* bottom: 0;*/ -/* line-height: 1em;*/ font-size: 12px; font-family: MenschRegular, Menlo, Monaco, consolas, monospace; _position: relative; /* IE6 hack */ } +.ie7 .CodeMirror { + background: #fff; +} + +.CodeMirror div { + position: relative; + zoom: 1; +} + .CodeMirror-gutter { position: absolute; left: 0; top: 0; background-color: #f7f7f7; @@ -1184,4 +1194,5 @@ span.CodeMirror-selected { #bin.ready { opacity: 1; +/* filter:alpha(opacity=1);*/ } \ No newline at end of file diff --git a/index.php b/index.php index 6cced58b71..57470b3480 100644 --- a/index.php +++ b/index.php @@ -8,6 +8,22 @@ if ($code_id) { $code_id_path = '/' . $code_id; } + +if (@$_POST['inject'] && @$_POST['html']) { + $jsonReplaces = array(array("\\", "/", "\n", "\t", "\r", "\b", "\f", '"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"')); + $html = '"' . str_replace($jsonReplaces[0], $jsonReplaces[1], $_POST['html']) . '"'; +} else { +/* */ + list($code_id, $revision) = getCodeIdParams($request); + + $edit_mode = false; + + if ($code_id) { + list($latest_revision, $html, $javascript) = getCode($code_id, $revision); + } else { + list($html, $javascript) = defaultCode(); + } +} ?> @@ -17,7 +33,8 @@ - + +
JavaScript