본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

HIDING / REMOVAL OF CONTEXT MENU ICONS

  • 8 답장
  • 1 이 문제를 만남
  • 2 보기
  • 최종 답변자: deanone

more options

I generally block icons from showing inside Firefox context menus. In most cases my practice would be to simply block .menu-iconic-left via userChrome. With the latest versions of Firefox this also blocks the display of the #contentAreaContextMenu navigation icons. This would normally not be an issue as I would apply the blocking of icons to individual context menu items instead i.e.

  1. CONTEXT-MENU-ITEM > .menu-iconic-left {
  display: none !important;

} However, there are some context menu items added by extensions which have a number suffix in their element name - An example would be #CONTEXT-MENU-ITEM-### where '###' represents a number that changes with each page opened. In this instance, my efforts to block the .menu-iconic-left element are thwarted as the element name is effectively different when the above-mentioned number changes.

Is there a CSS means of applying the code with the inclusion of a number range? Unless of course I'm barking up the wrong tree and there is a much simpler solution.

I generally block icons from showing inside Firefox context menus. In most cases my practice would be to simply block .menu-iconic-left via userChrome. With the latest versions of Firefox this also blocks the display of the #contentAreaContextMenu navigation icons. This would normally not be an issue as I would apply the blocking of icons to individual context menu items instead i.e. #CONTEXT-MENU-ITEM > .menu-iconic-left { display: none !important; } However, there are some context menu items added by extensions which have a number suffix in their element name - An example would be #CONTEXT-MENU-ITEM-### where '###' represents a number that changes with each page opened. In this instance, my efforts to block the .menu-iconic-left element are thwarted as the element name is effectively different when the above-mentioned number changes. Is there a CSS means of applying the code with the inclusion of a number range? Unless of course I'm barking up the wrong tree and there is a much simpler solution.

선택된 해결법

Not ideal but solves the issue...and thanks again to both of you for looking at this.

/* REMOVAL OF EXTENSION CONTEXT MENU ICONS */

menuitem[image*="moz-extension://"] .menu-iconic-left,
menu[image*="moz-extension://"] .menu-iconic-left {
 display: none !important;

}

/* SET PADDING-LEFT AS THE SAME VALUE ACROSS ALL RELEVANT MENUS INCLUDING TEXT-AREA CONTEXT MENUS */

menu, menuitem {
 padding-left: 13px !important;

}

/* FIX FOR CONTEXT NAVIGATION ITEMS */

#context-back, #context-forward, #context-reload, #context-bookmarkpage {
 padding-left: 0px !important;

}

문맥에 따라 이 답변을 읽어주세요 👍 0

모든 댓글 (8)

more options

Try this -- it takes advantage of a partial (wildcard) attribute value match on the menu item to identify extensions:

/* Hide Extension Buttons on Context Menus */
menuitem[image*="moz-extension://"] .menu-iconic-left,
menu[image*="moz-extension://"] .menu-iconic-left {
  display: none;
}


https://developer.mozilla.org/docs/Web/CSS/Attribute_selectors

more options

Yes that did the trick! Thank you for the prompt reply...

It's worth a mention that Firefox context menu items now have reduced padding-left with the exception of in-page search field context menus (menu items are still centered). When either your solution or my original approach are applied it leaves this particular menu with extension menu items where expected (left-sided) but the other items remain centered. If the padding-left value is set the same across all menus to defeat this, the #context-navigation element is thrown out of whack.

more options

> with the exception of in-page search field context menus (menu items are still centered).

Hmm, I see that extra left padding on the context menu for this textarea. There's a checkmark for Check Spelling, so maybe that's why the space is there for certain menus. Firefox must have some way that it distinguishes between these menus, but... my time's up for poking at it.

Have you been using the Browser Toolbox for your exploration? There's a preference to force menus to stick open until you press Esc, which is necessary to use "click to inspect" with them.

more options

Maybe this code that hides the icons works better as display:none move the label text to the left end.


@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */

#contentAreaContextMenu :is(menuitem[image*="moz-extension://"],menu[image*="moz-extension://"]) .menu-iconic-left { visibility: hidden !important; }
more options

Yes I actively use the Browser Toolbox including the preference you refer to. I'll have another look at it and post back when I have a solution.

more options

I posted some other code you can try a few seconds before your last post.

more options

@cor-el Yes I had previously considered this and thank you, however, although it leaves the in-page search field context menu items centered, in the remaining #contentAreaContextMenu menus leave the extension items centered and not to the left as the icon is only 'hidden'.

My thoughts would be to address the in-page search field context menu itself. Will post back once I've had a look at it.

more options

선택된 해결법

Not ideal but solves the issue...and thanks again to both of you for looking at this.

/* REMOVAL OF EXTENSION CONTEXT MENU ICONS */

menuitem[image*="moz-extension://"] .menu-iconic-left,
menu[image*="moz-extension://"] .menu-iconic-left {
 display: none !important;

}

/* SET PADDING-LEFT AS THE SAME VALUE ACROSS ALL RELEVANT MENUS INCLUDING TEXT-AREA CONTEXT MENUS */

menu, menuitem {
 padding-left: 13px !important;

}

/* FIX FOR CONTEXT NAVIGATION ITEMS */

#context-back, #context-forward, #context-reload, #context-bookmarkpage {
 padding-left: 0px !important;

}

글쓴이 deanone 수정일시