I have to find current url and if it is equal to “http://localhost/mysite” then I need to put below code.
Example (pseudocode):
If(FindCurrentURL.ContainsString("http://localhost/mysite")){
.ms-quickLaunch { display: none; }
}
How to find URL and that contains above URL?
The full current URL can be found in
the second part of your question is not as easy to implement as it seems. There are several ways to modify a CSS class during runtime, but none of them is really convenient and simple.
Consider targeting whatever element you want to hide using an ID and
document.getElementById().