Coder Social home page Coder Social logo

infocatcher / download_panel_tweaker Goto Github PK

View Code? Open in Web Editor NEW
9.0 8.0 2.0 1.05 MB

Some tweaks for built-in download panel, restartless extension for Firefox

Home Page: https://addons.mozilla.org/addon/download-panel-tweaker/

License: Other

CSS 5.36% JavaScript 91.88% Shell 0.66% Batchfile 2.10%

download_panel_tweaker's Introduction

Styles

Example styles for userChrome.css/Stylish:

API

You can use DownloadPanelTweaker:OpenDownloadWindow (“open old window”), DownloadPanelTweaker:ToggleDownloadSidebar (“toggle sidebar”) and DownloadPanelTweaker:OpenDownloadTab (“open in tab”) events to override commands, example:

window.addEventListener("DownloadPanelTweaker:OpenDownloadWindow", function(e) {
	e.preventDefault();
	// Put here some code to open alternative download window
}, false);

Internals

Compact downloads list style: https://github.com/Infocatcher/UserStyles/tree/master/Compact_downloads
Visible downloads count limit: https://gist.github.com/Infocatcher/5387328
Show download rate: https://gist.github.com/Infocatcher/5787749
Don't remove finished downloads: https://gist.github.com/Infocatcher/6452231

Additional tweaks can be done using following style (but [downloadPanelTweaker_paused] doesn't work without extension):

/* Download Panel Tweaker */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@-moz-document url("chrome://browser/content/browser.xul"),
	url("chrome://browser/content/places/places.xul"),
	url("about:downloads"),
	url("chrome://browser/content/downloads/contentAreaDownloadsView.xul") {
	#downloadsListBox { /* Firefox < 20 or NASA Night Launch theme */
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
	}
	.downloadContainer,
	.download-state > vbox /* Firefox < 20 */ {
		width: 58ch !important;
		min-width: 0 !important;
	}
	#downloadsSummaryDescription,
	#downloadsSummaryDetails {
		width: 58ch !important;
		min-width: 0 !important;
	}
	.downloadTarget {
		min-width: 5ch !important;
	}
	.downloadProgress {
		min-width: 20px !important;
		min-height: 10px !important;
		height: 10px !important;
	}
	.downloadProgress > .progress-bar {
		height: auto !important;
		min-height: 2px !important;
		max-height: 10px !important;
	}
	/* Paused downloads */
	.download-state[state="4"] .downloadProgress,
	#downloadsSummary[downloadPanelTweaker_paused] .downloadProgress {
		/* Firefox 35 and older */
		filter: url("chrome://mozapps/skin/extensions/extensions.svg#greyscale");
		/* Firefox 36+ */
		filter: grayscale(1);
	}
	.download-state[state="4"] .downloadProgress > .progress-bar,
	.download-state[state="4"] .downloadProgress > .progress-remainder,
	#downloadsSummary[downloadPanelTweaker_paused] .downloadProgress > .progress-bar,
	#downloadsSummary[downloadPanelTweaker_paused] .downloadProgress > .progress-remainder {
		opacity: 0.85;
	}
}

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.