Skip to content

Instantly share code, notes, and snippets.

@thomas-p-wilson
Last active March 22, 2020 21:38
Show Gist options
  • Save thomas-p-wilson/5cf64a2f25c58c33abfd725e9a5cf92f to your computer and use it in GitHub Desktop.
Save thomas-p-wilson/5cf64a2f25c58c33abfd725e9a5cf92f to your computer and use it in GitHub Desktop.
Membership
<style>
body:not(.sqs-edit-mode) .sqs-layout .sqs-block {
pointer-events: none;
opacity: 0;
visibility: hidden;
}
body:not(.sqs-edit-mode) .removex {
pointer-events: auto !important;
opacity: 1 !important;
visibility: visible !important;
}
body:not(.sqs-edit-mode) .subslock {
opacity: 0 !important;
pointer-events: none
}
body:not(.sqs-edit-mode) .fadeload {
opacity: 1 !important
}
body:not(.sqs-edit-mode) .sqs-layout {
opacity: 0;
transition: all ease-in-out 300ms;
-ms-transition: all ease-in-out 300ms;
-moz-transition: all ease-in-out 300ms;
-webkit-transition: all ease-in-out 300ms
}
</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script type="text/javascript">
var frameloaded = false;
var windowloaded = false;
function onframeload() {
frameloaded = true;
auth();
}
function auth () {
if (!frameloaded || !windowloaded) {
return
}
var token = "Back";
if (($(".subscription-checkx").contents().text().search(token) > -1)){
/* ACCESS GRANTED **/
$(".sqs-layout .sqs-block").addClass('removex');
$(".subsnotice").addClass('subslock');
} else {
$(".sqs-layout .sqs-block").removeClass('removex');
$(".subsnotice").removeClass('subslock');
}
};
$(window).load(function() {
windowloaded = true;
auth();
})
</script>
<iframe style="visbility:hidden;pointer-events:none;z-index:-9999;opacity:0;position:absolute;top:0;left:0;width:500px;height: 200px;" class="subscription-checkx" src="/account/frame/subscriptions" onload="onframeload()"></iframe>
<div class="subsnotice subslock" style="position:fixed;z-index:9;top:55%;left:50%;transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);width: 400px;height: 200px;transition: all ease-in-out 200ms;">
<div class="subsicon" style="background:url('https://static1.squarespace.com/static/54dcf1f3e4b03174c3dc75f5/t/5be5e854352f5308e3762256/1541793876726/subspadlock.png');background-repeat:no-repeat;background-position:center;background-size:contain;top:0;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);position:absolute;width:22px;height:22px;display:block;"></div>
<div class="subsmessage" style="left:0;margin-top: 36px;width:100%;display:block;font-size:14px !important;text-align:center;">
<h3>Members Access Only</h3>
</div>
</div>
<script type="text/javascript">
$(window).load(function(){
setTimeout(function(){
$(".sqs-layout").addClass("fadeload");
},2000);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment