Mercurial > zeropaste
comparison app/assets/javascripts/init.tabs.js @ 104:9825e51ba30f
Minor reorganization.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Mon, 12 Nov 2012 11:29:22 +0700 |
parents | a8768ad51926 |
children | a949b71c9afb |
comparison
equal
deleted
inserted
replaced
103:a8768ad51926 | 104:9825e51ba30f |
---|---|
1 $(document).ready(function() { | 1 $(document).ready(function() { |
2 raw = $('#plain > pre').text(); | 2 raw = $('#plain > pre').text(); |
3 $('#highlight > pre').text(raw); | 3 |
4 $('#markdown > div').html(marked(raw)); | 4 $('#highlight pre').text(raw); |
5 window.prettyPrint && prettyPrint(); | |
6 | |
7 $('#markdown div').html(marked(raw)); | |
8 | |
5 mode = window.location.hash.substr(1); | 9 mode = window.location.hash.substr(1); |
6 if (mode == 'highlight') { $('#paste-tabs li:eq(1) a').click(); } | 10 if (mode == 'highlight') { $('#paste-tabs li:eq(1) a').click(); } |
7 else if (mode == 'markdown') { $('#paste-tabs li:eq(2) a').click(); } | 11 else if (mode == 'markdown') { $('#paste-tabs li:eq(2) a').click(); } |
8 window.prettyPrint && prettyPrint(); | |
9 }); | 12 }); |