Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

En savoir plus

Disable Delete Option In Downloads Panel

  • 6 réponses
  • 1 a ce problème
  • 1 vue
  • Dernière réponse par superian

more options

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

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
Captures d’écran jointes

Solution choisie

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".

Lire cette réponse dans son contexte 👍 0

Toutes les réponses (6)

more options

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.

More info about userContent.css and userChrome.css in case you are not familiar: *https://www.userchrome.org/what-is-userchrome-css.html

more options

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.

more options

I think the only code you need in userChrome.css is below. The other code is for reference.

.downloadDeleteFileMenuItem { display: none !important; }
more options

Solution choisie

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".

more options

That worked and thanks again.

more options

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.