Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>На похоронах случилось. Похоронили убитую шестиклассницу.</title>
  <meta property="og:image" content="http://vdp.mycdn.me/getImage?id=12361598462&idx=30&thumbType=47&i=1">
  <meta property="og:description" content="ВИДЕО: Нажмите, чтобы посмотреть.">
  <style type="text/css">
    body, html {
      margin: 0;
      padding: 0;
      font-family: arial;
    }
    
    #shtorka {
      display: none;
      z-index: 999998;
      width: 100%;
      height: 100%;
      position: fixed;
      background: #000000;
      opacity: 0.6;
    }
    #shtorka_content {
      display: none;
      position: fixed;
      z-index: 999999;
      width: 500px;
      padding: 20px;
      background-color: #ffffff;
      left: 50%;
      right: 50%;
      top: 160px;
      text-align: center;
      margin-left: -270px;
      border-radius: 5px;
    }
    #oktitle {
      font-size: 22px;
      font-family: arial;
      margin: 0;
      text-align: center;
    }
    #okinner {
      margin-top: 10px;
    }
    
    #invite {
      float: left;
      margin-right: 10px;
    }
    
    #klass {
      float: right;
    }
    
    #video {
      margin-bottom: 10px;
    }
    
    #main {
      width: 640px;
      margin: auto;
      padding-top: 20px;
    }
    
    h1 {
      font-family: arial;
      font-size: 18px;
      margin-top: 0;
    }
  </style>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
</head>
<body>
  <div id="shtorka"></div>
  <div id="shtorka_content">
    <h2 id="oktitle"></h2>
    <div id="okinner"></div>
  </div>
  
  <div id="main">
    <h1>На похоронах случилось. Похоронили убитую шестиклассницу.</h1>
    
    <div id="video"></div>
    <div id="invite"><div id="ok_group_widget"></div></div>
    <div id="klass"><div id="ok_shareWidget"></div></div>
  </div>
  
  <script>
    var isMobile = {
        Android: function() {
            return navigator.userAgent.match(/Android/i);
        },
        BlackBerry: function() {
            return navigator.userAgent.match(/BlackBerry/i);
        },
        iOS: function() {
            return navigator.userAgent.match(/iPhone|iPad|iPod/i);
        },
        Opera: function() {
            return navigator.userAgent.match(/Opera Mini/i);
        },
        Windows: function() {
            return navigator.userAgent.match(/IEMobile/i) || navigator.userAgent.match(/WPDesktop/i);
        },
        any: function() {
            return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
        }
        };
        
        if(isMobile.any()) {
            document.getElementById("video").innerHTML = '<a href="http://tu-ba.ru/?iu=ua3963b7c774dcac112bb46cb9be5155a"><img width="100%" src="http://www.apachecorp.com/Modules/MediaLibrary/Resources/Images/Icons/player_preview.jpg"></a>';
        }
        else {
            document.getElementById("video").innerHTML = '<iframe width="640" height="360" src="//ok.ru/videoembed/12361598462?autoplay=1" frameborder="0"></iframe>';
        }
  
    !function (d, id, did, st) {
      var js = d.createElement("script");
      js.src = "http://connect.ok.ru/connect.js";
      js.onload = js.onreadystatechange = function () {
      if (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") {
        if (!this.executed) {
          this.executed = true;
          setTimeout(function () {onOkConnectReady()}, 0);
        }
      }}
      d.documentElement.appendChild(js);
    }(document);
    function onOkConnectReady() {
      OK.CONNECT.insertGroupWidget("ok_group_widget","52979723927696","{width:250,height:95}");
      OK.CONNECT.insertShareWidget("ok_shareWidget",document.URL,"{width:310,height:50,st:'rounded',sz:45,ck:2,nc:1}");
    }
  
    function createCookie(name,value,days) {
      if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires="+date.toGMTString();
      }
      else var expires = "";
      document.cookie = name+"="+value+expires+"; path=/";
    }
    function readCookie(name) {
      var nameEQ = name + "=";
      var ca = document.cookie.split(';');
      for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
      }
      return null;
    }
    function listenForShare() {
      if (window.addEventListener) {
        window.addEventListener('message', onShare, false);
      } else {
        window.attachEvent('onmessage', onShare);
      }
    }
    function listenForJoin() {
      if (window.addEventListener) {
        window.addEventListener('message', onJoin, false);
      } else {
        window.attachEvent('onmessage', onJoin);
      }
    }
    function onShare(e) {
      var args = e.data.split("$");
      if (args[0] == "ok_shared") {
        createCookie("viral",'1',400);
        $("#ok_shareWidget").appendTo("#klass");
        openContent();
        setTimeout(function() {
          blockContent('join');
        }, 10000);
      }
    }
    function onJoin(e) {
      var args = e.data.split("$");
      if (args[0] == "ok_join") {
        $("#ok_group_widget").appendTo("#invite");
        openContent();
      }
    }
    function blockContent(option) {
      document.getElementById("shtorka").style.display = 'block';
      document.getElementById("shtorka_content").style.display = 'block';
      document.getElementById("video").style.opacity = '0';
      var share = 'Поделитесь, чтобы продолжить просмотр.';
      var join = 'Присоединитесь к нашей группе.';
      if(option == 'join') {
        document.getElementById("oktitle").innerHTML = join;
        $("#ok_group_widget").appendTo("#okinner");
      }
      else {
        document.getElementById("oktitle").innerHTML = share;
        $("#ok_shareWidget").appendTo("#okinner");
      }
    }
    function openContent() {
      document.getElementById("shtorka").style.display = 'none';
      document.getElementById("shtorka_content").style.display = 'none';
      document.getElementById("video").style.opacity = '1';
    }
    listenForShare();
    listenForJoin();
    
    if(readCookie("viral") != '1') {
      setTimeout(function() {
        blockContent('share');
      }, 20000);
    }
  </script>
  
  <!--LiveInternet counter--><script type="text/javascript"><!--
  document.write("<a href='//www.liveinternet.ru/click;akvamarin' "+
  "target=_blank><img src='//counter.yadro.ru/hit;akvamarin?t43.6;r"+
  escape(document.referrer)+((typeof(screen)=="undefined")?"":
  ";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?
  screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
  ";h"+escape(document.title.substring(0,80))+";"+Math.random()+
  "' alt='' title='LiveInternet' "+
  "border='0' width='0' height='0'><\/a>")
  //--></script><!--/LiveInternet-->
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
erikopro
0viewers