Skip to content

Commit

Permalink
Add customizable result message
Browse files Browse the repository at this point in the history
  • Loading branch information
Scribblerockerz committed Jan 31, 2019
1 parent 172bbab commit 6f43c5c
Show file tree
Hide file tree
Showing 7 changed files with 3,374 additions and 3,704 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).


## [unreleased]
### Added
- Add customizable result message

### Changed
- Updated unsecure packages

## [v1.1.2] - 05.03.18
### Changed
- Update moment dependency up to 2.21.0
Expand Down
5 changes: 3 additions & 2 deletions assets/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,18 @@ $(document).ready(function () {
var $urlField = $('#url');
var $formStage = $('.js--stage-form');
var $linkStage = $('.js--stage-url');
var template = $('#template-result-format').html();

var encryptedMessage = AES.encrypt($messageField.val().trim(), secret).toString();
var delay = $('#delay').val();


$('#selected-delay').text(delay);

animateEncryptionOnText($messageField, function () {
$.post('/', { message: encryptedMessage, delay: delay }, function (res) {
if (res.success && res.token) {
$urlField.val(getSecretUrl(res.token, secret));
var secureUrl = getSecretUrl(res.token, secret);
$urlField.html(template.replace('%minutes%', delay).replace('%url%', secureUrl));
$formStage.slideUp(300);
$linkStage.slideDown(300);
$urlField.select();
Expand Down
Loading

0 comments on commit 6f43c5c

Please sign in to comment.