Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEX-21848 - Enhance USBS Members' Plan Component #527

Open
wants to merge 2,484 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
2484 commits
Select commit Hold shift + click to select a range
93fcd96
added missing bundle ids
iconstantin-bd Dec 5, 2024
2b0832f
changed Vlaicu mappings
iconstantin-bd Dec 5, 2024
f7d9300
Merge pull request #430 from bitdefender/dex-20840-vlaicu-stage
iconstantin-bd Dec 5, 2024
7df577f
added .js to import
iconstantin-bd Dec 5, 2024
1effebc
Merge pull request #431 from bitdefender/dex-20840-vlaicu-stage
iconstantin-bd Dec 5, 2024
d217715
fixed repeating arrow pattern and inconsistent size
abutuza Dec 5, 2024
d13a63f
Update CSS styles across multiple components for improved layout and …
Matei-Iordache Dec 5, 2024
07235bd
Enhance height matching functionality by including direct child colum…
Matei-Iordache Dec 5, 2024
a4f3bf9
Add height property to span elements in columns.css for consistent la…
Matei-Iordache Dec 5, 2024
ebeb438
Update height matching functionality to target <p> tags in blog-news …
Matei-Iordache Dec 5, 2024
2fbc10e
Enhance blog-news component styles by resetting margin and adding fle…
Matei-Iordache Dec 5, 2024
fee6d11
Remove fixed height from span elements and align text columns to flex…
Matei-Iordache Dec 5, 2024
0957b89
Adjust desktop max width for sections to improve layout consistency
Matei-Iordache Dec 5, 2024
0051612
added checked attribute to selector for default selection
abutuza Dec 5, 2024
b9118f6
remove checked value at active button change
abutuza Dec 5, 2024
dbe2426
Refactor blog-card styles to improve layout and maintain consistency
Matei-Iordache Dec 6, 2024
2edc111
Merge pull request #428 from bitdefender/DEX-21268
inastase Dec 6, 2024
c25539c
Merge pull request #432 from bitdefender/DEX-21356
inastase Dec 6, 2024
04d4487
Update link-checker styles and structure for improved layout and acce…
Matei-Iordache Dec 6, 2024
6182f9b
Center align text in link-checker input div for improved layout
Matei-Iordache Dec 6, 2024
fe88064
Clear error message when input is emptied in link-checker
Matei-Iordache Dec 6, 2024
2f3208b
Clear link-checker result on paste event for better user experience
Matei-Iordache Dec 6, 2024
a63c571
Remove top margin from link-checker result for improved layout
Matei-Iordache Dec 6, 2024
80defad
Remove top margin from link-checker result for improved layout
Matei-Iordache Dec 6, 2024
80fa056
Adjust margin for danger result in link-checker for improved layout
Matei-Iordache Dec 6, 2024
2f94320
Update safe link message to include security software recommendation …
Matei-Iordache Dec 6, 2024
245a0b2
Refactor CSS styles for blog news and link checker components for imp…
Matei-Iordache Dec 9, 2024
6136425
Change to prod route
Matei-Iordache Dec 9, 2024
2fcb82f
Merge pull request #422 from bitdefender/DEX-20997
inastase Dec 9, 2024
3e33321
added price functionality to price condition nanoblock
abutuza Dec 9, 2024
06a57d3
Refactor URL validation regex in link-checker for improved accuracy
Matei-Iordache Dec 9, 2024
8834646
Merge pull request #433 from bitdefender/DEX-20997
inastase Dec 9, 2024
6db28f4
added functionality for prices inside dynamic text
abutuza Dec 9, 2024
4d34551
added missing parameters to buy links
iconstantin-bd Dec 9, 2024
ac37ff0
Merge branch 'dex-20840-vlaicu-implementation' into dex-20840-vlaicu-…
iconstantin-bd Dec 9, 2024
3623fd2
refactored dynamic texts function for better readability and fewer ev…
abutuza Dec 9, 2024
a0d8267
Merge pull request #434 from bitdefender/dex-20840-vlaicu-stage
iconstantin-bd Dec 9, 2024
09092ca
modified modal button style to use global settings
abutuza Dec 9, 2024
dbab39f
added comments to explain store interaction
abutuza Dec 9, 2024
46de09b
Merge pull request #435 from bitdefender/DEX-21370
abutuza Dec 9, 2024
f404685
commented out loadEager plugin execution with a note for future consi…
Matei-Iordache Dec 9, 2024
77911f6
DEX-21186 - Adding Zuora products mapping into excell on sharepoint
ltiseanu Dec 9, 2024
69b48a2
DEX-21186 - Adding Zuora products mapping into excell on sharepoint
ltiseanu Dec 9, 2024
a1a48be
removing unused const
ltiseanu Dec 9, 2024
3eed5fc
Merge branch 'main' of https://github.com/bitdefender/www-websites in…
ltiseanu Dec 9, 2024
8aa9744
update
ltiseanu Dec 9, 2024
895f661
update
ltiseanu Dec 9, 2024
7b0ffe1
Merge pull request #420 from bitdefender/login-logic-on-websites
iconstantin-bd Dec 10, 2024
c169a00
Merge pull request #437 from bitdefender/fix-target-exp
Matei-Iordache Dec 10, 2024
a8c0400
Merge pull request #438 from bitdefender/DEX-21186
ltiseanu Dec 10, 2024
25d1310
fixed mega menu error due to missconfigured query
iconstantin-bd Dec 10, 2024
52d3dbb
Merge pull request #439 from bitdefender/fix-mega-menu-error
iconstantin-bd Dec 10, 2024
eb5e113
added missing bundle id
iconstantin-bd Dec 10, 2024
fda7619
for ro domain, Vlaicu will be triggered by default
iconstantin-bd Dec 10, 2024
97259b2
Merge branch 'main' into dex-20840-vlaicu-implementation
iconstantin-bd Dec 10, 2024
8091af1
solved merge issues
iconstantin-bd Dec 10, 2024
69ffc02
Merge branch 'dex-20840-vlaicu-implementation' into dex-20840-vlaicu-…
iconstantin-bd Dec 10, 2024
2ab673f
Merge pull request #440 from bitdefender/dex-20840-vlaicu-stage
iconstantin-bd Dec 10, 2024
5f0854f
fixed styling issues found during block testing
abutuza Dec 11, 2024
4bd5973
changed empty string with constant
iconstantin-bd Dec 11, 2024
8cb6c0d
Merge branch 'dex-20840-vlaicu-implementation' into dex-20840-vlaicu-…
iconstantin-bd Dec 11, 2024
c044bb6
update the endpoint for zuoraConfig
iconstantin-bd Dec 11, 2024
0ef6f9c
Merge branch 'dex-20840-vlaicu-implementation' into dex-20840-vlaicu-…
iconstantin-bd Dec 11, 2024
09e266f
Merge pull request #441 from bitdefender/dex-20840-vlaicu-stage
iconstantin-bd Dec 11, 2024
e4a59e7
Merge pull request #442 from bitdefender/DEX-21403
abutuza Dec 11, 2024
b594702
add browser detection and update hero link for Firefox
Matei-Iordache Dec 11, 2024
5257303
refactor: remove unnecessary toLowerCase() call in URL validation
Matei-Iordache Dec 11, 2024
a1f6854
Merge pull request #443 from bitdefender/DEX-21414
Matei-Iordache Dec 11, 2024
0920c3a
Merge pull request #436 from bitdefender/dex-20840-vlaicu-implementation
iconstantin-bd Dec 11, 2024
e9e6b43
updated the id mappings to include secpassm
iconstantin-bd Dec 11, 2024
2b7b4f8
added fix for other domains other than Vlaicu ones
iconstantin-bd Dec 11, 2024
0532b87
Merge pull request #445 from bitdefender/dex-20840-vlaicu-implementation
iconstantin-bd Dec 11, 2024
ff01c4f
prepared Vlaicu for deployment to production on all domains
iconstantin-bd Dec 12, 2024
6127468
removed vlaicuFlag
iconstantin-bd Dec 12, 2024
ccfd4cc
Merge branch 'dex-20840-vlaicu-implementation' into dex-20840-vlaicu-…
iconstantin-bd Dec 12, 2024
34c9948
added correct campaign for tests
iconstantin-bd Dec 12, 2024
dfaf7bf
Merge pull request #446 from bitdefender/dex-20840-vlaicu-stage
iconstantin-bd Dec 12, 2024
9fc1a67
deleted missconfigured constants
iconstantin-bd Dec 12, 2024
7e3b6da
Merge pull request #447 from bitdefender/dex-20840-vlaicu-stage
iconstantin-bd Dec 12, 2024
4707ea9
made Vlaicu use only promotion path on stage
iconstantin-bd Dec 12, 2024
2c2a507
added TODOs
iconstantin-bd Dec 12, 2024
dd4f75c
Merge pull request #448 from bitdefender/dex-20840-vlaicu-stage
iconstantin-bd Dec 12, 2024
1de61a3
updated the buy link parameters for Vlaicu
iconstantin-bd Dec 12, 2024
8d15cf8
package and lint updates
Matei-Iordache Dec 12, 2024
0fd4dda
Merge pull request #450 from bitdefender/DEX-21261-fix-vlaicu-links
iconstantin-bd Dec 12, 2024
c6ad196
lint fix
abutuza Dec 12, 2024
a1c185b
scuderia lint fix
abutuza Dec 12, 2024
b944f69
refactored scuderia css to fix descending specificity
abutuza Dec 12, 2024
ff46c24
lint fix
abutuza Dec 12, 2024
52b3f3d
lint fix
abutuza Dec 12, 2024
b6d496e
added extra case for de-de domain and soho product
iconstantin-bd Dec 12, 2024
5cd1ae7
Merge pull request #452 from bitdefender/dex-20840-vlaicu-stage
iconstantin-bd Dec 12, 2024
9659acb
prepared the locale for the soho product on de-de
iconstantin-bd Dec 13, 2024
ecd4fbb
Merge branch 'main' into dex-20840-vlaicu-implementation
iconstantin-bd Dec 13, 2024
edf17e2
added correct locale for soho call on de
iconstantin-bd Dec 13, 2024
096cdc6
made corner case for SOHO on de
iconstantin-bd Dec 13, 2024
fb09f73
Merge branch 'dex-20840-vlaicu-implementation' into dex-20840-vlaicu-…
iconstantin-bd Dec 13, 2024
6232eb2
Merge pull request #454 from bitdefender/dex-20840-vlaicu-stage
iconstantin-bd Dec 13, 2024
8c233f6
Merge pull request #453 from bitdefender/dex-20840-vlaicu-implementation
iconstantin-bd Dec 16, 2024
797f29f
added correct ids
iconstantin-bd Dec 16, 2024
c7ac2dc
Merge pull request #455 from bitdefender/dex-20840-vlaicu-implementation
inastase Dec 16, 2024
6c4b414
update hero banner img
ltiseanu Dec 16, 2024
c2a8ea2
Merge branch 'main' of https://github.com/bitdefender/www-websites in…
ltiseanu Dec 16, 2024
303ab9b
update
ltiseanu Dec 16, 2024
a874b52
lint errors fixes
Matei-Iordache Dec 16, 2024
d595362
Merge branch 'main' into dex-19682-stage
Matei-Iordache Dec 16, 2024
04f92d6
Merge pull request #451 from bitdefender/package-and-lint-updates
Matei-Iordache Dec 16, 2024
a3798c2
Readd a function
Matei-Iordache Dec 16, 2024
c4e9084
Merge pull request #444 from bitdefender/link-checker-fix
Matei-Iordache Dec 16, 2024
9e35215
fixed missing bundle ids
iconstantin-bd Dec 16, 2024
d964a51
update
ltiseanu Dec 16, 2024
605bd1d
fixed data layer
iconstantin-bd Dec 16, 2024
f716372
reverte to old base variant
iconstantin-bd Dec 16, 2024
646b7a5
Merge pull request #456 from bitdefender/dex-20840-vlaicu-implementation
iconstantin-bd Dec 16, 2024
cc254fd
Refactor hero.css to remove unnecessary position property from half-w…
Matei-Iordache Dec 16, 2024
b051d09
Merge pull request #457 from bitdefender/DEX-20729
Matei-Iordache Dec 16, 2024
6498df7
Merge branch 'stage' into dex-19682-stage
Matei-Iordache Dec 17, 2024
12c7a61
Refactor campaign handling in Vlaicu class to remove hardcoded value …
Matei-Iordache Dec 17, 2024
6d96f46
Merge pull request #458 from bitdefender/dex-19682-stage
Matei-Iordache Dec 17, 2024
278a448
test locale
Matei-Iordache Dec 17, 2024
5a1b68b
Merge pull request #459 from bitdefender/dex-19682-stage
Matei-Iordache Dec 17, 2024
ca5da3b
Fix geoIpFlag assignment to correctly access geoIpPrice from the offe…
Matei-Iordache Dec 17, 2024
dec66b6
Merge pull request #460 from bitdefender/dex-19682-stage
Matei-Iordache Dec 17, 2024
52a8be7
Fix geoIpFlag assignment to correctly access geoIpPrice from the offe…
Matei-Iordache Dec 17, 2024
674898b
Merge pull request #461 from bitdefender/dex-19682-stage
Matei-Iordache Dec 17, 2024
b0a362c
Add method to retrieve geoIpPrice from offer response and update prod…
Matei-Iordache Dec 18, 2024
3de5034
Merge pull request #463 from bitdefender/dex-19682-stage
Matei-Iordache Dec 18, 2024
9ff2471
Merge branch 'main' into dex-19682-stage
Matei-Iordache Dec 18, 2024
2bd8936
Fix formatting in mbox-canvas.js import statements
Matei-Iordache Dec 18, 2024
e0705b2
added config in Franklin for product ids
iconstantin-bd Dec 18, 2024
4e7456b
Merge branch 'dex-20840-vlaicu-implementation' into dex-20840-vlaicu-…
iconstantin-bd Dec 18, 2024
498805c
Merge pull request #465 from bitdefender/dex-20840-vlaicu-stage
iconstantin-bd Dec 18, 2024
8d8640d
Lint fixes
Matei-Iordache Dec 18, 2024
0524f1b
Rename offer identifier in $getGeoIpFlag method to 'geoip-flag-mbox'
Matei-Iordache Dec 18, 2024
fe937b9
DEX-18029 - AB test - Downloads page (+free tools)
ltiseanu Dec 18, 2024
89a1ea2
Merge pull request #466 from bitdefender/dex-20840-vlaicu-implementation
iconstantin-bd Dec 19, 2024
f4790c0
Merge pull request #462 from bitdefender/hero-update
ltiseanu Dec 19, 2024
5b5f0a9
updates
ltiseanu Dec 19, 2024
265eb1e
update hero banner
ltiseanu Dec 19, 2024
906c697
Solve comments
Matei-Iordache Dec 19, 2024
f08ca1c
Merge branch 'stage' into dex-19682-stage
Matei-Iordache Dec 19, 2024
d0a32ba
add constants class
Matei-Iordache Dec 19, 2024
315b5e6
Merge branch 'dex-19682-stage' of github.com:bitdefender/www-websites…
Matei-Iordache Dec 19, 2024
6818222
re add deleted code
Matei-Iordache Dec 19, 2024
0f95896
feat: generate new sitemaps
enake Dec 19, 2024
759bfd2
Merge pull request #472 from bitdefender/sitemap
enake Dec 19, 2024
d1c13b3
Merge branch 'main' into dex-19682-stage
Matei-Iordache Dec 20, 2024
12ab504
Merge pull request #464 from bitdefender/dex-19682-stage
Matei-Iordache Dec 20, 2024
586c48f
added hero banner for ferrari page
abutuza Dec 20, 2024
a2f5cd3
fixes for webview table
abutuza Dec 20, 2024
e12a696
lint fix
abutuza Dec 20, 2024
393dd25
lint fix
abutuza Dec 20, 2024
baf6499
featured button on light mode color adjustment
abutuza Dec 20, 2024
2cd85a5
added ferrari page styles for franklin
abutuza Dec 23, 2024
492cfce
fix scuderia ferrari banner
abutuza Dec 23, 2024
adfea17
adjusted query
abutuza Dec 23, 2024
f3c47be
adjusted styles
abutuza Dec 23, 2024
469b1b5
renamed ferrari colab image metadata
abutuza Dec 23, 2024
6bf54f2
lint fix
abutuza Dec 23, 2024
04e407b
Merge pull request #474 from bitdefender/DEX-20411
abutuza Dec 24, 2024
6ac82b6
styling trial modal
ltiseanu Dec 26, 2024
d8be7b1
Merge branch 'main' of https://github.com/bitdefender/www-websites in…
ltiseanu Dec 26, 2024
6bcc1ba
implemented experiment design
abutuza Jan 3, 2025
c382d8f
Merge pull request #468 from bitdefender/DEX-18029
imantescu Jan 8, 2025
b8e74e1
adjusted mobile styles
abutuza Jan 8, 2025
17c69a3
Correct ui for buttons
ltiseanu Jan 8, 2025
086bb75
Merge pull request #475 from bitdefender/DEX-18029
ltiseanu Jan 8, 2025
1d2823b
moved config files in commons folder
iconstantin-bd Jan 9, 2025
78b6e3b
Merge pull request #476 from bitdefender/dex-20840-vlaicu-implementation
enake Jan 9, 2025
8034d61
just a test
Andserbanbitdefender Jan 9, 2025
2e04587
added dynamic content based on user OS to hero banner
abutuza Jan 9, 2025
0e35566
styling fixes
abutuza Jan 10, 2025
c905c96
implemented design feedback
abutuza Jan 10, 2025
c77ffac
centered benefits text
abutuza Jan 10, 2025
d57fd81
adjusted font-size
abutuza Jan 10, 2025
de96988
removed typo
abutuza Jan 10, 2025
1f45485
refactor CSS for improved readability and structure
Matei-Iordache Jan 13, 2025
293be40
refactor layout for better responsiveness and user experience
Matei-Iordache Jan 13, 2025
f2203d7
improve layout for enhanced accessibility and visual hierarchy
Matei-Iordache Jan 13, 2025
a91f357
refactor CSS for improved media query handling and layout consistency
Matei-Iordache Jan 13, 2025
b92071c
refactor css for safari exceptions
abutuza Jan 13, 2025
2b9f427
fix mobile button
abutuza Jan 13, 2025
0e6629e
mobile button adjustment
abutuza Jan 13, 2025
a82b93d
aligned info button
abutuza Jan 13, 2025
d59b6a3
adjusted prduct table font size
abutuza Jan 14, 2025
bc9a9e5
Merge pull request #473 from bitdefender/dex-19682-stage
abutuza Jan 14, 2025
336c977
Add full-width styling to mbox-canvas component
Matei-Iordache Jan 14, 2025
fd806eb
Enhance mbox-canvas functionality and apply dark theme for webview
Matei-Iordache Jan 14, 2025
67b632d
Fix target attribute for links in mbox-canvas to open in new browser …
Matei-Iordache Jan 14, 2025
413f1f9
Merge pull request #477 from bitdefender/DEX-19400
abutuza Jan 14, 2025
49d6cf9
Merge pull request #482 from bitdefender/webview-fixes
enake Jan 14, 2025
9739948
dasdsada
Matei-Iordache Jan 14, 2025
4a6d28f
refactor: streamline target experiment data retrieval and CSS loading
Matei-Iordache Jan 14, 2025
d1a4761
Rename loader class to loader-circle and update related styles and sc…
Matei-Iordache Jan 14, 2025
ebee653
Merge pull request #485 from bitdefender/webview-fixes
enake Jan 14, 2025
a96f9a8
Merge pull request #483 from bitdefender/ab-tests-fix
enake Jan 14, 2025
7ddcd5e
Afiiliate page
Andserbanbitdefender Jan 15, 2025
14e3990
line-height
Andserbanbitdefender Jan 15, 2025
6c73ab3
Revert "Ab tests fix"
enake Jan 15, 2025
e6be9a0
Merge pull request #487 from bitdefender/revert-483-ab-tests-fix
enake Jan 15, 2025
cef1ef6
fix: handle potential undefined content in target offer retrieval
Matei-Iordache Jan 15, 2025
f91f7eb
Merge branch 'main' into ab-tests-fix
Matei-Iordache Jan 15, 2025
6f16324
Merge pull request #488 from bitdefender/ab-tests-fix
Matei-Iordache Jan 15, 2025
2f5f78d
fixed broken call
iconstantin-bd Jan 15, 2025
50bd11c
Merge pull request #489 from bitdefender/DEX-21616
inastase Jan 15, 2025
a1e1c20
removed hardcoded price label
abutuza Jan 16, 2025
bcd7d2f
Merge pull request #490 from bitdefender/DEX-19400
abutuza Jan 16, 2025
56d2009
added option to add extraParameters in thebuy links from Target using…
iconstantin-bd Jan 16, 2025
104e4b2
Merge pull request #486 from bitdefender/dex-21500
Andserbanbitdefender Jan 16, 2025
14667e4
add async loadCSS function to dynamically load stylesheets
Matei-Iordache Jan 17, 2025
0361972
Merge pull request #491 from bitdefender/DEX-21579
iconstantin-bd Jan 17, 2025
1309625
Merge pull request #492 from bitdefender/DEX-21629
Matei-Iordache Jan 17, 2025
1c0aa77
Merge branch 'main' into DEX-18076
Matei-Iordache Jan 21, 2025
fbd339a
Add custom dropdown functionality and price display for products
Matei-Iordache Jan 21, 2025
6e8cff5
Refactor price handling and dropdown functionality in hero-aem block
Matei-Iordache Jan 22, 2025
ceb3a4a
update tsparticles dependencies to version 3.7.1
Matei-Iordache Jan 22, 2025
5501fc2
Merge pull request #496 from bitdefender/fix-ts-particles
Matei-Iordache Jan 22, 2025
200188b
Enhance hero-aem block styles and update price display logic
Matei-Iordache Jan 22, 2025
ccd0eee
Merge branch 'main' into DEX-18076
Matei-Iordache Jan 22, 2025
e95d815
add franklin identifier class on body
abutuza Jan 23, 2025
69dbb3b
DEX-21697 - Elements not fully visible in the box-carousel component
ltiseanu Jan 28, 2025
6c6ad85
Merge pull request #498 from bitdefender/DEX-21697
ltiseanu Jan 28, 2025
680ebcb
updated template for thank-you page
abutuza Jan 28, 2025
617dbef
Merge pull request #499 from bitdefender/DEX-19400
abutuza Jan 28, 2025
cf5165a
add styles for a/b test
Matei-Iordache Jan 28, 2025
cdc5235
fixing carousle
ltiseanu Jan 29, 2025
26bed44
feat: updated sitemaps
enake Jan 31, 2025
34ab68c
Merge pull request #505 from bitdefender/sitemap
enake Jan 31, 2025
09743c6
Refactor awards component styles and improve dropdown functionality
Matei-Iordache Jan 31, 2025
6355d14
Merge branch 'main' into DEX-18076
Matei-Iordache Jan 31, 2025
321ac23
DEX-21697 - Elements not fully visible in the box-carousel component
ltiseanu Feb 3, 2025
7697e3f
added single consumerId
iconstantin-bd Feb 4, 2025
c488c30
Merge pull request #497 from bitdefender/DEX-21722
abutuza Feb 4, 2025
ec861dc
Merge pull request #514 from bitdefender/DEX-21697
ltiseanu Feb 5, 2025
858e740
Merge pull request #509 from bitdefender/DEX-18076
Matei-Iordache Feb 5, 2025
febcd24
fixed a/b test data layer for thank you page
abutuza Feb 5, 2025
fd0c3fd
revert to dev environment
abutuza Feb 5, 2025
80ee97d
Merge pull request #515 from bitdefender/DEX-19400
abutuza Feb 6, 2025
aabcec9
fixed visitor SDID being different
iconstantin-bd Feb 6, 2025
ba89c8f
Merge pull request #516 from bitdefender/fix-visitor-consumerID
iconstantin-bd Feb 6, 2025
cfef92d
feat: regenerate sitemaps without locale buckets
enake Feb 10, 2025
bd311e6
Merge pull request #518 from bitdefender/sitemap
enake Feb 10, 2025
a3c63f5
DEX-21879 | solved data layer issue on renewal
iconstantin-bd Feb 11, 2025
e60eb3e
Merge pull request #519 from bitdefender/DEX-21879-incorrect-data-lay…
iconstantin-bd Feb 11, 2025
5563a32
DEX-21848 - Enhance USBS Members' Plan Component
ltiseanu Feb 13, 2025
f2337b4
update
ltiseanu Feb 13, 2025
38c6287
update
ltiseanu Feb 13, 2025
7fdd39e
fix lint
ltiseanu Feb 14, 2025
334818b
fix lint
ltiseanu Feb 14, 2025
f1a57df
fix lint
ltiseanu Feb 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions _src/blocks/hero/hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
createTag,
createNanoBlock,
renderNanoBlocks,
getBrowserName,
} from '../../scripts/utils/utils.js';

