Hello @kartik,
You would use indexOf like this:
if(window.location.href.indexOf("franky") != -1){....}
Also notice the addition of href for the string otherwise you would do:
if(window.location.toString().indexOf("franky") != -1){....}
Hope this works!!