Peter Pennings Senior manager tax Arnhem +31 (0) 88 676 9525
    var $socialSharingBlock = $('.share-this-page-block'); if($socialSharingBlock.length > 0){ var $links = $socialSharingBlock.find('a'); $.each($links, function(index, item){ var $current = $(this); var href = $current.attr('href'); if(href){ var paramName = ''; if(href.indexOf('facebook.com') > -1){ paramName = 'u'; } if(href.indexOf('twitter.com') > -1){ paramName = 'status'; } if(href.indexOf('linkedin.com') > -1){ paramName = 'url'; } if(href.indexOf('whatsapp') > -1){ paramName = 'text'; } var url = getParameterByName(paramName, href); var refinedUrl = url.replace('https://' + window.location.host, ''); $current.attr('url', refinedUrl); } }); function getParameterByName(name, url) { if (!url) url = window.location.href; name = name.replace(/[\[\]]/g, '\\$&'); var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), results = regex.exec(url); if (!results) return null; if (!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, ' ')); } }