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

Make extension fire-and-forget #24

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions manifest_v2/js/autoplay+loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ let YTNonstop = function YTNonstop(options) {
}
//if video ended ---> skip to next video
const AutoPlay = () => {
if(Nonstop.getIsAutoSkip() == true && get_YT.player().getPlayerState() === 0) {
if(Nonstop.getIsAutoSkip() == false && get_YT.player().getPlayerState() === 0) {
get_YT.player().setAutonav(true);

const Index = get_YT.player().getPlaylistIndex();
Expand Down Expand Up @@ -176,11 +176,11 @@ 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 && off) {
if (Nonstop.getIsAutoSkip() == false && off) {
off.click();
log('Autoplay has been enabled');
} else
if (Nonstop.getIsAutoSkip() == false && on) {
if (Nonstop.getIsAutoSkip() == true && on) {
on.click();
log('Autoplay has been disabled');
} else {
Expand Down
10 changes: 5 additions & 5 deletions manifest_v2/popup1.3.2.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
font-size: 10px;
font-family: "Estrangelo Edessa";
text-transform: uppercase;
background: #17DA0C;
background: #F54043;
border-radius: inherit;
box-shadow: inset 0 0px 2.5px rgba(0, 0, 0, 10.00), inset 0 0 4px rgba(0, 0, 0, 100.00), 0px 0px 5px rgba(0, 0, 225, 1);
box-sizing:content-box;
Expand Down Expand Up @@ -126,7 +126,7 @@
opacity: 0;
}
.switch-input:checked ~ .switch-label {
background: #F54043;
background: #17DA0C;
box-shadow: inset 0 0px 2.5px rgba(0, 0, 0, 10.00), inset 0 0 4px rgba(0, 0, 0, 100.00), 0px 0px 5px rgba(0, 0, 225, 1);
}
.switch-input:checked ~ .switch-label:before {
Expand Down Expand Up @@ -155,11 +155,11 @@
height: 12px;
border-radius: 6px;
box-shadow: inset 0 0px 0px 0.7px rgba(100, 50, 0, 1.0), 0px 0px 8.5px rgba(75, 75, 75, 1.0);
background-image: url("/images/autoplay_off.svg");
background-image: url("/images/autoplay_on.svg");
/* background-image: -webkit-linear-gradient(left, #17DA0C, #D6B83D, #F54043); */
}
.switch-input:checked ~ .switch-handle:before {
background-image: url("/images/autoplay_on.svg");
background-image: url("/images/autoplay_off.svg");
}
.switch-input:checked ~ .switch-handle {
left: calc(100% - 31.8px);
Expand Down Expand Up @@ -254,7 +254,7 @@ <h1>Youtube Autoconfirm<br> is active.</h1>
<settings>
<label class="switch" title="Turn Autoplay on/off">
<input id="disableAutoplayCheckbox" class="switch-input" type="checkbox" value="1" checked name="disableAutoplayCheckbox">
<span class="switch-label" data-on="Off" data-off="On"></span>
<span class="switch-label" data-on="On" data-off="Off"></span>
<span class="switch-handle"></span>
<label for="disableAutoplayCheckbox"></label>
</settings>
Expand Down
6 changes: 3 additions & 3 deletions manifest_v3/js/autoplay+loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ let YTNonstop = function YTNonstop(options) {

//if video ended ---> skip to next video
const AutoPlay = () => {
if(Nonstop.getIsAutoSkip() == true && get_YT.player().getPlayerState() === 0) {
if(Nonstop.getIsAutoSkip() == false && get_YT.player().getPlayerState() === 0) {
get_YT.player().setAutonav(true);

const Index = get_YT.player().getPlaylistIndex();
Expand Down Expand Up @@ -187,11 +187,11 @@ 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 && off) {
if (Nonstop.getIsAutoSkip() == false && off) {
off.click();
log('Autoplay has been enabled');
} else
if (Nonstop.getIsAutoSkip() == false && on) {
if (Nonstop.getIsAutoSkip() == true && on) {
on.click();
log('Autoplay has been disabled');
} else {
Expand Down
10 changes: 5 additions & 5 deletions manifest_v3/popup1.3.2.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
font-size: 10px;
font-family: "Estrangelo Edessa";
text-transform: uppercase;
background: #17DA0C;
background: #F54043;
border-radius: inherit;
box-shadow: inset 0 0px 2.5px rgba(0, 0, 0, 10.00), inset 0 0 4px rgba(0, 0, 0, 100.00), 0px 0px 5px rgba(0, 0, 225, 1);
box-sizing:content-box;
Expand Down Expand Up @@ -126,7 +126,7 @@
opacity: 0;
}
.switch-input:checked ~ .switch-label {
background: #F54043;
background: #17DA0C;
box-shadow: inset 0 0px 2.5px rgba(0, 0, 0, 10.00), inset 0 0 4px rgba(0, 0, 0, 100.00), 0px 0px 5px rgba(0, 0, 225, 1);
}
.switch-input:checked ~ .switch-label:before {
Expand Down Expand Up @@ -155,11 +155,11 @@
height: 12px;
border-radius: 6px;
box-shadow: inset 0 0px 0px 0.7px rgba(100, 50, 0, 1.0), 0px 0px 8.5px rgba(75, 75, 75, 1.0);
background-image: url("/images/autoplay_off.svg");
background-image: url("/images/autoplay_on.svg");
/* background-image: -webkit-linear-gradient(left, #17DA0C, #D6B83D, #F54043); */
}
.switch-input:checked ~ .switch-handle:before {
background-image: url("/images/autoplay_on.svg");
background-image: url("/images/autoplay_off.svg");
}
.switch-input:checked ~ .switch-handle {
left: calc(100% - 31.8px);
Expand Down Expand Up @@ -254,7 +254,7 @@ <h1>Youtube Autoconfirm<br> is active.</h1>
<settings>
<label class="switch" title="Turn Autoplay on/off">
<input id="disableAutoplayCheckbox" class="switch-input" type="checkbox" value="1" checked name="disableAutoplayCheckbox">
<span class="switch-label" data-on="Off" data-off="On"></span>
<span class="switch-label" data-on="On" data-off="Off"></span>
<span class="switch-handle"></span>
<label for="disableAutoplayCheckbox"></label>
</settings>
Expand Down
Loading