我一直在玩一个脚本,并且真的希望它能够工作,但是我很无能为力,并且非常感谢这里的一些帮助。
此脚本的作用是:您将某人发送到该页面,该页面上的视频播放7秒钟,然后停止,并要求查看者共享该页面。 页面共享后,我想内容锁定它(使用head部分中的javascript)问题是,我该怎么做?内容储物柜完成后如何重定向查看器?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0041)http://ultimatescript.net84.net/show.html -->
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta property="og:image" content="http://i.imgur.com/5q3B3Y4.jpg"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Share to View</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js">
<script type="text/javascript" src="https://yotefiles.com/script_include.php?id=526879"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.1.js">
</script>
<script src="https://connect.facebook.net/en_US/all.js">
</script>
<script type="text/javascript">
$(document).ready(function () {
$('#shareonfacebook').click(function (e) {
// alert('hello9');
// $(".closeBtn").show();
e.preventDefault();
FB.ui(
{
method: 'feed',
name: 'Boy Falls Into Gorilla Cage. What Happens Next... Will SHOCK you!',
link: 'http://crazyvideotoday.blogspot.com/ncr',
caption: 'Click Here To Watch This Horrific Video!',
description: '4 Year Old Boy Attacked By Gorilla!',
message: 'Hello'},
function(response){
if(response && response.post_id) {
// self.location.href = 'http://www.thomaspynchon.com/inherent-vice.html'
$(".closeBtn").show();
}
else {
// self.location.href = 'http://www.google.com/'
// $(".closeBtn").show();
}
});
});
});
</script>
<style type="text/css"><!--
body, p, td {
font-size: 16px;
font-family: Verdana;
}
html {
background: url(http://i.imgur.com/YskVi6d.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
#content {
border: 0px groove silver;
background-color: rgba(0, 0, 0, 0.3);
color: black
width: 500px;
margin: 20px auto;
padding: 30px;
background-image: url('')
}
.auto-style1 {
margin-top: 44px;
margin-bottom: 21px;
}
.hidden { visibility: hidden; }
.unhidden { visibility: visible; }
#amitDiv {
display:none;position: absolute;
top: 76px;
background-color:rgba(0, 0, 0, 0.2);
color: black;
width: 543px;
margin-left: 0px;
margin-top: -30px;
padding:91px 10px 10px 10px;
height: 250px;
}
.closeBtn{
display:none;
background-color: red;
color: white;
font-weight: bold;
float: right;
padding: 3px 8px;
position: relative;
top: 80px;
right: 272px;
cursor: pointer;
}
#shareonfacebook{
background:url(http://i.imgur.com/dZOwP47.png);
width: 300px;
height: 73px;
text-indent: -1000px;
cursor: pointer;
}
--></style>
</head>
<body style="margin: 0; ">
<div id="content" style="width: 555px; height: 395px;" class="auto-style1">
<div style="text-align: center;">
<div id="player"></div>
<div id="amitDiv" ><button id="shareonfacebook" ></button>
<script>
FB.init({
appId : '1508997766063227'
});
</script>
<div class='closeBtn' onclick="startGateway('NjY3NDY5');">Close<div>
</div>
<script>
// 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', {
playerVars: {
'showinfo': 0,
'autohide': 1,
'modestbranding': 0,
},
height: '310',
width: '560',
wmode:'opaque',
videoId: 'H59vrp-84QU',
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, 7000);
done = true;
}
}
function stopVideo() {
player.stopVideo();
$("#amitDiv").slideDown(1000);
}
function closewhiteDiv() {
$("#amitDiv").slideUp(1000);
}
</script>
<!-- End content -->
</div>
</body></html>
Here is my test site, so you know what I'm trying to do..
我真的希望有人可以帮助我!谢谢:))