Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <meta charset="utf-8"></meta>
- <style>
- @import "https://use.fontawesome.com/releases/v5.0.10/css/all.css";
- html, body {
- font-family: "Trebuchet MS", Helvetica, sans-serif;
- }
- #sociallocker {
- background-color: #EEEEEE;
- text-align: center;
- position: relative;
- max-width: 500px;
- height: 120px;
- display: flex;
- align-items: center;
- justify-content: center;
- overflow: hidden;
- border-radius:10px;
- }
- #sociallocker-overlay {
- background-color: rgba(0,0,0,0.6);
- font-size: 20px;
- font-weight: bold;
- color: #ffffff;
- transition: all 0.2s ease;
- }
- #sociallocker-overlay i {
- margin-right: 10px;
- }
- #sociallocker:hover #sociallocker-overlay {
- top: -100%;
- transition: all 0.2s linear;
- }
- #sociallocker:hover #sociallocker-content {
- top: 100%;
- transition: all 0.2s linear;
- }
- #sociallocker-content a {
- display: inline-block;
- text-decoration: none;
- padding: 10px 20px;
- background-color: #777777;
- color: #f9f9f9;
- border-radius: 4px;
- font-weight: bold;
- }
- #sociallocker-overlay,
- #sociallocker-content,
- #sociallocker-links{
- position: absolute;
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- top: 0;
- left: 0;
- }
- #sociallocker-content {
- background-color: #ccc;
- transition: all 0.2s ease;
- }
- .social-1 {
- text-decoration: none;
- color: #ffffff;
- display: inline-block;
- width: 498px;
- height: 118px;
- overflow: hidden;
- margin-right: 0px;
- }
- .social-1 i {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 100%;
- }
- .social-1:hover i {
- background-color: rgba(0,0,0,0.1);
- transform: scale(1.2);
- transition: all 0.2s;
- }
- .fb { background-color: #FF0000; }
- </style>
- <div id="sociallocker">
- <div id="sociallocker-links">
- <a class="social-1 fb" href="https://www.youtube.com/channel/UCqUX2UrWUz778zSFxPtVRyw?sub_confirmation=1"><i class="fab fa-youtube fa-3x"></i></a>
- </div>
- <div id="sociallocker-content">
- <a href="SHORTENED LINK HERE" rel="nofollow" target="_blank"><i class="fas fa-download"></i> Download</a>
- </div>
- <div id="sociallocker-overlay"><i class="fas fa-lock"></i>SUBSCRIBE TO UNLOCK</div>
- </div>
- <script>
- (function() {
- var sl = document.querySelector("#sociallocker");
- var slc = document.querySelector("#sociallocker-content");
- if (!sl) return;
- var old_slc_html = slc.innerHTML;
- slc.innerHTML = slc.innerHTML.replace(/(href=")(.*)(\")/g, "href=\"#\"");
- sl.querySelectorAll("#sociallocker-links a").forEach(function(ele) {
- ele.onclick = function(e) {
- 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));
- var check_window_close = setInterval(function() {
- if (web_window.closed) {
- clearInterval(check_window_close);
- slc.innerHTML = old_slc_html;
- document.querySelector("#sociallocker-links").style.display = "none";
- document.querySelector("#sociallocker-overlay").style.display = "none";
- document.querySelector("#sociallocker-content").style.top = "0";
- }
- }, 1000);
- e.preventDefault();
- };
- });
- })();
- </script>
Advertisement
Add Comment
Please, Sign In to add comment