GithubHelp home page GithubHelp logo

Comments (4)

LummoxJR avatar LummoxJR commented on June 12, 2024

There appear to be further issues with lacking a Clear Downloads button, so I'll keep investigating. The font has gone wonky too. It looks like window.ucjs_downloadManagerMain() is failing with an error, which causes the init not to complete successfully. The download box does open however.

from firefox-scripts.

benzBrake avatar benzBrake commented on June 12, 2024

Where did you download ucjsDownloadsManager.uc.js?4 months ago The XPCOMUtils.defineLazyModuleGetter line was changed to ChromeUtils.defineESModuleGetters。https://github.com/alice0775/userChrome.js/blob/824ae9ae02a91a21ad6e8703f9f8cdf8941bd0a8/117/ucjsDownloadsManager.uc.js#L105C7-L107

from firefox-scripts.

LummoxJR avatar LummoxJR commented on June 12, 2024

Ah, my script might be out of date then. I'll take a look and compare to see what else I need to change.

from firefox-scripts.

LummoxJR avatar LummoxJR commented on June 12, 2024

So I updated to Alice's newest version for 117 and it didn't fix the issue, as of its current build. Looks like I'll need to report a bug there at some point. The remaining error I had was 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);

There are two problems with the old code. The first is that the <= in that loop was wrong all along, but it never triggered because of the fact that the loop was finding the right element before and breaking out before it got beyond the length of the array. The second problem is because this search for the CSS link was brittle, when the structure of the download manager changed in Firefox 120 it no longer found the old CSS link to remove.

from firefox-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.