I have script which allows to display Bing search results. I can call for the search results url’s like this:
'<p class="width"><a href="' , imgResult.Url , '">',imgResult.DisplayUrl,'</a></p>' ,
The problem is that sometimes the url is to long an ‘sloppy’ like this:
http://www.art-wallpaper.net/Game-Wallpapers/Assassins-Creed-Brotherhood/imagepages/image3.htm
I would like to ‘hide’ or ‘delete’ the beginning of the url (http://www.) and do the same from /Game... etc This way I can get a ‘clean’ and ‘short’ url like: art-wallpaper.net I there a (simple) way of doing this?
Perhaps a JavaScript function like this.
Pass your URL to the JavaScript function prior to printing it.
Untested.