Skip to content

Commit

Permalink
feat(browse): improve confused byte implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
prplwtf committed Nov 26, 2023
1 parent 2b01cdd commit 7881c74
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions browse/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ <h1 class="display-4 fw-normal lh-1 mb-2 d-lg-none d-block text-center" style="c
<div class="container">
<div class="row" id="products"></div>
<div class="row" id="byte-confused" style="display: none">
<p class="text-center"><img src="/.assets/storage/misc/png/6.png" style="width: 150px; opacity: .2"></p>
<p class="text-center"><img src="/.assets/storage/misc/png/5.png" style="width: 150px; opacity: .2"></p>
</div>
</div>

Expand Down Expand Up @@ -216,9 +216,12 @@ <h5 class="card-title text-truncate">${product.name}</h5>
function byteconfused() {
var byte = document.getElementById("byte-confused")
var url = new URL(window.location.href)
var c = document.getElementById('filterThemes')
var d = document.getElementById('filterExtensions')

if(url.searchParams.get('1') == 'n' && url.searchParams.get('2') == 'n') { byte.style.display = "inline" }
else { byte.style.display = "none" }
else if(!c.checked && !d.checked) { byte.style.display = "inline" }
else byte.style.display = "none"
}

filterThemes.addEventListener('change', handleThemeFilter)
Expand All @@ -241,5 +244,6 @@ <h5 class="card-title text-truncate">${product.name}</h5>
byteconfused()
}
filter()
byteconfused()
</script>
</body>

0 comments on commit 7881c74

Please sign in to comment.