Merge pull request #1237 from AlecRust/refine-popup

Improve popup alert and fix Firefox issues
This commit is contained in:
Ajay Ramachandran
2022-04-22 15:26:30 -04:00
committed by GitHub
3 changed files with 59 additions and 41 deletions

View File

@@ -306,7 +306,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
//if request is undefined, then the page currently being browsed is not YouTube
if (request != undefined) {
//remove loading text
PageElements.mainControls.style.display = "flex";
PageElements.mainControls.style.display = "block";
if (request.onMobileYouTube) PageElements.mainControls.classList.add("hidden");
PageElements.whitelistButton.classList.remove("hidden");
PageElements.loadingIndicator.style.display = "none";
@@ -693,6 +693,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
PageElements.unwhitelistChannel.style.display = "unset";
document.querySelectorAll('.SBWhitelistIcon')[0].classList.add("rotated");
//show 'consider force channel check' alert
if (!Config.config.forceChannelCheck) PageElements.whitelistForceCheck.classList.remove("hidden");
//save this
@@ -740,6 +741,9 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
PageElements.unwhitelistChannel.style.display = "none";
document.querySelectorAll('.SBWhitelistIcon')[0].classList.remove("rotated");
//hide 'consider force channel check' alert
PageElements.whitelistForceCheck.classList.add("hidden");
//save this
Config.config.whitelistedChannels = whitelistedChannels;