% # vim:set sts=4 sw=4 ts=4 ft=javascript expandtab:
$(document).ready(function(){
    $('.modal-trigger').leanModal();
});
var ws_url  = '<%= url_for('upload')->to_abs() %>';
% if (defined($self->config('fixed_domain')) && $self->config('fixed_domain')) {
var baseURL = '<%= url_for('/')->host($self->config('fixed_domain'))->to_abs() %>';
% } else {
var baseURL = '<%= url_for('/')->to_abs() %>';
% }
var actionURL = '<%= url_for('/')->to_abs() %>';
var i18n    = {
    enqueued:     '<%= l('XXX file has been added to upload queue.') %>',
    confirmExit:  '<%= l('You have attempted to leave this page. The upload will be canceled. Are you sure?') %>',
    copyAll:      '<%= l('Copy all links to clipboard') %>',
    copySuccess:  '<%= l('The link(s) has been copied to your clipboard') %>',
    copyFail:     '<%= l('Unable to copy the link(s) to your clipboard') %>',
    cpText:       '<%= l('Copy to clipboard') %>',
    delText:      '<%= l('Deletion link') %>',
    dlText:       '<%= l('Download link') %>',
    download:     '<%= l('Download') %>',
    encrypting:   '<%= l('Encrypting part XX1 of XX2') %>',
    expiration:   '<%= l('Expiration:') %>',
    fileUploaded: '<%= l('File uploaded') %>',
    hit:          '<%= l('Hit Enter, then Ctrl+C to copy the download link') %>',
    hits:         '<%= l('Hit Enter, then Ctrl+C to copy all the download links') %>',
    mailTo:       '<%= l('Send all links by email') %>',
    maxSize:      '<%= l('(max size: XXX)') %>',
    noLimit:      '<%= l('No expiration delay') %>',
    sending:      '<%= l('Sending part XX1 of XX2. Please, be patient, the progress bar can take a while to move.') %>',
    wsProblem:    '<%= l('Websocket communication error') %>',
};
var maxSize = <%= config('max_file_size') || 0 %>;

% if (stash('token')) {
var isGuest          = true;
var sendFilesURLsURL = '<%= url_for('guest_send_mail', token => stash('token'))->to_abs() %>';
% } else {
var isGuest = false;
% }
