@@ -268,13 +268,8 @@ document.addEventListener('DOMContentLoaded', function () {
268
268
} ) ;
269
269
270
270
document . getElementById ( 'upgrade-btn' ) . addEventListener ( 'click' , function ( ) {
271
- document . getElementById ( 'plan-info' ) . style . display = 'none' ;
272
- document . getElementById ( 'premium-container' ) . style . display = 'block' ;
273
- document . getElementById ( 'exit-premium-container-tomain' ) . style . display = 'none' ;
274
- document . getElementById ( 'exit-premium-container-toacct' ) . style . display = 'block' ;
275
-
276
- var aiGif = document . getElementById ( 'ai-gif' ) ;
277
- aiGif . src = aiGif . dataset . src ;
271
+ // open a new tab for the pricing page
272
+ chrome . tabs . create ( { url : 'https://docdecoder.app/pricing' } ) ;
278
273
} ) ;
279
274
280
275
document . getElementById ( "exit-premium-container-toacct" ) . addEventListener ( "click" , function ( ) {
@@ -328,25 +323,15 @@ document.addEventListener('DOMContentLoaded', function () {
328
323
rateLimitMessage . querySelector ( 'p' ) . innerHTML = data . rateLimitExceeded ;
329
324
chrome . storage . local . remove ( 'rateLimitExceeded' ) ;
330
325
document . getElementById ( 'premium-subscribe-txt-sums' ) . addEventListener ( 'click' , function ( ) {
331
- document . getElementById ( 'main-extension-content' ) . style . display = 'none' ;
332
- document . getElementById ( 'premium-container' ) . style . display = 'block' ;
333
- document . getElementById ( 'exit-premium-container-tomain' ) . style . display = 'block' ;
334
- document . getElementById ( 'exit-premium-container-toacct' ) . style . display = 'none' ;
335
-
336
- var aiGif = document . getElementById ( 'ai-gif' ) ;
337
- aiGif . src = aiGif . dataset . src ;
326
+ // open a new tab for the pricing page
327
+ chrome . tabs . create ( { url : 'https://docdecoder.app/pricing' } ) ;
338
328
} ) ;
339
329
}
340
330
} ) ;
341
331
342
332
document . getElementById ( 'premium-button' ) . addEventListener ( 'click' , function ( ) {
343
- document . getElementById ( 'main-extension-content' ) . style . display = 'none' ;
344
- document . getElementById ( 'premium-container' ) . style . display = 'block' ;
345
- document . getElementById ( 'exit-premium-container-tomain' ) . style . display = 'block' ;
346
- document . getElementById ( 'exit-premium-container-toacct' ) . style . display = 'none' ;
347
-
348
- var aiGif = document . getElementById ( 'ai-gif' ) ;
349
- aiGif . src = aiGif . dataset . src ;
333
+ // open a new tab for the pricing page
334
+ chrome . tabs . create ( { url : 'https://docdecoder.app/pricing' } ) ;
350
335
} ) ;
351
336
352
337
document . getElementById ( 'exit-premium-container-tomain' ) . addEventListener ( 'click' , function ( ) {
@@ -361,23 +346,13 @@ document.addEventListener('DOMContentLoaded', function () {
361
346
const upgradePremiumTxt = document . getElementById ( 'upgrade-premium-txt' ) ;
362
347
const upgradePremiumLink = upgradePremiumTxt . querySelector ( 'a' ) ;
363
348
upgradePremiumLink . addEventListener ( 'click' , function ( ) {
364
- document . getElementById ( 'plan-info' ) . style . display = 'none' ;
365
- document . getElementById ( 'premium-container' ) . style . display = 'block' ;
366
- document . getElementById ( 'exit-premium-container-tomain' ) . style . display = 'none' ;
367
- document . getElementById ( 'exit-premium-container-toacct' ) . style . display = 'block' ;
368
-
369
- var aiGif = document . getElementById ( 'ai-gif' ) ;
370
- aiGif . src = aiGif . dataset . src ;
349
+ // open a new tab for the pricing page
350
+ chrome . tabs . create ( { url : 'https://docdecoder.app/pricing' } ) ;
371
351
} ) ;
372
352
373
353
document . getElementById ( 'premium-subscribe-txt' ) . addEventListener ( 'click' , function ( ) {
374
- document . getElementById ( 'main-extension-content' ) . style . display = 'none' ;
375
- document . getElementById ( 'premium-container' ) . style . display = 'block' ;
376
- document . getElementById ( 'exit-premium-container-tomain' ) . style . display = 'block' ;
377
- document . getElementById ( 'exit-premium-container-toacct' ) . style . display = 'none' ;
378
-
379
- var aiGif = document . getElementById ( 'ai-gif' ) ;
380
- aiGif . src = aiGif . dataset . src ;
354
+ // open a new tab for the pricing page
355
+ chrome . tabs . create ( { url : 'https://docdecoder.app/pricing' } ) ;
381
356
} ) ;
382
357
383
358
document . getElementById ( 'close-intro' ) . addEventListener ( 'click' , function ( ) {
@@ -857,13 +832,8 @@ function initPopup() {
857
832
858
833
if ( domainErrors [ termType ] && domainErrors [ termType ] . includes ( "premium-subscribe-txt-sums" ) ) {
859
834
document . getElementById ( 'premium-subscribe-txt-sums' ) . addEventListener ( 'click' , function ( ) {
860
- document . getElementById ( 'main-extension-content' ) . style . display = 'none' ;
861
- document . getElementById ( 'premium-container' ) . style . display = 'block' ;
862
- document . getElementById ( 'exit-premium-container-tomain' ) . style . display = 'block' ;
863
- document . getElementById ( 'exit-premium-container-toacct' ) . style . display = 'none' ;
864
-
865
- var aiGif = document . getElementById ( 'ai-gif' ) ;
866
- aiGif . src = aiGif . dataset . src ;
835
+ // open a new tab for the pricing page
836
+ chrome . tabs . create ( { url : 'https://docdecoder.app/pricing' } ) ;
867
837
} ) ;
868
838
}
869
839
0 commit comments