on my website i have an p5.js sketch displayed in the background. the sketch is linked in an seperate file in the head section of my html file. the problem is, that i have a second sketch only for the mobile media query of the website. therefore i tried to add following if statement around my sketch in the file:
if (document.documentElement.clientWidth < 600) {
// my p5.js sketch
}
somehow thats not working for safari browser...
is there an other way to hide a script file on a website?