mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-07-05 04:35:23 +02:00
Paypal (#41)
* Implement Titan Tokens clientside * Titan Tokens can be modified in the admin panel
This commit is contained in:
committed by
GitHub
parent
d363b66799
commit
8bc95f7b0e
19
webapp/titanembeds/static/js/donate.js
Normal file
19
webapp/titanembeds/static/js/donate.js
Normal file
@ -0,0 +1,19 @@
|
||||
/* global $ */
|
||||
(function () {
|
||||
$('#token-slider').on('input', function(){
|
||||
var slider_value = $("#token-slider").val();
|
||||
var multiplier = 100;
|
||||
|
||||
$("#money-display").text(slider_value);
|
||||
$("#token-display").text(slider_value * multiplier);
|
||||
});
|
||||
|
||||
$("#donate-btn").click(function () {
|
||||
var slider_value = $("#token-slider").val();
|
||||
var form = $('<form method="POST">' +
|
||||
'<input type="hidden" name="amount" value="' + slider_value + '">' +
|
||||
'</form>');
|
||||
$(document.body).append(form);
|
||||
form.submit();
|
||||
});
|
||||
})();
|
Reference in New Issue
Block a user