Skip to content

Commit

Permalink
Update shortcuts.js typos
Browse files Browse the repository at this point in the history
  • Loading branch information
raszpl authored Jul 5, 2024
1 parent 966f3fb commit e369e60
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js&css/web-accessible/www.youtube.com/shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,10 @@ ImprovedTube.shortcutChapters = function () {
const available = document.querySelector('[target-id*=chapters][visibility*=HIDDEN]') || document.querySelector('[target-id*=chapters]').clientHeight;
if (available) {
const modernChapters = document.querySelector('[modern-chapters] #navigation-button button[aria-label]');
modernChapters ? modernChapters.click() || document.querySelector('[target-id*=chapters]')?.removeAttribute('visibility');
modernChapters ? modernChapters.click() : document.querySelector('[target-id*=chapters]')?.removeAttribute('visibility');
} else {
const visibilityButton = document.querySelector('[target-id*=chapters][visibility*=EXPANDED] #visibility-button button[aria-label]');
visibilityButton ? visibilityButton.click() || document.querySelector('*[target-id*=chapters] #visibility-button button')?.click();
visibilityButton ? visibilityButton.click() : document.querySelector('*[target-id*=chapters] #visibility-button button')?.click();
}
if (!modernChapters && visibilityButton) {
console.error('shortcutChapters: Cant fint proper Enble button, falling back to unreliable bruteforce method');
Expand All @@ -417,10 +417,10 @@ ImprovedTube.shortcutTranscript = function () {
const available = document.querySelector('[target-id*=transcript][visibility*=HIDDEN]') || document.querySelector('[target-id*=transcript]').clientHeight;
if (available) {
const descriptionTranscript = document.querySelector('ytd-video-description-transcript-section-renderer button[aria-label]');
descriptionTranscript ? descriptionTranscript.click() || document.querySelector('[target-id*=transcript]')?.removeAttribute('visibility');
descriptionTranscript ? descriptionTranscript.click() : document.querySelector('[target-id*=transcript]')?.removeAttribute('visibility');
} else {
const transcriptButton = document.querySelector('ytd-video-description-transcript-section-renderer button[aria-label]');
visibilityButton ? visibilityButton.click() || document.querySelector('[target-id*=transcript] #visibility-button button')?.click();
visibilityButton ? visibilityButton.click() : document.querySelector('[target-id*=transcript] #visibility-button button')?.click();
}
if (!descriptionTranscript && transcriptButton) {
console.error('shortcutTranscript: Cant fint proper Enble button, falling back to unreliable bruteforce method');
Expand Down

0 comments on commit e369e60

Please sign in to comment.