Advertisement
Guest User

Tumblr iframe for non-logged users

a guest
Jul 24th, 2012
506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.92 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  5.     <meta http-equiv="x-dns-prefetch-control" content="off"/>
  6.     <link rel="icon" href="http://assets.tumblr.com/images/favicon.gif?2" type="image/gif"/>
  7.  
  8.     <script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
  9.     <script type="text/javascript">
  10.         var logged_in = (document.cookie.indexOf('logged_in=1') != -1);
  11.     </script>
  12.  
  13.     <style type="text/css">
  14.         img, .img {
  15.             margin-left: 3px;
  16.             cursor: pointer;
  17.             display: block;
  18.             height: 20px;
  19.             border-width: 0px;
  20.             float: left;
  21.         }
  22.     </style>
  23. </head>
  24. <body
  25. style="background-color:transparent; margin:0px; padding:0px;"
  26. onload="
  27.     function $(name) { return document.getElementById(name); }
  28.     var get_vars = {};
  29.     window.location.search.replace(
  30.         /[?&]+([^=&]+)(=[^&]*)?/gi,
  31.         function(m, key, value){
  32.             get_vars[key] = (value === undefined) ? true : value.substring(1);
  33.         }
  34.     );
  35.     var ext = (/msie/i.test(navigator.userAgent) ? '' : '_alpha') +
  36.               ((! get_vars.lang || get_vars.lang == 'en_US' || get_vars.lang == 'it_IT' || get_vars.lang == 'ja_JP') ? '' : '_' + get_vars.lang);
  37.     if (logged_in || get_vars.iphone) {
  38.         location.href = 'http://www.tumblr.com/dashboard/iframe?' +
  39.                         (new String(window.location)).split('?')[1];
  40.     } else {
  41.         if (get_vars.brag != 0) {
  42.             if (get_vars.name) {
  43.                 $('follow_link').href =
  44.                     'https://www.tumblr.com/register/follow/' + get_vars.name;
  45.                 $('join_link').href =
  46.                     'https://www.tumblr.com/register/join_tumblr?referring_blog=' +
  47.                     get_vars.name;
  48.             }
  49.             if (get_vars.lang == 'de_DE') {
  50.                 $('follow_image').alt = get_vars.name + ' folgen';
  51.                 $('join_image').alt = 'Bei Tumblr registrieren';
  52.                 $('follow_image').style.width = '58px';
  53.                 $('join_image').style.width = '105px';
  54.             } else if (get_vars.lang == 'fr_FR') {
  55.                 $('follow_image').alt = 'S\'abonner à ' + get_vars.name;
  56.                 $('join_image').alt = 'S\'inscrire sur Tumblr';
  57.                 $('follow_image').style.width = '79px';
  58.                 $('join_image').style.width = '151px';
  59.             } else {
  60.                 $('follow_image').alt = 'Follow ' + get_vars.name;
  61.             }
  62.             $('follow_image').src = '/images/iframe_follow' + ext + '.png?6';
  63.             $('join_image').src = '/images/iframe_join_tumblr' + ext + '.png?6';
  64.             $('logged_out_controls').style.display = 'inline';
  65.         }
  66.         var pageTracker = _gat._getTracker('UA-97144-8');
  67.         pageTracker._trackPageview();
  68.     }
  69. ">
  70.     <div style="position:absolute; top:3px; right:3px; white-space:nowrap; height:20px;">
  71.         <span id="logged_out_controls" style="display:none;">
  72.             <a href="https://www.tumblr.com/register" target="_top" id="follow_link">
  73.                 <img id="follow_image" alt="Follow" style="width:58px;"/>
  74.             </a>
  75.             <a href="https://www.tumblr.com/register/join_tumblr" target="_blank"
  76.             id="join_link">
  77.                 <img id="join_image" alt="Join Tumblr" style="width:105px;"/>
  78.             </a>
  79.         </span>
  80.     </div>
  81. </body>
  82. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement