I want to change some website's background since I hate the current one but to do so I got to use document.location.host. I got a big js file includes another sites so I can't just create another js for this one. Only problem is that site redirects example.com to example1.com, example2.com, example3.com and so on.
So I can use
if (document.location.host === example1.com || example2.com || example3.com)
but I want something more steady so I wouldn't need to write 1000 urls side by side, like example1.com - example1255.com. It must be like
if (document.location.host === example[*].com)
Now, I know for a fact that this is possible because I did it before. I guess I did it by using i++ method but I don't remember how so this is my question.
How can I use an array to get website? Or is it more like; How can I choose a website with and array?
P.S. I don't want to use stylish or something! P.P.S. I don't need an equality check. The whole idea is not writing those values but making the script do it.