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

Possible to change firefox about:config variables through GM? #2465

Closed
ganego opened this issue Dec 21, 2016 · 4 comments
Closed

Possible to change firefox about:config variables through GM? #2465

ganego opened this issue Dec 21, 2016 · 4 comments

Comments

@ganego
Copy link

ganego commented Dec 21, 2016

Since GM does not offer GM_download, I have to use https://gist.github.com/ccloli/832a8350b822f3ff5094 (GM_download_polyfill.js) or https://github.com/eligrey/FileSaver.js/ . Now the problem with that is, that Firefox will show a "save as" prompt because in the FF options it is set that FF should ask for each download (what I normally want).

Tampermonkey offers the nice feature that this "save as" prompt will not be shown and the file directly saved without any questions asked - exactly what I want for my user script.

Since I could not find out how TM does this, I had the idea to set the FF about:config variable "browser.download.useDownloadDir" (this tells FF to download to the folder and don't ask) to true, initiate the download and set it to false again.

Is that possible?

@an-electric-sheep
Copy link

That would be very unsafe, especially if it's just for the purpose of downloading a file. There are many dangerous options in about:config.

@ganego
Copy link
Author

ganego commented Feb 12, 2017

Well I agree, just adding GM_download() like tampermonkey would be nice and the easy way to solve the problem.

@arantius
Copy link
Collaborator

#1877 exists

Arbitrary preference changing will not be added to Greasemonkey.

@CennoxX
Copy link

CennoxX commented Jul 23, 2019

Since I could not find out how TM does this, I had the idea to set the FF about:config variable "browser.download.useDownloadDir" (this tells FF to download to the folder and don't ask) to true, initiate the download and set it to false again.

Is that possible?

@ganego: No, it is not possible. The about:config variables of Firefox can indeed be changed in a file (Prefs.js file), but those changes are only applied if Firefox isn't running. Otherwise the changes are ignored and resetted after a restart of Firefox.

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

4 participants