Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- //<![CDATA[
- function myFunction() {
- document.getElementById("video").innerHTML = "<div id='player'></div>";
- // 2. This code loads the IFrame Player API code asynchronously.
- var tag = document.createElement('script');
- tag.src = "https://www.youtube.com/iframe_api";
- var firstScriptTag = document.getElementsByTagName('script')[0];
- firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
- }
- // 3. This function creates an <iframe> (and YouTube player)
- // after the API code downloads.
- var player;
- function onYouTubeIframeAPIReady() {
- player = new YT.Player('player', {
- height: '390',
- width: '640',
- videoId: 'M7lc1UVf-VE',
- events: {
- 'onReady': onPlayerReady,
- 'onStateChange': onPlayerStateChange
- }
- });
- }
- // 4. The API will call this function when the video player is ready.
- function onPlayerReady(event) {
- event.target.playVideo();
- }
- // 5. The API calls this function when the player's state changes.
- // The function indicates that when playing a video (state=1),
- // the player should play for six seconds and then stop.
- var done = false;
- function onPlayerStateChange(event) {
- if (event.data == YT.PlayerState.PLAYING && !done) {
- //setTimeout(stopVideo, 6000);
- done = true;
- }
- }
- function stopVideo() {
- player.stopVideo();
- }
- function onPlayerReady(event) {
- event.target.setVolume(0);
- event.target.playVideo();
- }
- var done = false;
- function onPlayerStateChange(event) {
- if (event.data == YT.PlayerState.PLAYING && !done) {
- // setTimeout(stopVideo, 6000);
- done = true;
- }
- event.target.setVolume(0);
- }
- //]]>
- </script>
- <script src='https://rawgit.com/ha07za/how-arabic/master/howarabicpopup.js' type='text/javascript'/>
- <script type='text/javascript'>
- $('#popup-box').howarabicpopup({
- 'autoOpen': true
- });
- </script>
- /*=============== CSS Popup Like box by howarabi.blogspot.com/ ======================*/
- .howarabicpopup{position:fixed;top:0;left:0;right:0;bottom:0;z-index:90000;background:rgba(0,0,0,.6);overflow-x:hidden;overflow-y:auto;display:none}
- .howarabicpopup-container{background:#fff url(http://i.imgur.com/2twQjiN.gif) no-repeat 50% 50%;padding:0;font-size:14px;height:236px;position:fixed;top:50%;left:50%;z-index:90001;-webkit-box-shadow:0 0 15px 0 rgba(50,50,50,0.8);transform:translateY(-50%) translateX(-50%)}
- .howarabicpopup .howarabicpopup-close{position:absolute;top:9px;right:20px;font-weight:700;font-family:Verdana;font-size:18px;cursor:pointer;color:#fff}
- .howarabicpopup .howarabicpopup-close:hover{color:#535353}
- .howarabicpopup .howarabicpopup-header{font-size:20px;padding:10px;text-align:center;color:#fff;font-family:Open Sans;background-color:#d14233;text-shadow:1px 2px 4px #838383}
- .howarabicpopup .howarabicpopup-header p{font-size:10px;padding:0;margin:0;font-weight:400;text-transform:initial}
- .howarabicpopup .howarabicpopup-content{padding:10px 20px}
- <div id="popup-box" class="howarabicpopup">
- <div class="howarabicpopup-container">
- <div class="howarabicpopup-header">
- <div class="howarabicpopup-close" data-dismiss="howarabicpopup"> <button onclick="myFunction();return false;">إغلاق النافذة</button> </div>
- <div id="video"></div>
- مرحبا بك على موقع اَمني
- <p> نتمنى أن تنظم إلى عائلتنا على الفيس بوك بالضغط على زر الإعجاب و كذا تكون أقرب إلينا
- </p>
- </div>
- <div class="howarabicpopup-content">
- <div class="fb-page" data-href="https://www.facebook.com/amnitech8" data-width="400" data-height="300" data-small-header="true" data-adapt-container-width="true" data-hide-cover="true" data-show-facepile="true" data-show-posts="false"><div class="fb-xfbml-parse-ignore"></div></div>
- </div>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement