From c4e5741ae064a655df7ba4732da8c126143b2ce7 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 9 Jun 2017 12:12:39 +0200 Subject: [PATCH] update upgrade button logic --- www/common/cryptpad-common.js | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 659fe198a..36fe85515 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -827,20 +827,40 @@ define([ var width = Math.floor(Math.min(quota, 1)*200); // the bar is 200px width var $usage = $('', {'class': 'usage'}).css('width', width+'px'); - if (Config.noSubscriptionButton !== true && - (quota >= 0.8 || alwaysDisplayUpgrade) && - data.plan !== "power") - { - // TODO show donate url if applicable + var makeDonateButton = function () { var $upgradeLink = $('', { - href: common.upgradeLink, + href: common.donateURL, + rel: "noreferrer noopener", + target: "_blank", + }).appendTo($container); + $('