Advertisement
Guest User

Content locker

a guest
Mar 14th, 2012
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.62 KB | None | 0 0
  1. Content Locker
  2. So to get it working, you need to copy and paste this javascript into the header of your page.
  3.  
  4. Code:
  5.  
  6. <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js" type="text/javascript"></script>
  7. <script type="text/javascript">
  8.  
  9. var Delay = 10;//Seconds after them clicking the link, the gateway vanishes.
  10.  
  11. function setupgateway()
  12. {
  13. var Left = $(window).width() /2;
  14. Left = Left - $('#gatewaydiv').width()/2;
  15.  
  16. var Top = $(window).height() /2;
  17. Top = Top - $('#gatewaydiv').height()/2;
  18.  
  19. $('#gatewaydiv').css('top', Top+'px').css('left', Left+'px').css('display', 'inline');
  20. $('#gatewayDimmer').width($('html').width());
  21. $('#gatewayDimmer').height($('html').height());
  22. $('#gatewayDimmer').css('display','block');
  23. }
  24.  
  25. function removegateway()
  26. {
  27. $('#gatewaydiv').css('display', 'none');
  28. $('#gatewayDimmer').css('display','none');
  29. }
  30.  
  31. $(document).ready(function()
  32. {
  33. $('.offerlink').click(function()
  34. {
  35. setTimeout('removegateway()', Delay*1000);
  36. });
  37.  
  38. setupgateway();
  39. });
  40. </script>
  41.  
  42. The only options you need to worry about in there are right at the top. The "Delay". You can set this to however many seconds you want the gateway to come down, AFTER they have clicked one of the offers.
  43.  
  44. Here are the styles used. Copy and paste these into the head of your page aswell.
  45.  
  46. Code:
  47.  
  48. <style>
  49.  
  50. body
  51. {
  52. background-image:url('http://i41.tinypic.com/29zvocy.jpg');
  53. background-repeat:repeat;
  54. height:100%;
  55. margin:0;
  56. }
  57.  
  58. #mainContent
  59. {
  60. background-color:white;
  61. margin-left:auto;
  62. margin-right:auto;
  63. margin-top:30px;
  64. width:700px;
  65. border:3px solid #CDCDCD;
  66. text-align:center;
  67. }
  68.  
  69. #gatewaydiv
  70. {
  71. background-image:url("http://i41.tinypic.com/2znsvti.png");
  72. background-repeat:no-repeat;
  73. width:500px;
  74. height:300px;
  75. padding:20px;
  76. position:absolute;
  77. display:none;
  78. background-color:#FFFFFF;
  79. border:solid 4px gray;
  80. text-align:center;
  81. font-family:arial;
  82. }
  83.  
  84. #gatewaydiv h1
  85. {
  86. font-size:35px;
  87. color:#cc0000;
  88. }
  89.  
  90. #gatewayMessage
  91. {
  92. font-size:18px;
  93. }
  94.  
  95. .offerlink
  96. {
  97. color:red;
  98. font-weight:bold;
  99. }
  100.  
  101. #OfferList
  102. {
  103. margin:0;
  104. padding:0;
  105. }
  106.  
  107. #OfferList
  108. {
  109. list-style:none;
  110. }
  111.  
  112. #gatewayDimmer
  113. {
  114. background-color:#000000;
  115. opacity:0.8;
  116. display:none;
  117. position:absolute;
  118. top:0;
  119. }
  120.  
  121.  
  122. </style>
  123.  
  124. Some of this isn't needed, but rather than clean it up I will leave it to you guys. There is no danger though in just using this stock.
  125.  
  126. Finally you will need to post this into the body of your page. I could do it via javascript, but I think it makes it far more readable and easier to edit when it is just in plain HTML form. I recommend posting it just after the <body> tag, but you can place it anywhere in there.
  127.  
  128. Code:
  129.  
  130. <div id="gatewayDimmer">
  131. </div>
  132.  
  133. <div id="gatewaydiv">
  134. <ul id="OfferList">
  135. <h1>Do an offer or DAI!</h1>
  136. <span id="gatewayMessage">If you wish to see your friends alive. You will fill out an offer right now!</span>
  137. <br /><br />
  138. <li><a href="http://www.wachahost.com" class="offerlink" target="blank">Cheap Web Hosting</a></li>
  139. <li><a href="http://fgfgfg.com/x/0/1076/3696/" class="offerlink" target="blank">Free Apple Ipad</a></li>
  140. <li><a href="http://www.google.com" class="offerlink" target="blank">Google</a></li>
  141. </ul>
  142. <br /><br />
  143. After completing an offer. Please wait up to a minute for it to register.<br />
  144. Thank you!
  145. </div>
  146.  
  147. Obviously edit as you see fit. You can change the URL's and the message, well really anything in the HTML. It should all be pretty easy to change, just check where it it is in the source.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement