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

rakeshdhariwal/issue:#1736 fixed unable to get default setting when forced theater mode is turned off #1738

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

masterghost2002
Copy link
Contributor

@WhiteMasky Hi, I worked over the issue, and fixed it.I am attaching a video URL Working Video Drive Link.
I did changes in js&css/web-accessible/www.youtube.com/appearance.js

Original Code

image

Changes from my side

image

I don't know what cookie to be set when theater mode is off.
Improvement suggesting are welcomed.

@ImprovedTube
Copy link
Member

ImprovedTube commented Aug 15, 2023

hi @masterghost2002! thank you!
idk about the cookie either🤔

we dont need to always check if theater mode is false but only when the user clicked our theater mode-switch.

// FEEDBACK WHEN THE USER CHANGED A SETTING
ImprovedTube.init();
} else if (message.action === 'storage-changed') {
var camelized_key = message.camelizedKey;
ImprovedTube.storage[message.key] = message.value;

else if (camelized_key === 'transcript') {
if (ImprovedTube.storage.transcript === true) {try{document.querySelector('*[target-id*=transcript]').removeAttribute('visibility');}catch{}
} if (ImprovedTube.storage.transcript === false){try{document.querySelector('*[target-id*=transcript] #visibility-button button').click();}catch{}}
}

@masterghost2002
Copy link
Contributor Author

Okay, basically you want to say, when user turn off the theater mode ImprovedTube should initialized the player back to its default settings.
Also, the cookie when theater mode is off is width=0.
It, will be helpful for me if you explain little bit more about the working of 'when_paused' event.

@ImprovedTube
Copy link
Member

ImprovedTube commented Aug 16, 2023

i mean asking if (ImprovedTube.storage.forced_theater_mode=== false) doesnt need to run always but only after a user switches from true (of course it matters little, we just applied this perfectionism mostly yet.)

explain more

Sorry, just an example, check 55735ca

wide=0

should we add it then?

@ImprovedTube ImprovedTube merged commit 7946d1d into code-charity:master Aug 16, 2023
@WhiteMasky
Copy link

@WhiteMasky Hi, I worked over the issue, and fixed it.I am attaching a video URL Working Video Drive Link.

I did changes in js&css/web-accessible/www.youtube.com/appearance.js

Original Code

image

Changes from my side

image

I don't know what cookie to be set when theater mode is off.

Improvement suggesting are welcomed.

Hi,thanks for debugging. I have tried the merged version and it did help.(My first time to create an issue and report a bug so happy to see it solved!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants