I'm trying to get /blog in order to put in url_pathname.
var link = 'http://www.example.com/blog';
alert(url_pathname);
if the link was 'http://www.example.com/blog/post', url_pathname would be /blog/page
I tried the following without success.
var link = 'http://www.example.com/blog';
var url_pathname = link[0].pathname;
alert(url_pathname);