Skip to content

Commit

Permalink
Fix code-charity#2069: Transparent top bar stops working when scroll.
Browse files Browse the repository at this point in the history
This commit resolves issue code-charity#2069, where the transparent top bar would lose its transparency effect upon scrolling. The issue was addressed by removing unnecessary icons and adjusting opacity settings to maintain the desired transparent appearance even during scrolling. It also have modifications that admin requested to. Removed not necessary lines.
  • Loading branch information
joaolscosta committed Apr 20, 2024
1 parent 95763e4 commit 5741695
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions js&css/web-accessible/www.youtube.com/appearance.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,16 +615,4 @@ if (ImprovedTube.storage.header_transparent === true) {
document.documentElement.removeAttribute('data-scroll-direction');
}
});

/*------------------------------------------------------------------------------
SHOW/HIDE VOICE SEARCH BUTTON
------------------------------------------------------------------------------*/
window.addEventListener('scroll', function() {
var voiceSearchButton = document.getElementById('voice-search-button');
if (window.scrollY === 0) {
voiceSearchButton.style.display = 'block';
} else {
voiceSearchButton.style.display = 'none';
}
});
}

0 comments on commit 5741695

Please sign in to comment.