Advertisement
Guest User

Untitled

a guest
Aug 28th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.49 KB | None | 0 0
  1. <html><head>
  2. <script type="text/javascript">
  3. window.onload = function() {
  4. // Parse the tracking code from cookies.
  5. var trk = "sentinel_org_block";
  6. var cookies = document.cookie.split("; ");
  7. for (var i = 0; i < cookies.length; ++i) {
  8. if ((cookies[i].indexOf("trkCode=") == 0) && (cookies[i].length > 8)) {
  9. trk = cookies[i].substring(8);
  10. }
  11. }
  12. // Get the protocol for the redirect url.
  13. var protocol = "http:";
  14. if (window.location.protocol == "https:") {
  15. protocol = "https:";
  16. } else {
  17. // If "sl" cookie is set, redirect to https.
  18. for (var i = 0; i < cookies.length; ++i) {
  19. if ((cookies[i].indexOf("sl=") == 0) && (cookies[i].length > 3)) {
  20. window.location.href = "https:" + window.location.href.substring(window.location.protocol.length);
  21. return;
  22. }
  23. }
  24. }
  25. // Get the new domain. For touch.www.linkedin.com or tablet.www.linkedin.com
  26. // we strip \"touch.\" and \"tablet.\". For international domains such as
  27. // fr.linkedin.com, we convert it to www.linkedin.com
  28. var domain = location.host;
  29. if (domain.substr(0, 6) == \"touch.\") {
  30. domain = domain.substr(6);
  31. } else if (domain.substr(0, 7) == \"tablet.\") {
  32. domain = domain.substr(7);
  33. } else if (domain.charAt(2) == \".\") {
  34. domain = "www" + domain.substr(2);
  35. }
  36.  
  37. window.location.href = "https://" + domain + "/uas/login?trk=" + trk + "&session_redirect=" +
  38. encodeURIComponent(protocol + "//" + domain +
  39. window.location.href.substr(window.location.href.search(window.location.host) +
  40. window.location.host.length));
  41. }
  42. </script>
  43. </head></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement