<commit_before>:coffeescript
  $ ->
    window.createPixelEditor = (options) ->
      width = options.width
      height = options.height
      dataUrl = options.dataUrl
      title = options.title
      path = options.path
      tab = null

      pixelEditor = $('<div />').pixie
        width: width
        height: height
        frames: 1
        initializer: (canvas) ->
          if dataUrl
            canvas.fromDataURL(dataUrl)

          canvas.addAction
            name: "Save"
            icon: "/images/icons/database_save.png"
            perform: (canvas) ->
              tab = $("#tabs ul li").eq($("#tabs").tabs('option', 'selected'))

              pixelEditor.trigger 'save',
                contents_base64: canvas.toBase64()
                path: path

            undoable: false<commit_msg>Moved pixel editor method declaration to outside of on load<commit_after>:coffeescript
  window.createPixelEditor = (options) ->
    width = options.width
    height = options.height
    dataUrl = options.dataUrl
    title = options.title
    path = options.path
    tab = null

    pixelEditor = $('<div />').pixie
      width: width
      height: height
      frames: 1
      initializer: (canvas) ->
        if dataUrl
          canvas.fromDataURL(dataUrl)

        canvas.addAction
          name: "Save"
          icon: "/images/icons/database_save.png"
          perform: (canvas) ->
            tab = $("#tabs ul li").eq($("#tabs").tabs('option', 'selected'))

            pixelEditor.trigger 'save',
              contents_base64: canvas.toBase64()
              path: path

          undoable: false
{'fraction_non_alphanumeric': 0.11521873074553296, 'fraction_numerical': 0.0061614294516327784, 'mean_word_length': 1.8243478260869566, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '2464547', 'n_tokens_mistral': 449, 'n_tokens_neox': 430, 'n_words': 106}