From 4481ff2b91d29fc7a9c3c2cb8e8197719dbb7f44 Mon Sep 17 00:00:00 2001 From: Thomas Aylott Date: Wed, 25 Feb 2009 11:18:39 -0500 Subject: [PATCH] added show code button on run javascript --- Commands/Run Javascript.tmCommand | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Commands/Run Javascript.tmCommand b/Commands/Run Javascript.tmCommand index 65690d9..f2ff0db 100644 --- a/Commands/Run Javascript.tmCommand +++ b/Commands/Run Javascript.tmCommand @@ -36,8 +36,11 @@ cat <<HTML }catch(e){ console.log(e.message); }; })(); </script> -<pre id="log"> +<input type="button" value="Show Code" onclick="var c=document.getElementById('code');c.style.display==''?c.style.display='none':c.style.display='';" /> +<pre id="code" style="display:none"> $YOURCODE +</pre> +<pre id="log"> <script> try{throw {}}catch(e){ window.__line=(e.line||0) + 3 }; try{