NikolayBezay

Soda push top bar embed

Jul 22nd, 2021 (edited)
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.72 KB | None | 0 0
  1. DT =>
  2. <script>
  3.     (function() {
  4.         var campaignHeight = document.querySelector('.' + self.identifier + ' [tabindex').offsetHeight;
  5.         var nativeContent = document.querySelector('div[id*="shopify-section-"].hp-hero');
  6.         if (nativeContent) {
  7.             nativeContent.style.marginTop = '11.5rem';
  8.         }
  9.         var nativeProductSection = document.querySelector('#shopify-section-product-duo-section');
  10.         if (nativeProductSection) {
  11.             nativeProductSection.style.marginTop = (campaignHeight + 58) + 'px';
  12.         }
  13.         var nativeLimitSection = document.querySelector('#limit');
  14.         if (nativeLimitSection) {
  15.             nativeLimitSection.style.marginTop = (campaignHeight + 58) + 'px';
  16.         }
  17.         var nativeFirstContainer = document.querySelector('body > .container');
  18.         if (nativeFirstContainer) {
  19.             nativeFirstContainer.style.marginTop = campaignHeight + 'px';
  20.         }
  21.         adoric.on("lightbox:before:close", function(e) {
  22.             var nativeContent = document.querySelector('div[id*="shopify-section-"].hp-hero');
  23.             if (e.lightbox.options.campaignId === self.campaignId) {
  24.                 if (nativeContent) {
  25.                     nativeContent.style.marginTop = '';
  26.                 }
  27.                 if (nativeProductSection) {
  28.                     nativeProductSection.style.marginTop = '';
  29.                 }
  30.                 if (nativeLimitSection) {
  31.                     nativeLimitSection.style.marginTop = '';
  32.                 }
  33.                 if (nativeFirstContainer) {
  34.                     nativeFirstContainer.style.marginTop = '';
  35.                 }
  36.             }
  37.         });
  38.     })();
  39. </script>
  40.  
  41. MOB =>
  42.  
  43. <script>
  44.     (function() {
  45.         var campaignHeight = document.querySelector('.' + self.identifier + ' [tabindex').offsetHeight;
  46.         var nativeContent = document.querySelector('body >div[id*="shopify-section-"]');
  47.         var mobileMenuRows = document.querySelector('.mobile-plan-menu');
  48.         if (nativeContent) {
  49.             nativeContent.style.marginTop = '14rem';
  50.         }
  51.         if (mobileMenuRows) {
  52.             mobileMenuRows.style.top = '5.7rem'
  53.         }
  54.         var nativeProductSection = document.querySelector('#shopify-section-product-duo-section');
  55.         if (nativeProductSection) {
  56.             nativeProductSection.style.marginTop = (campaignHeight + 58) + 'px';
  57.         }
  58.         var nativeLimitSection = document.querySelector('#limit');
  59.         if (nativeLimitSection) {
  60.             nativeLimitSection.style.marginTop = (campaignHeight + 58) + 'px';
  61.         }
  62.         var nativeFirstContainer = document.querySelector('body > .container');
  63.         if (nativeFirstContainer) {
  64.             nativeFirstContainer.style.marginTop = campaignHeight + 'px';
  65.         }
  66.         adoric.on("lightbox:before:close", function(e) {
  67.             if (e.lightbox.options.campaignId === self.campaignId) {
  68.                 var nativeContent = document.querySelector('body >div[id*="shopify-section-"]');
  69.                 if (nativeContent) {
  70.                     nativeContent.style.marginTop = '';
  71.                 }
  72.                 var mobileMenuRows = document.querySelector('.mobile-plan-menu');
  73.                 if (mobileMenuRows) {
  74.                     mobileMenuRows.style.top = '';
  75.                 }
  76.                 if (nativeProductSection) {
  77.                     nativeProductSection.style.marginTop = '';
  78.                 }
  79.                 if (nativeLimitSection) {
  80.                     nativeLimitSection.style.marginTop = '';
  81.                 }
  82.                 if (nativeFirstContainer) {
  83.                     nativeFirstContainer.style.marginTop = '';
  84.                 }
  85.             }
  86.         });
  87.     })();
  88. </script>
Add Comment
Please, Sign In to add comment