Mercurial > zeropaste
annotate app/assets/javascripts/zp.formatter.js.coffee @ 356:cd1c3a28b89a
Set correct expiration header.
author | edogawaconan <me@myconan.net> |
---|---|
date | Mon, 04 Aug 2014 17:54:32 +0900 |
parents | 55287d8a5a04 |
children |
rev | line source |
---|---|
348 | 1 #= require config/marked |
2 #= require config/prettify | |
3 window.zp.formatter = | |
4 raw: -> $("#pl pre").text() | |
5 links: -> $("#paste-mode a") | |
6 current: -> $("#paste-mode .active a").attr("href").slice(1) | |
7 markdown: -> | |
8 $("#md div") | |
9 .html(marked @raw()) | |
10 .find("pre").addClass "prettyprint" | |
11 .end() | |
12 .find("a").prop "rel", "nofollow" | |
13 highlight: -> | |
14 $("#hl pre").text @raw() | |
15 prettyPrint() | |
16 init: -> | |
17 @markdown() | |
18 @highlight() |