Not sure how to change event listener to passive

Blaine2045
Excursionist
18 0 7

Hello,

I'm trying to add the passive flag that is missing according to GTMetrix. The inspector tells me line 897, and am viewing it in the Sources tab, but I'm not sure exactly how to implement it.
I tried adding it to my theme.js, but nothing seems to be working here either. My site is https://www.killyourgod.ai

The line specified by Lighthouse is:

<body class="template-index" ontouchstart="return true;" data-transitions="true" data-animate_underlines="true" data-animate_images="true" data-button_style="shadow" data-type_product_capitalize="true" data-type_header_capitalize="true" data-product_image_scatter="false" data-button_type_style="caps">


The code that I assume I would edit in the theme.js is:

// Prevent vertical scroll while using flickity sliders
  (function() {
    var e = !1;
    var t;
  
    document.body.addEventListener('touchstart', function(i) {
      if (!i.target.closest('.flickity-slider')) {
        return e = !1;
        void 0;
      }
      e = !0;
      t = {
        x: i.touches[0].pageX,
        y: i.touches[0].pageY
      }
    })
  
    document.body.addEventListener('touchmove', function(i) {
      if (e && i.cancelable) {
        var n = {
          x: i.touches[0].pageX - t.x,
          y: i.touches[0].pageY - t.y
        };
        Math.abs(n.x) > Flickity.defaults.dragThreshold && i.preventDefault()
      }
    }, { passive: !1 })
  })();

 
Can anyone assist?

Reply 1 (1)
Blaine2045
Excursionist
18 0 7

I still need assistance with this, if anyone can help. Thank you.