Hello. Suppose there is such an address http://demo.ru/album.html#prettyPhoto[pp_gal1[/0/ you can somehow hide the part #prettyPhoto [pp_gal1] / 0 / in the URL. This part is added by prettyphoto plugin when viewing images.
- 2What does it mean to hide? You just need to get the URL without this part or what? - Dmitriy Simushev
- @Dmitriy Simushev yes without this part - MikhailChu September
- Is there really no way to remove it somehow? - MikhailChu
|
3 answers
$("a[rel^='prettyPhoto']").prettyPhoto({ ... deeplinking: false, ... }); |
You can get the part of the URL without #prettyPhoto... using regular expressions, like this:
var url = 'http://demo.ru/album.html#prettyPhoto[pp_gal1]/0/'; console.log(url.replace(/^([^#]+)#prettyPhoto.*$/, '$1')); Another question is what will you do about it. As @Qwertiy already said, if this line is added to the URL, it means that it is needed for some reason.
|
It is impossible. Hide nothing can only be removed.
But once it is added, then for some reason you need.
|