Browse Source

* autoswitch 'source' radio for zerobin

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

7
public/js/zerobin.js

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

3
templates/zerobin/create.html.ep

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

Loading…
Cancel
Save