Skip to content

Commit

Permalink
Fixed error
Browse files Browse the repository at this point in the history
Otherwise the script want to click on a non-existing button
  • Loading branch information
JohnyP36 authored Sep 15, 2022
1 parent a79dffa commit 3cca257
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions manifest_v3/js/autoplay+loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,13 @@ let YTNonstop = function YTNonstop(options) {
const off = document.querySelector('.ytp-autonav-toggle-button-container > .ytp-autonav-toggle-button[aria-checked="false"]')
|| document.querySelector('#automix[role="button"][aria-pressed="false"]')

if (Nonstop.getIsAutoSkip() == true) {
if (Nonstop.getIsAutoSkip() == true && off) {
off.click();
} else {
} else
if (Nonstop.getIsAutoSkip() == false && on) {
on.click();
} else {
return;
}
},

Expand Down

0 comments on commit 3cca257

Please sign in to comment.