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

ucjsDownloadsManager.uc.js breaks in Firefox 120 #79

Open
LummoxJR opened this issue Nov 2, 2023 · 0 comments
Open

ucjsDownloadsManager.uc.js breaks in Firefox 120 #79

LummoxJR opened this issue Nov 2, 2023 · 0 comments

Comments

@LummoxJR
Copy link

LummoxJR commented Nov 2, 2023

The downloads manager window has been changed in Firefox 120, which alters the structure of the document and therefore breaks the old code that searches for the CSS to remove. This code is found in ucjs_downloadManagerMain.init():

			// xxx remove in-content css
-			var elements = document.childNodes;
-			for (var i = 0; i < elements.length; i++) {
-				var element = elements[i];
-				if (element.nodeValue && element.nodeValue.indexOf("chrome://browser/skin/downloads/contentAreaDownloadsView.css") > -1) {
-					document.removeChild(element);
-					break;
-				}
-			}
+			let element = document.querySelector('link[href$="skin/downloads/contentAreaDownloadsView.css"]');
+			if(element) element.parentNode.removeChild(element);

That change to querySelector() fixed the issue for me.

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

No branches or pull requests

1 participant