<commit_before>@(message: Html, paste: String)

@main("scastie") {
  @helper.form(action = routes.Pastes.add()) {
    <textarea name="paste" style="display : none ;" rows="50" cols="110" autofocus="" maxlength="10000" class='paste'>@paste</textarea>
    <div name="paste" rows="50" cols="110" autofocus="" maxlength="10000" class='paste' id="paste"></div>

    <script src="http://ace.c9.io/build/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
    <script>
      var mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
      var textarea = $('textarea[name="paste"]');
      if (mobile) {
        textarea.css('display', '')
      } else {
        var editor = ace.edit("paste");
        editor.setTheme("ace/theme/solarized_light");
        editor.getSession().setMode("ace/mode/scala");
        editor.getSession().setTabSize(2);
        editor.getSession().setValue(textarea.val());
        editor.getSession().on('change', function(){
          textarea.val(editor.getSession().getValue());
        });
      }<commit_msg>actually display textarea on mobile<commit_after>@(message: Html, paste: String)

@main("scastie") {
  @helper.form(action = routes.Pastes.add()) {
    <textarea name="paste" style="display : none ;" rows="50" cols="110" autofocus="" maxlength="10000" class='paste'>@paste</textarea>
    <div name="paste" rows="50" cols="110" autofocus="" maxlength="10000" class='paste' id="paste"></div>

    <script src="http://ace.c9.io/build/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
    <script>
      var mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
      var textarea = $('textarea[name="paste"]');
      if (mobile) {
        $('div[name="paste"]').hide();
        textarea.css('display', '')
      } else {
        var editor = ace.edit("paste");
        editor.setTheme("ace/theme/solarized_light");
        editor.getSession().setMode("ace/mode/scala");
        editor.getSession().setTabSize(2);
        editor.getSession().setValue(textarea.val());
        editor.getSession().on('change', function(){
          textarea.val(editor.getSession().getValue());
        });
      }
{'fraction_non_alphanumeric': 0.1974438078448656, 'fraction_numerical': 0.020273248126928163, 'mean_word_length': 3.819532908704883, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4907366', 'n_tokens_mistral': 787, 'n_tokens_neox': 719, 'n_words': 105}