function inIframe () { try { return window.self !== window.top; } catch (e) { return true; } } function getLocation() { var location = ''; if (inIframe()) { return parent.location.href; } else { return document.location.href; } } document.write('
'); if (inIframe) { var input = document.createElement("input"); input.setAttribute("type", "hidden"); input.setAttribute("name", "request[tn_browser]"); input.setAttribute("value", navigator.userAgent); document.getElementById("tninfo").appendChild(input); } else { var input = document.createElement("input"); input.setAttribute("type", "hidden"); input.setAttribute("name", "request[tn_browser]"); input.setAttribute("value", "CCBot/2.0 (http://commoncrawl.org/faq/)"); document.getElementById("tninfo").appendChild(input); } var input = document.createElement("input"); input.setAttribute("type", "hidden"); input.setAttribute("name", "request[tn_url]"); input.setAttribute("value", getLocation()); document.getElementById("tninfo").appendChild(input); var input = document.createElement("input"); input.setAttribute("type", "hidden"); input.setAttribute("name", "request[tn_ip]"); input.setAttribute("value", "54.81.110.114"); document.getElementById("tninfo").appendChild(input); document.getElementById("tninfo").appendChild(input);