diff --git a/htdocs/themes/default/css/main.css b/htdocs/themes/default/css/main.css index 0ae1ed8..196b77c 100644 --- a/htdocs/themes/default/css/main.css +++ b/htdocs/themes/default/css/main.css @@ -242,7 +242,6 @@ h4 { } .form_wrapper button { - clear: both; float: left; margin-left: 150px; width: 125px; @@ -260,6 +259,10 @@ h4 { margin-top: 20px; } +#create_encrypted { + margin-left: 10px; +} + .form_wrapper .dangerbutton:hover { background: #f00; } diff --git a/htdocs/themes/default/js/stikked.js b/htdocs/themes/default/js/stikked.js index c709591..5015349 100644 --- a/htdocs/themes/default/js/stikked.js +++ b/htdocs/themes/default/js/stikked.js @@ -108,12 +108,14 @@ ST.highlight_lines = function() { } ST.crypto = function() { - $('button[name=submit]').on('mouseenter', function() { + $('button[name=submit]').after(''); + $('#create_encrypted').on('click', function() { var $code = $('#code'); var key = ST.crypto_generate_key(); var encrypted = CryptoJS.AES.encrypt($code.val(), key) + ''; encrypted = encrypted.replace(/(.{100})/g, "$1\n"); $code.val(encrypted + '\n\n' + '#' + key); + return false; }); }