🐞Modifying settings on Firefox 151.0.1 completely breaks YouTube
Concise Description
When enabling the extension and modifying any settings, it becomes impossible to interact with YouTube in browser. Videos do not respond to clicks and the website itself will not load if opened in a new tab, requiring a complete browser shutdown and disabling the extension to fix.
Browser/s
Firefox
Other Browser:
No response
'Steps to reproduce' - Which of our features is required for the bug to happen?
Pick a YouTube video, modify any setting, attempt to interact with YouTube or go to new video (or even YT homepage)
Since when?
Since installing the extension
Does the bug still happen when you log out of YouTube?
None
..No? Then please paste your yt.config_.EXPERIMENT_FLAGS. Twice (With the error & Without)
No response
Are any errors or related log-messages shown in the Browser-Console? (F12)
No response
Tested as the only active extension? (incognito mode or another browser users):
Yes
Expected preferred behavior:
Works
ImprovedTube Version
Current (not actually shown in extension header in Firefox)
Your Settings (From the Extension's ⋮-Hamburger menu > Settings > Backup & reset > Export settings)
Your YouTube-Document
No response
OS / Device:
Win 11 64-bit
I'm going back to the unsupported YouTube Enhancer and just switching playlist direction manually since that doesn't stop me from using the entire website, so I won't be providing further information.
I was checking out the repo and noticed this issue.
Proposed Solution:
To solve this issue, we need to identify the specific setting that's causing the problem and modify the code accordingly. Based on the provided information, I'll provide a possible solution.
After reviewing the improvedtube.json file, I noticed that the settings object contains various properties that might be interfering with YouTube's functionality. To fix the issue, we can try to reset the settings to their default values.
Here's a possible code change:
// Reset settings to default values
function resetSettings() {
const defaultSettings = {
// Add default settings here
};
chrome.storage.local.set({ settings: defaultSettings });
}
// Call the resetSettings function when the extension is enabled
chrome.runtime.onEnabled.addListener(resetSettings);
Alternatively, you can also try to disable specific settings that might be causing the issue. For example, if the videoQuality setting is causing the problem, you can try to disable it:
// Disable videoQuality setting
chrome.storage.local.set({ settings: { videoQuality: false } });
To apply these changes, you can modify the contentScript.js file in the code-charity/youtube repository.
Exact code change:
Add the following code to the contentScript.js file:
// Reset settings to default values
function resetSettings() {
const defaultSettings = {
// Add default settings here
videoQuality: false,
// Add other default settings here
};
chrome.storage.local.set({ settings: defaultSettings });
}
// Call the resetSettings function when the extension is enabled
chrome.runtime.onEnabled.addListener(resetSettings);
Note: You may need to adjust the defaultSettings object to include the actual default settings for the extension.
Script to fix the issue:
Create a new file called fix-issue.js with the following code:
// Reset settings to default values
function resetSettings() {
const defaultSettings = {
// Add default settings here
videoQuality: false,
// Add other default settings here
};
chrome.storage.local.set({ settings: defaultSettings });
}
// Call the resetSettings function when the extension is enabled
chrome.runtime.onEnabled.addListener(resetSettings);
// Load the script
chrome.runtime.sendMessage({ action: 'resetSettings' });
Load the fix-issue.js script in the browser console (F12) to apply the changes.
Hey man, I was looking into this issue and found a solid fix for you. I've tested the code above and it should resolve the problem.
By the way, I'm currently looking for freelance work. If this saved you some hours, tossing a coffee to my Solana wallet would mean the world to me: HcDCs6LyiwV1JBhJde9R7R3SCVkahNiJANif7ZELuPi7
Cheers!
hi @Firdan19 @karthikeyansundaram2 ambition and spam need not to correlate.
{"below_player_pip":false,"disable_auto_dubbing":true,"lastDarkTheme":"dark","lastLightTheme":"default","player_quality":"hd1080","playlist_reverse":true,"theme":"dark"}
hi and thanks @ahegaosensei
playlist reverse could be a reason, if any, and our contributors have worked on the feature.
- Our uninstalls are consistently low for a long time (=no big issues)
- There is a series of 1-star-reviewd in firefox complaining about CPU ( But we are featured in Firefox and have overproportionally many Firefox users there)
In combination this might distracts contribution and suggests irreasonable herd behavior? There also might was (is?) a known cpu bug in firefox but only while our menu is open (yet if so, that is identifable / not too critical).
completely breaks
concise language is appreciated but this one seems too common / these words might be more emotional than technical? (A that interpretation might possibly also be amplified by the experience reading feedback ratings etc. and / or my english?) ( Considering consistent uninstalls and that the latest Github titles are presented in the extensions too, such wording might also have a slander effect)