Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

Disable Delete Option In Downloads Panel

  • 5 trả lời
  • 1 gặp vấn đề này
  • 15 lượt xem
  • Trả lời mới nhất được viết bởi ja13717

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
Đính kèm ảnh chụp màn hình

Giải pháp được chọn

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

Đọc câu trả lời này trong ngữ cảnh 👍 0

Tất cả các câu trả lời (5)

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

Hữu ích?

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.

Hữu ích?

more options

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

.downloadDeleteFileMenuItem { display: none !important; }

Hữu ích?

more options

Giải pháp được chọn

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

Hữu ích?

more options

That worked and thanks again.

Hữu ích?

Đặt một câu hỏi

Bạn phải đăng nhập vào tài khoản của bạn để trả lời bài viết. Vui lòng bắt đầu một câu hỏi mới, nếu bạn chưa có tài khoản.