Skip to content

Commit

Permalink
Merge pull request #541 from thegreenwebfoundation/hs-remove-debug-code
Browse files Browse the repository at this point in the history
Remove debug code
  • Loading branch information
hanopcan committed Jan 3, 2024
2 parents 55442df + d1d563d commit 80a527d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions apps/theme/templates/base_directory.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,20 @@ <h3 class="text-xl uppercase">Need help?</h3>

const scrollFunc = () => {

// Have a timer to prevent unnecessary work in the browser.
if( timer ) {
window.clearTimeout( timer );
}

timer = window.setTimeout( function() {

// Get the current scroll value
// Get the current scroll value.
let y = window.scrollY;

// If the main-content box is at the top of the screen, show button.
if ( y > mainContentTopPos ) {
console.log( "remove" );
scrollToTopButton.classList.remove( "invisible" );
} else {
console.log( "add" );
scrollToTopButton.classList.add( "invisible" );
}
}, 150);
Expand Down

0 comments on commit 80a527d

Please sign in to comment.