Untitled

 avatar
unknown
plain_text
2 years ago
1.5 kB
5
Indexable
try{
function listener() {
  /* These are the modifications: */
  window.addEventListener("locationchange", function () {
    setTimeout(function(){
      if ((window.innerWidth < 768)  && document.querySelectorAll('.section.searched-сity_steps .scale-step#scale_item_1 .active-stick, .section.searched-сity_steps .scale-step#scale_item_2 .active-stick, .section.searched-сity_steps .scale-step#scale_item_3 .active-stick, .section.searched-сity_steps .scale-step#scale_item_4 .active-stick').length > 0) {
        document.querySelector('.REGUSVO-sticky') && document.querySelector('.REGUSVO-sticky').classList.add('eg-hide');
      }
        else{
                    document.querySelector('.REGUSVO-sticky') && document.querySelector('.REGUSVO-sticky').classList.remove('eg-hide');
        }
    },1000);
    
  });
  history.pushState = ((f) =>
    function pushState() {
      var ret = f.apply(this, arguments);
      window.dispatchEvent(new Event("pushstate"));
      window.dispatchEvent(new Event("locationchange"));
      return ret;
    })(history.pushState);
  history.replaceState = ((f) =>
    function replaceState() {
      var ret = f.apply(this, arguments);
      window.dispatchEvent(new Event("replacestate"));
      window.dispatchEvent(new Event("locationchange"));
      return ret;
    })(history.replaceState);
  window.addEventListener("popstate", () => {
    window.dispatchEvent(new Event("locationchange"));
  });
}
listener();

}
catch(er){
    
}
Editor is loading...