diff options
Diffstat (limited to 'share/www/script/futon.browse.js')
-rw-r--r-- | share/www/script/futon.browse.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/share/www/script/futon.browse.js b/share/www/script/futon.browse.js index b85e8691..0ff86f94 100644 --- a/share/www/script/futon.browse.js +++ b/share/www/script/futon.browse.js @@ -205,6 +205,16 @@ $.cookies.get(db.name + ".reduce", "") ); } + $("#viewcode textarea").change(function() { + if (page.viewLanguage == "javascript") { + try { + var func = eval("(" + $(this).val() + ")"); + $(this).removeClass("invalid").next(".error").remove(); + } catch (err) { + $(this).addClass("invalid").data("error", err.message); + } + } + }); page.populateLanguagesMenu(); } |