aboutsummaryrefslogtreecommitdiff
path: root/extension/pages/confirm-create-reserve.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-01-26 17:21:17 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-01-26 17:24:42 +0100
commitd2f1cb3234cbeca88903efcfd0d7d406fbece53c (patch)
tree6c1ab8ea8d3f1a0634aa21c83b6d39c7eac519da /extension/pages/confirm-create-reserve.js
parent5f996fedbc7542e1ba757a5a5856e43931ad7939 (diff)
fix #4153 and #0004154
Diffstat (limited to 'extension/pages/confirm-create-reserve.js')
-rw-r--r--extension/pages/confirm-create-reserve.js46
1 files changed, 26 insertions, 20 deletions
diff --git a/extension/pages/confirm-create-reserve.js b/extension/pages/confirm-create-reserve.js
index 193f496a6..ca9ef4099 100644
--- a/extension/pages/confirm-create-reserve.js
+++ b/extension/pages/confirm-create-reserve.js
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- (C) 2015 GNUnet e.V.
+ (C) 2015-2016 GNUnet e.V.
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -13,27 +13,26 @@
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
*/
-"use strict";
-var ConfirmCreateReserve;
-(function (ConfirmCreateReserve) {
- var url = URI(document.location.href);
- var query = URI.parseQuery(url.query());
- function updateAmount() {
- var showAmount = document.getElementById("show-amount");
- console.log("Query is " + JSON.stringify(query));
- var s = query.amount_str;
- if (!s) {
- document.body.innerHTML = "Oops, something went wrong.";
- return;
+System.register([], function(exports_1) {
+ "use strict";
+ function main() {
+ function updateAmount() {
+ var showAmount = document.getElementById("show-amount");
+ console.log("Query is " + JSON.stringify(query));
+ var s = query.amount_str;
+ if (!s) {
+ document.body.innerHTML = "Oops, something went wrong.";
+ return;
+ }
+ showAmount.textContent = s;
}
- showAmount.textContent = s;
- }
- document.addEventListener("DOMContentLoaded", function (e) {
+ var url = URI(document.location.href);
+ var query = URI.parseQuery(url.query());
updateAmount();
document.getElementById("confirm").addEventListener("click", function (e) {
var d = Object.assign({}, query);
d.mint = document.getElementById('mint-url').value;
- chrome.runtime.sendMessage({ type: 'confirm-reserve', detail: d }, function (resp) {
+ var cb = function (resp) {
if (resp.success === true) {
document.location.href = resp.backlink;
}
@@ -41,8 +40,15 @@ var ConfirmCreateReserve;
document.body.innerHTML =
"Oops, something went wrong. It looks like the bank could not\n transfer funds to the mint. Please go back to your bank's website\n to check what happened.";
}
- });
+ };
+ chrome.runtime.sendMessage({ type: 'confirm-reserve', detail: d }, cb);
});
- });
-})(ConfirmCreateReserve || (ConfirmCreateReserve = {}));
+ }
+ exports_1("main", main);
+ return {
+ setters:[],
+ execute: function() {
+ }
+ }
+});
//# sourceMappingURL=confirm-create-reserve.js.map \ No newline at end of file