diff app/assets/javascripts/zp.new.coffee @ 370:5a4d31e97937

Remove extra file extensions.
author edogawaconan <me@myconan.net>
date Tue, 14 Apr 2015 00:22:07 +0900
parents app/assets/javascripts/zp.new.js.coffee@66fd92af3977
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/assets/javascripts/zp.new.coffee	Tue Apr 14 00:22:07 2015 +0900
@@ -0,0 +1,16 @@
+#= require jquery.autosize
+#= require autosize_box_fix
+window.zp.new =
+  input: -> $("#paste_paste")
+
+  clear: (e) ->
+    e.preventDefault()
+    @input().val("").focus()
+
+  init: ->
+    return unless @input().length
+
+    $(document).on "click", "#reset_paste", $.proxy(@clear, this)
+    @input().autosize className: "mirrored_text form-control", append: "\n"
+    $.autosize_box_fix $(".mirrored_text")
+    @input().focus()