I need to edit my scrip to get only ref = '521590819123';
How ?
<script type="text/javascript">
var ref = "http://www.site.ru/profile/521590819123";
if( ref.indexOf('profile') >= 0 ) {
ref = String(ref).substr(ref.indexOf('profile'));
}
alert(ref);
</script>