Remove local storage logic from snippet

This commit is contained in:
tsmitty11 2023-06-02 09:41:57 +01:00
parent 3310afacc2
commit 03dd19985c
3 changed files with 34 additions and 86 deletions

View file

@ -1,5 +1,5 @@
<script> <script>
// Add a 400px tall placeholder // Add a 400px tall placeholder
$('#count').html('<div style="height: 400px"></div>'); $('#count').html('<div style="height: 400px"></div>');
$('#count1').html('<div style="height: 400px"></div>'); $('#count1').html('<div style="height: 400px"></div>');
@ -17,22 +17,20 @@
fetch('https://app.tea.xyz/api/signups') fetch('https://app.tea.xyz/api/signups')
.then(res => res.json()) .then(res => res.json())
.then(res => { .then(res => {
const signups = res.signups ? res.signups.toLocaleString() : "" const signups = res.signups ? res.signups.toLocaleString() : "";
if (!(localStorage['signup'] || '').match(/:::/)) { $('#count').html(signups);
$('#count').html(signups) $('#count1').html(signups);
} $('#count2').html(signups);
$('#count1').html(signups) $('#count3').html(signups);
$('#count2').html(signups) $('#count4').html(signups);
$('#count3').html(signups) $('#count5').html(signups);
$('#count4').html(signups) $('#count6').html(signups);
$('#count5').html(signups) $('#count7').html(signups);
$('#count6').html(signups) $('#stat-one').html(res.repos ? res.repos.toLocaleString() : "");
$('#count7').html(signups) $('#stat-one-small').html(res.repos ? res.repos.toLocaleString() : "");
$('#stat-one').html(res.repos ? res.repos.toLocaleString() : "") $('#stat-two').html(res.maintainers ? res.maintainers.toLocaleString() : "");
$('#stat-one-small').html(res.repos ? res.repos.toLocaleString() : "") });
$('#stat-two').html(res.maintainers ? res.maintainers.toLocaleString() : "")
})
} catch (e) { } catch (e) {
console.error(e) console.error(e);
} }
</script> </script>

View file

@ -94,31 +94,7 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
<script src="https://code.jquery.com/jquery-3.6.0.min.js" <script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<!--
<script>
$(window).scroll(function () {
$('nav').toggleClass('scrolled', $(this).scrollTop() > 100);
});
if (localStorage['signup'].match(/:::/)) {
const [username, serial_] = localStorage.signup.split(':::');
const serial = (+serial_).toLocaleString()
$('.box-auth-true').show();
$('.box-auth-false').hide();
$('#auth-username').html(username);
$('#count').html(`${serial} / <span id='count3'></span>`);
$('#count-sub-text').html('YOUR AUTHENTICATION NUMBER');
$('#communitea').html('Thanks for joining our communi&#39;<span style="color:#54BAAB;">tea</span>');
$('#revolution-text').html(
'Now stay tuned! As an early authenticator, youll be entitled to a variety of exciting rewards, including minted NFT certificates.'
);
$('#auth-body-text').hide();
$('.rounded-pill').hide();
$('.auth-btn').html('Configure GitHub App');
$('.auth-btn').attr('href', 'https://github.com/apps/tea-xyz')
}
</script>
-->
<script type="text/javascript"> <script type="text/javascript">
(function(c,l,a,r,i,t,y){ (function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};

View file

@ -18,32 +18,6 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
<script src="https://code.jquery.com/jquery-3.6.0.min.js" <script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<!--
<script>
$(window).scroll(function () {
$('nav').toggleClass('scrolled', $(this).scrollTop() > 100);
});
if (localStorage['signup'].match(/:::/)) {
const [username, serial_] = localStorage.signup.split(':::');
const serial = (+serial_).toLocaleString()
$('.box-auth-true').show();
$('.box-auth-false').hide();
$('#auth-username').html(username);
$('#count').html(`${serial} / <span id='count3'></span>`);
$('#count-sub-text').html('YOUR AUTHENTICATION NUMBER');
$('#communitea').html('Thanks for joining our communi&#39;<span style="color:#54BAAB;">tea</span>');
$('#revolution-text').html(
'Now stay tuned! As an early authenticator, youll be entitled to a variety of exciting rewards, including minted NFT certificates.'
);
$('#auth-body-text').hide();
$('.rounded-pill').hide();
$('.auth-btn').html('Configure GitHub App');
$('.auth-btn').attr('href', 'https://github.com/apps/tea-xyz')
}
</script>
-->
<script type="text/javascript"> <script type="text/javascript">
(function(c,l,a,r,i,t,y){ (function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};