Guest User

Untitled

a guest
Aug 15th, 2021
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. <meta charset="utf-8"></meta>
  2. <style>
  3. @import "https://use.fontawesome.com/releases/v5.0.10/css/all.css";
  4. html, body {
  5. font-family: "Trebuchet MS", Helvetica, sans-serif;
  6. }
  7. #sociallocker {
  8. background-color: #EEEEEE;
  9. text-align: center;
  10. position: relative;
  11. max-width: 500px;
  12. height: 120px;
  13. display: flex;
  14. align-items: center;
  15. justify-content: center;
  16. overflow: hidden;
  17. border-radius:10px;
  18. }
  19. #sociallocker-overlay {
  20. background-color: rgba(0,0,0,0.6);
  21. font-size: 20px;
  22. font-weight: bold;
  23. color: #ffffff;
  24. transition: all 0.2s ease;
  25. }
  26. #sociallocker-overlay i {
  27. margin-right: 10px;
  28. }
  29. #sociallocker:hover #sociallocker-overlay {
  30. top: -100%;
  31. transition: all 0.2s linear;
  32. }
  33. #sociallocker:hover #sociallocker-content {
  34. top: 100%;
  35. transition: all 0.2s linear;
  36. }
  37. #sociallocker-content a {
  38. display: inline-block;
  39. text-decoration: none;
  40. padding: 10px 20px;
  41. background-color: #777777;
  42. color: #f9f9f9;
  43. border-radius: 4px;
  44. font-weight: bold;
  45. }
  46. #sociallocker-overlay,
  47. #sociallocker-content,
  48. #sociallocker-links{
  49. position: absolute;
  50. width: 100%;
  51. height: 100%;
  52. display: flex;
  53. align-items: center;
  54. justify-content: center;
  55. top: 0;
  56. left: 0;
  57. }
  58. #sociallocker-content {
  59. background-color: #ccc;
  60. transition: all 0.2s ease;
  61. }
  62. .social-1 {
  63. text-decoration: none;
  64. color: #ffffff;
  65. display: inline-block;
  66. width: 498px;
  67. height: 118px;
  68. overflow: hidden;
  69. margin-right: 0px;
  70. }
  71. .social-1 i {
  72. display: flex;
  73. align-items: center;
  74. justify-content: center;
  75. height: 100%;
  76. }
  77. .social-1:hover i {
  78. background-color: rgba(0,0,0,0.1);
  79. transform: scale(1.2);
  80. transition: all 0.2s;
  81. }
  82. .fb { background-color: #FF0000; }
  83. </style>
  84. <div id="sociallocker">
  85. <div id="sociallocker-links">
  86. <a class="social-1 fb" href="https://www.youtube.com/channel/UCqUX2UrWUz778zSFxPtVRyw?sub_confirmation=1"><i class="fab fa-youtube fa-3x"></i></a>
  87. </div>
  88. <div id="sociallocker-content">
  89. <a href="SHORTENED LINK HERE" rel="nofollow" target="_blank"><i class="fas fa-download"></i> Download</a>
  90. </div>
  91. <div id="sociallocker-overlay"><i class="fas fa-lock"></i>SUBSCRIBE TO UNLOCK</div>
  92. </div>
  93. <script>
  94. (function() {
  95. var sl = document.querySelector("#sociallocker");
  96. var slc = document.querySelector("#sociallocker-content");
  97. if (!sl) return;
  98. var old_slc_html = slc.innerHTML;
  99. slc.innerHTML = slc.innerHTML.replace(/(href=")(.*)(\")/g, "href=\"#\"");
  100. sl.querySelectorAll("#sociallocker-links a").forEach(function(ele) {
  101. ele.onclick = function(e) {
  102. var web_window = window.open(this.href, 'Share Link', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600,top=' + (screen.height/2 - 300) + ',left=' + (screen.width/2 - 300));
  103. var check_window_close = setInterval(function() {
  104. if (web_window.closed) {
  105. clearInterval(check_window_close);
  106. slc.innerHTML = old_slc_html;
  107. document.querySelector("#sociallocker-links").style.display = "none";
  108. document.querySelector("#sociallocker-overlay").style.display = "none";
  109. document.querySelector("#sociallocker-content").style.top = "0";
  110. }
  111. }, 1000);
  112. e.preventDefault();
  113. };
  114. });
  115. })();
  116. </script>
Advertisement
Add Comment
Please, Sign In to add comment