![Firefox logo](https://assets-prod.sumo.prod.webservices.mozgcp.net/media/uploads/products/2020-04-14-08-36-13-8dda6f.png)
Disable Delete Option In Downloads Panel
I recently had to restore my computer. Doing that I have to get the new firefox which I now have version 102. Updates disabled instantly. I was on version 88. On version 88 this feature was not on it and version 102 now has this feature and I do not like it.
The feature I am talking about is if you open the downloads panel and view the downloads list and right click on one of the downloaded files in list there is now an option to Delete. I accidentlly hit this and thought it was just deleting it from downloads panel. Nope it deletes it from computer permanently, not even to recycle bin. Click Delete its gone for good until download it again.
And this delete option is right above the option remove from history, which I use a lot.
So I want to know how to disable this delete option? Thanks
Seçilen çözüm
Only this line need to be in userChrome.css like I posted above.
.downloadDeleteFileMenuItem { display: none !important; }
The other code I posted was just to illustrate what code this is about and show the CSS selector in case you want to hide more. A leading dot like in .downloadDeleteFileMenuItem means that the selector is a class name like you see in class="downloadDeleteFileMenuItem".
Bu yanıtı konu içinde okuyun 👍 0Tüm Yanıtlar (6)
That would be this menu item:
<menuitem command="downloadsCmd_deleteFile" class="downloadDeleteFileMenuItem" data-l10n-id="downloads-cmd-delete-file"/>
Add CSS code to the userChrome.css file.
.downloadDeleteFileMenuItem { display: none !important; }
It is not that difficult to create userChrome.css if you have never used it.
The first step is to open the "Help -> Troubleshooting Information" page and find the button to access the profile folder with the random name (xxxxxxxx.default-release).
You can find the button to go to the profile folder under the "Application Basics" section as "Profile Folder -> Open Folder". If you click this button then you open the profile folder in the Windows File Explorer. You need to create a folder with the name chrome in the profile folder with the random name (name is all lowercase). In the chrome folder you need to create a plain text file with the name userChrome.css (name is case sensitive). In this userChrome.css text file you paste the text posted. On Mac you can use the TextEdit utility to create the userChrome.css file as a plain text file.
In Windows saving the file is usually the only time things get more complicated because Windows can silently add a .txt file extension and you end up with a file named userChrome.css.txt. To avoid this you need to make sure to select "All files" in the dialog to save the file in the text editor using "Save File as".
You need to close (Quit/Exit) and restart Firefox when you create or modify the userChrome.css file.
In Firefox 69 and later you need to set this pref to true on the about:config page to enable userChrome.css and userContent.css in the chrome folder.
- about:config => toolkit.legacyUserProfileCustomizations.stylesheets = true
- https://support.mozilla.org/en-US/kb/about-config-editor-firefox
More info about userContent.css and userChrome.css in case you are not familiar: *https://www.userchrome.org/what-is-userchrome-css.html
Thanks for the reply and help. I still must be missing something as it is not removing the Delete option for me. I created the userChrome.css in a folder named chrome under my profiles folder in file explorer and yes it is .css and not .txt saved as. I tried several different ways the coding you provided and restarted firefox each time I tried it a different way and still not removing the Delete option. Also in the about:config I set the toolkit.legacyUserProfileCustomizations.stylesheets to true as you stated also. I tried the code in the css file as follows:
Notes: the " is at the end of downloadDeleteFileMenuItem
<menuitem command="downloadsCmd_deleteFile"
class="downloadDeleteFileMenuItem" { display: none !important; } data-l10n-id="downloads-cmd-delete-file"/>
Notes: the " is at the end of }
<menuitem command="downloadsCmd_deleteFile"
class="downloadDeleteFileMenuItem { display: none !important; }" data-l10n-id="downloads-cmd-delete-file"/>
Notes: I tried a . in front of downloadDeleteFileMenuItem as I seen in your post
<menuitem command="downloadsCmd_deleteFile"
class=".downloadDeleteFileMenuItem" { display: none !important; } data-l10n-id="downloads-cmd-delete-file"/>
Notes: I tried the coding line below everything as seen below
<menuitem command="downloadsCmd_deleteFile"
class="downloadDeleteFileMenuItem" data-l10n-id="downloads-cmd-delete-file"/>
.downloadDeleteFileMenuItem { display: none !important; }
Again each time I tried changing it I restarted firefox and the Delete option is still there. Thanks again.
I think the only code you need in userChrome.css is below. The other code is for reference.
.downloadDeleteFileMenuItem { display: none !important; }
Seçilen çözüm
Only this line need to be in userChrome.css like I posted above.
.downloadDeleteFileMenuItem { display: none !important; }
The other code I posted was just to illustrate what code this is about and show the CSS selector in case you want to hide more. A leading dot like in .downloadDeleteFileMenuItem means that the selector is a class name like you see in class="downloadDeleteFileMenuItem".
That worked and thanks again.
Thank you!
I have also deleted something by accident - it really does not help that it is so close to the 'remove from history' option and does not ask 'are you sure?' - and came looking for this to stop it happening again.