| | |
| | | <replacevalue> |
| | | <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> |
| | | <script type="text/javascript"> |
| | | // On click, reformat <pre class="screen"> for easy copying. |
| | | $(".screen").live("click", function() { |
| | | // On double-click, reformat <pre class="screen"> for easy copying. |
| | | $(".screen").live("dblclick", function() { |
| | | $(this).replaceWith( |
| | | "<pre class=\"flat\">" + |
| | | $(this).text().replace(/\n /g," ") + "\n<!--" + $(this).text() + "-->" + |
| | | "</pre>"); |
| | | }); |
| | | $(".flat").live("click", function() { |
| | | $(".flat").live("dblclick", function() { |
| | | $(this).replaceWith( |
| | | "<pre class=\"screen\">" + |
| | | $(this).html().replace(/(.|\n)+<!\-\-/m,"").replace(/\-\-\>/,"") + |
| | |
| | | <replacevalue> |
| | | <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> |
| | | <script type="text/javascript"> |
| | | // On click, reformat <pre class="screen"> for easy copying. |
| | | $(".screen").live("click", function() { |
| | | // On double-click, reformat <pre class="screen"> for easy copying. |
| | | $(".screen").live("dblclick", function() { |
| | | $(this).replaceWith( |
| | | "<pre class=\"flat\">" + |
| | | $(this).text().replace(/\n /g," ") + "\n<!--" + $(this).text() + "-->" + |
| | | "</pre>"); |
| | | }); |
| | | $(".flat").live("click", function() { |
| | | $(".flat").live("dblclick", function() { |
| | | $(this).replaceWith( |
| | | "<pre class=\"screen\">" + |
| | | $(this).html().replace(/(.|\n)+<!\-\-/m,"").replace(/\-\-\>/,"") + |