NikolayBezay

Walla save productPrice for Adoric system GTM teg(MOB domain)

Nov 26th, 2020
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.51 KB | None | 0 0
  1. (function() {
  2.     var checkPrice = setInterval(function() {
  3.         var productPriceMob = document.querySelector('.price-bar .current-price');
  4.         if (productPriceMob) {
  5.             clearInterval(checkPrice);
  6.             var priceValue = productPriceMob.textContent;
  7.             priceValue = parseFloat(priceValue.match(/\d/g).join(''));
  8.             window.adoricCurrentProductPrice = priceValue;
  9.         }
  10.     }, 500);
  11.    
  12.     setTimeout(function() {
  13.         clearInterval(checkPrice);
  14.     }, 7000);
  15. })();
Advertisement
Add Comment
Please, Sign In to add comment