Browse Source

* autoswitch 'source' radio for zerobin

master
Alex 'AdUser' Z 9 years ago
parent
commit
e855617e98
  1. 7
      public/js/zerobin.js
  2. 1
      templates/zerobin/create.html.ep

7
public/js/zerobin.js

@ -2,4 +2,11 @@ $(document).ready(function() {
$('pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
$('#paste').on('change', function() {
$('input[name=source]').val(['form']);
});
$('#upload').on('change', function() {
$('input[name=source]').val(['file']);
});
});

1
templates/zerobin/create.html.ep

@ -3,6 +3,7 @@
% my %times = (day => 1, week => 7, month => 30, quarter => 90, year => 395);
% my @times = map { [l($_) => $times{$_}] } sort { $times{$a} <=> $times{$b} } keys(%times);
% stash 'styles' => 'zerobin';
% stash 'scripts' => 'jquery zerobin';
% param 'expire' => 30;
% my $syntax = (stash 'syntax') || [];
% param 'syntax' => '';

Loading…
Cancel
Save