Mercurial > zeropaste
view app/assets/javascripts/zp.new.js @ 349:f802099acd37
coffee: hash_magic.
author | edogawaconan <me@myconan.net> |
---|---|
date | Thu, 03 Jul 2014 15:03:34 +0900 |
parents | 3ce44f960d3a |
children |
line wrap: on
line source
//= require jquery.autosize //= require autosize_box_fix (function($) { window.zp.new = { input: function() { return $("#paste_paste") }, clear: function(e) { this.input().val("").focus() e.preventDefault() }, init: function() { if (this.input().length === 0) { return } $(document).on('click', "#reset_paste", $.proxy(this.clear, this)) this.input().autosize({ className: 'mirrored_text form-control', append: "\n"}); $.autosize_box_fix($(".mirrored_text")) this.input().focus() } } })(jQuery)