Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolved: toggle cards shortcut working #1846

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion js&css/web-accessible/www.youtube.com/shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,19 @@ ImprovedTube.shortcutStatsForNerds = function () {
------------------------------------------------------------------------------*/

ImprovedTube.shortcutToggleCards = function () {
document.documentElement.toggleAttribute('it-player-hide-cards');
// console.log('Shortcut pressed'); // Check if the shortcut is triggered

// Get the end screen div
var endScreenDiv = document.querySelector('.html5-endscreen');

// Check if the end screen div exists
if (endScreenDiv) {
// Toggle the visibility of the end screen div
endScreenDiv.style.display = (endScreenDiv.style.display !== 'none') ? 'none' : 'block';
// console.log('Toggled'); // Check if the end screen is toggled
} else {
console.log('End screen div not found');
}
};


Expand Down