11// @ts -check
22
3- import { country , isEdge , isEUCountry } from './locales.js' ;
3+ import { country , isEdge , isEUCountry , offer } from './locales.js' ;
44import { initPaddle } from './paddle.js' ;
55import { clicker } from './stats.js' ;
66import {
@@ -255,9 +255,9 @@ const htmlText = `
255255 <span class="currencies__currency-text js-currency-text">${ DEFAULT_CURRENCY } </span>
256256 </div>
257257 <div class="tiers">
258- <label class="tier">
258+ <label class="tier"${ offer ? ' style="display: none;"' : '' } >
259259 <div class="tier__top">
260- <input type="radio" name="tier" value="${ Tiers . REGULAR } " checked>
260+ <input type="radio" name="tier" value="${ Tiers . REGULAR } "${ offer ? '' : ' checked' } >
261261 <span class="tier__desc" data-text="regular">Individual use</span>
262262 <span class="tier__connect"></span>
263263 <span class="tier__price js-price-regular">${ DEFAULT_PRICE_REGULAR } </span>
@@ -267,14 +267,14 @@ const htmlText = `
267267 One-time payment
268268 </div>
269269 </label>
270- <label class="tier" style="display: none;">
270+ <label class="tier"${ offer ? '' : ' style="display: none;"' } >
271271 <div class="tier__top">
272- <input type="radio" name="tier" value="${ Tiers . DISCOUNT } ">
272+ <input type="radio" name="tier" value="${ Tiers . DISCOUNT } "${ offer ? ' checked' : '' } >
273273 <span class="tier__desc" data-text="discount">Individual use</span>
274274 <span class="tier__connect"></span>
275275 <span class="tier__price js-price-regular tier__price--cross">${ DEFAULT_PRICE_REGULAR } </span>
276276 <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>
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>${ offer ?. end } </span></span>
278278 </div>
279279 <div class="tier__bottom" data-text="one_time">
280280 One-time payment
@@ -294,7 +294,7 @@ const htmlText = `
294294 </label>
295295 </div>
296296 <div class="discount-description js-discount-description">
297- 50% off until December 1
297+ 50% off until ${ offer ?. end }
298298 </div>
299299 <div class="button-wrapper button-wrapper-paddle">
300300 <a class="button-link button-link--paypal button-link--inactive js-link-paypal" href="${ DEFAULT_LINK_PAYPAL } " target="_blank" rel="noopener" data-s="d-side-paypal">
@@ -310,7 +310,7 @@ const htmlText = `
310310 <a class="button-link button-link--paddle js-link-paddle" href="#pay" data-s="d-side-paddle">
311311 <span class="button-link__text">
312312 <span data-text="pay">Pay</span>
313- <span class="js-price-regular">${ DEFAULT_PRICE_REGULAR } </span>
313+ <span class="${ offer ? ' js-price-discount' : 'js-price- regular' } ">${ offer ? DEFAULT_PRICE_DISCOUNT : DEFAULT_PRICE_REGULAR } </span>
314314 </span>
315315 </a>
316316 <a class="button-link button-link--paddle js-link-paddle-corp" href="#pay-corp" data-s="d-side-paddlecorp" style="display:none;">
@@ -943,7 +943,7 @@ darkreader-donate-mascot {
943943
944944.discount-description {
945945 color: #63b79f;
946- display: none;
946+ display: ${ offer ? 'block' : ' none' } ;
947947 font-size: 0.875rem;
948948 font-weight: bold;
949949 text-align: center;
0 commit comments