/**
Expand Down Expand Up @@ -91,6 +92,7 @@ export default function decorate(block) {
stopAutomaticModalRefresh,
signature,
percentProduct,
firefoxUrl,
} = block.closest('.section').dataset;

buildHeroBlock(block);
Expand Down Expand Up @@ -138,4 +140,8 @@ export default function decorate(block) {
if (block.querySelector('.button-container a[href*="/consumer/thank-you"]')) {
block.querySelector('.button-container a[href*="/consumer/thank-you"]').classList.add('await-loader');
}

if (firefoxUrl && getBrowserName() === 'Firefox') {
block.querySelector('a').href = firefoxUrl;
}
}
15 changes: 15 additions & 0 deletions _src/scripts/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,21 @@ export function openUrlForOs(urlMacos, urlWindows, urlAndroid, urlIos, anchorSel
}
}

export function getBrowserName() {
const { userAgent } = navigator;

if (userAgent.includes('Firefox')) {
return 'Firefox';
} if (userAgent.includes('Edg')) {
return 'Edge';
} if (userAgent.includes('Chrome') && !userAgent.includes('Edg')) {
return 'Chrome';
} if (userAgent.includes('Safari') && !userAgent.includes('Chrome')) {
return 'Safari';
}
return 'Unknown';
}

export function decorateBlockWithRegionId(element, id) {
// we could consider to use `element.setAttribute('s-object-region', id);` in the future
if (element) element.id = id;
Expand Down