How can I stop js script from running on mobile?
You can deetect the screen size in Vanilla JS or jQuery. In jQuery you can use height() and width() to get screen size. So you can try this

jQuery(document).ready(function(){
  if($(window).width() &gt; 480){
    $('#selllink').trigger("click");
  }
});


You could also use resize() to check for window resize event.