Skip to content

Commit 2c33e37

Browse files
committed
Publish 2025-11-27
1 parent 2891524 commit 2c33e37

File tree

2 files changed

+34
-7
lines changed

2 files changed

+34
-7
lines changed

elements/paddle.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ export async function initPaddle(options) {
4545
initClick(options.plusButton, 'pri_01je4ebmn474jsee5eh2gmfan9');
4646
}
4747
if (options.feeButton) {
48-
initClick(options.feeButton, 'pri_01jf039mt65me4f2exbgpg3p9m');
48+
// initClick(options.feeButton, 'pri_01jf039mt65me4f2exbgpg3p9m');
49+
initClick(options.feeButton, 'pri_01kb2rp90dtwcfdbj9b72zgtg3');
4950
}
5051
if (options.corpButton) {
5152
initClick(options.corpButton, 'pri_01k0skrfeyprpcmxvfsp5vfnw5');

elements/pay-tiers.js

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ const Prices = {
8787
CNY: '¥70.00',
8888
AUD: '$15.00',
8989
},
90+
SAVE_2: {
91+
USD: '$5.00',
92+
GBP: '£4.00',
93+
EUR: '€5.00',
94+
JPY: '¥800',
95+
CAD: '$6.00',
96+
CNY: '¥30.00',
97+
AUD: '$7.00',
98+
},
9099
};
91100

92101
const DEFAULT_CURRENCY = country === 'GB' ? 'GBP' : country === 'JP' ? 'JPY' : country === 'CA' ? 'CAD' : country === 'AU' ? 'AUD' : country === 'CN' ? 'CNY' : isEUCountry ? 'EUR' : 'USD';
@@ -246,9 +255,9 @@ const htmlText = `
246255
<span class="currencies__currency-text js-currency-text">${DEFAULT_CURRENCY}</span>
247256
</div>
248257
<div class="tiers">
249-
<label class="tier">
258+
<label class="tier" style="display: none;">
250259
<div class="tier__top">
251-
<input type="radio" name="tier" value="${Tiers.REGULAR}" checked>
260+
<input type="radio" name="tier" value="${Tiers.REGULAR}">
252261
<span class="tier__desc" data-text="regular">Individual use</span>
253262
<span class="tier__connect"></span>
254263
<span class="tier__price js-price-regular">${DEFAULT_PRICE_REGULAR}</span>
@@ -258,12 +267,14 @@ const htmlText = `
258267
One-time payment
259268
</div>
260269
</label>
261-
<label class="tier" style="display: none;">
270+
<label class="tier">
262271
<div class="tier__top">
263-
<input type="radio" name="tier" value="${Tiers.DISCOUNT}">
264-
<span class="tier__desc" data-text="discount">Discount</span>
272+
<input type="radio" name="tier" value="${Tiers.DISCOUNT}" checked>
273+
<span class="tier__desc" data-text="discount">Individual use</span>
265274
<span class="tier__connect"></span>
275+
<span class="tier__price js-price-regular tier__price--cross">${DEFAULT_PRICE_REGULAR}</span>
266276
<span class="tier__price js-price-discount">${DEFAULT_PRICE_DISCOUNT}</span>
277+
<span class="tier__save"><strong class="js-price-save-2">${Prices.SAVE_2[DEFAULT_CURRENCY]}</strong> <span data-text="off">off</span> <span data-text="dec-1">until<br>December 1</span></span>
267278
</div>
268279
<div class="tier__bottom" data-text="one_time">
269280
One-time payment
@@ -296,7 +307,7 @@ const htmlText = `
296307
<a class="button-link button-link--paddle js-link-paddle" href="#pay" data-s="d-side-paddle">
297308
<span class="button-link__text">
298309
<span data-text="pay">Pay</span>
299-
<span class="js-price-regular">${DEFAULT_PRICE_REGULAR}</span>
310+
<span class="js-price-discount">${DEFAULT_PRICE_DISCOUNT}</span>
300311
</span>
301312
</a>
302313
<a class="button-link button-link--paddle js-link-paddle-corp" href="#pay-corp" data-s="d-side-paddlecorp" style="display:none;">
@@ -527,6 +538,17 @@ const cssText = `
527538
position: relative;
528539
top: 0.375rem;
529540
}
541+
.tier__price--cross::after {
542+
background-color: hsla(355deg, 80%, 50%, 0.8);
543+
content: "";
544+
display: inline-block;
545+
height: 0.25rem;
546+
left: 0;
547+
position: absolute;
548+
top: 50%;
549+
transform: rotate(-15deg);
550+
width: 100%;
551+
}
530552
.tier__save {
531553
background-color: hsl(165, 65%, 25%);
532554
border-radius: 0.25rem;
@@ -966,7 +988,10 @@ darkreader-donate-mascot {
966988
/*
967989
display: inline-block;
968990
*/
991+
/*
969992
display: none;
993+
*/
994+
display: inline-block;
970995
}
971996
.tier__hint {
972997
/*
@@ -1055,6 +1080,7 @@ class PayTiersElement extends HTMLElement {
10551080
s('.js-price-discount').each((node) => node.textContent = Prices.DISCOUNT[currency]);
10561081
s('.js-price-corporate').each((node) => node.textContent = Prices.CORPORATE[currency]);
10571082
s('.js-price-save').each((node) => node.textContent = Prices.SAVE[currency]);
1083+
s('.js-price-save-2').each((node) => node.textContent = Prices.SAVE_2[currency]);
10581084
s('.js-currency-text').each((node) => node.textContent = currency);
10591085
};
10601086

0 commit comments

Comments
 (0)