@@ -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
92101const 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