I want to check if I am in certain domain, like this (in manifest.json for chrome extensions):
"content_scripts": [
{
  "matches": ["*://certain.site/*"],
  "js": ["some.js"]
}
But it seems like there are only dirty ways in javascript, like .split("/") which I don't want to use. Is there a clean way to do it?
 
     
    