diff --git a/bower.json b/bower.json index 0a7caf60..63e9713a 100644 --- a/bower.json +++ b/bower.json @@ -31,6 +31,6 @@ "raphael": "~2.1.2", "js-sequence-diagrams": "https://github.com/benweet/js-sequence-diagrams.git#7b157daa2deaf5b46b320673cc2ddabe6f013725", "flowchart": "https://github.com/adrai/flowchart.js.git#~1.2.10", - "monetizejs": "~0.1.2" + "monetizejs": "~0.2.0" } } diff --git a/public/res/core.js b/public/res/core.js index a88ee1ad..a26c531e 100644 --- a/public/res/core.js +++ b/public/res/core.js @@ -334,7 +334,6 @@ define([ function hasPaid(payments) { return payments && ( (payments.chargeOption && payments.chargeOption.alias == 'once') || - (payments.subscriptionOption && payments.subscriptionOption.alias == 'monthly') || (payments.subscriptionOption && payments.subscriptionOption.alias == 'yearly')); } @@ -363,17 +362,15 @@ define([ return; } monetize.getPaymentsImmediate(function(err, payments) { + removeAlerts(); if(!hasPaid(payments)) { _.each(document.querySelectorAll('.modal-body'), function(modalBodyElt) { - var $elt = $('
Please consider sponsoring StackEdit for $1/month (or sign in if you\'re already a sponsor).
'); + var $elt = $('
Please consider sponsoring StackEdit for $5/year (or sign in if you\'re already a sponsor).
'); $elt.find('a').click(performPayment); modalBodyElt.insertBefore($elt[0], modalBodyElt.firstChild); $alerts = $alerts.add($elt); }); } - else { - removeAlerts(); - } }); }, 1000);