JS No Longer Works for Theme Component

Edit: I put it in the script but I still can’t get it work.