forked from reisxd/revanced-builder
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request reisxd#538 from git-Hmmm/main
Introducing Automatically proceed to next page and a Settings page!
- Loading branch information
Showing
17 changed files
with
207 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,2 @@ | ||
const accentColors = document.querySelectorAll('.theming span'); | ||
|
||
const colorNow = localStorage.getItem('theme') ?? '#4873b3'; | ||
document.documentElement.style.setProperty('--accentColor', colorNow); | ||
|
||
/* eslint-disable no-unused-vars */ | ||
function openColorPicker() { | ||
document.querySelector('.theming').classList.toggle('show'); | ||
} | ||
|
||
accentColors.forEach((color) => { | ||
color.addEventListener('click', () => { | ||
accentColors.forEach((el) => el.classList.remove('active')); | ||
color.classList.add('active'); | ||
|
||
const colorNow1 = color.style.getPropertyValue('background-color'); | ||
|
||
document.documentElement.style.setProperty('--accentColor', colorNow1); | ||
localStorage.setItem('theme', colorNow1); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const accentColors = document.querySelectorAll('#themecolor-picker span'); | ||
const enbtn = document.querySelector('#enable'); | ||
const dbbtn = document.querySelector('#disable'); | ||
|
||
accentColors.forEach((color) => { | ||
color.addEventListener('click', () => { | ||
accentColors.forEach((el) => el.classList.remove('active')); | ||
color.classList.add('active'); | ||
|
||
const colorNow1 = color.style.getPropertyValue('background-color'); | ||
|
||
document.documentElement.style.setProperty('--accentColor', colorNow1); | ||
localStorage.setItem('theme', colorNow1); | ||
}); | ||
}); | ||
|
||
if (localStorage.getItem('auto-next')) { | ||
enbtn.style.display = 'none'; | ||
} else { | ||
dbbtn.style.display = 'none'; | ||
} | ||
enbtn.addEventListener('click', function () { | ||
enbtn.style.display = 'none'; | ||
dbbtn.style.display = 'block'; | ||
localStorage.setItem('auto-next', true); | ||
}); | ||
dbbtn.addEventListener('click', function () { | ||
dbbtn.style.display = 'none'; | ||
enbtn.style.display = 'block'; | ||
localStorage.removeItem('auto-next'); | ||
}); |
Oops, something went wrong.