Mozilla 도움말 검색

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

자세히 살펴보기

css code to move paste & go to top of context menu please

  • 7 답장
  • 1 이 문제를 만남
  • 4 보기
  • 최종 답변자: BobFisk

more options

Hello,

Would anyone know if it's possible to use .css code to move paste & go to the top of the address bar context menu please?

Thank you.

Hello, Would anyone know if it's possible to use .css code to move ''paste & go'' to the top of the address bar context menu please? Thank you.

선택된 해결법

Hello,

To move Paste & Go to the top, you must change the order of every item.


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

.urlbar-textbox-container menuitem[cmd="cmd_undo"] {
  -moz-box-ordinal-group: 3 !important }

.urlbar-textbox-container menuseparator:nth-of-type(1) {
  -moz-box-ordinal-group: 2 !important }

.urlbar-textbox-container menuitem[cmd="cmd_cut"] {
  -moz-box-ordinal-group: 4 !important }

.urlbar-textbox-container menuitem[cmd="cmd_copy"] {
  -moz-box-ordinal-group: 5 !important }

.urlbar-textbox-container menuitem[cmd="cmd_paste"] {
  -moz-box-ordinal-group: 6 !important }

.urlbar-textbox-container menuitem[anonid="paste-and-go"] {
  -moz-box-ordinal-group: 1 !important }

.urlbar-textbox-container menuitem[cmd="cmd_delete"] {
  -moz-box-ordinal-group: 7 !important }

.urlbar-textbox-container menuseparator:nth-of-type(2) {
  -moz-box-ordinal-group: 8 !important }

.urlbar-textbox-container menuitem[cmd="cmd_selectAll"] {
  -moz-box-ordinal-group: 9 !important }
문맥에 따라 이 답변을 읽어주세요 👍 0

모든 댓글 (7)

more options

I'm not sure CSS can do that. But you could try this add-on and see whether that lets you do what you need: Menu Editor :: Add-ons for Firefox.

more options

Hi jscher2000,

Thank you for your help.

I was hoping to avoid using any third-party addons. I've aleady come across userChrome.css code to customise the Context Menu and the Tab Context Menu, but am having trouble tracking down code to change the Address Bar Context Menu.

Thanks again.

more options

선택된 해결법

Hello,

To move Paste & Go to the top, you must change the order of every item.


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

.urlbar-textbox-container menuitem[cmd="cmd_undo"] {
  -moz-box-ordinal-group: 3 !important }

.urlbar-textbox-container menuseparator:nth-of-type(1) {
  -moz-box-ordinal-group: 2 !important }

.urlbar-textbox-container menuitem[cmd="cmd_cut"] {
  -moz-box-ordinal-group: 4 !important }

.urlbar-textbox-container menuitem[cmd="cmd_copy"] {
  -moz-box-ordinal-group: 5 !important }

.urlbar-textbox-container menuitem[cmd="cmd_paste"] {
  -moz-box-ordinal-group: 6 !important }

.urlbar-textbox-container menuitem[anonid="paste-and-go"] {
  -moz-box-ordinal-group: 1 !important }

.urlbar-textbox-container menuitem[cmd="cmd_delete"] {
  -moz-box-ordinal-group: 7 !important }

.urlbar-textbox-container menuseparator:nth-of-type(2) {
  -moz-box-ordinal-group: 8 !important }

.urlbar-textbox-container menuitem[cmd="cmd_selectAll"] {
  -moz-box-ordinal-group: 9 !important }
more options

Thanks Gingerbread_Man! I've been looking for this very thing myself but thought it should be included by default in Firefox.

I wanted the browser to automatically move Paste and/or Paste & Go to the top of the context menu, depending on what element you click on & only when data was detected in the clipboard. As 9 out of 10 times, if you're right clicking in the url bar (search box, form field, text area, etc) and have something copied, you're gonna want to paste it. Similar to how when you select text, the first choice is Copy followed by Select All.

I'll get around to filing a bug for the feature enhancement and see if I can get it to include pasting in the search engine box (Paste & Search) and text areas/text fields (Paste).

Gingerbread_Man, I'm guessing your code moves Paste & Go to the top of the context menu permanently. Is there a way to move it to the top of the menu only when it's active and not move it to the top when it's greyed out?

But on second thought, it doesn't bother me much if Undo is sitting underneath it sometimes. Guess I'm just curious if it can be done thru userchrome. Thanks.

more options

Noah_SUMO wrote:

Thanks Gingerbread_Man!

You're welcome.

Noah_SUMO wrote:

Is there a way to move it to the top of the menu only when it's active and not move it to the top when it's greyed out?

Here you go. I changed the separator back to its original order, because otherwise when Paste & Go is not available, the first menu item would be that separator.


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

.urlbar-textbox-container menuitem[cmd="cmd_undo"] {
  -moz-box-ordinal-group: 2 !important }

.urlbar-textbox-container menuseparator:nth-of-type(1) {
  -moz-box-ordinal-group: 3 !important }

.urlbar-textbox-container menuitem[cmd="cmd_cut"] {
  -moz-box-ordinal-group: 4 !important }

.urlbar-textbox-container menuitem[cmd="cmd_copy"] {
  -moz-box-ordinal-group: 5 !important }

.urlbar-textbox-container menuitem[cmd="cmd_paste"] {
  -moz-box-ordinal-group: 6 !important }

.urlbar-textbox-container menuitem[anonid="paste-and-go"] {
  -moz-box-ordinal-group: 1 !important }

.urlbar-textbox-container menuitem[cmd="cmd_delete"] {
  -moz-box-ordinal-group: 7 !important }

.urlbar-textbox-container menuseparator:nth-of-type(2) {
  -moz-box-ordinal-group: 8 !important }

.urlbar-textbox-container menuitem[cmd="cmd_selectAll"] {
  -moz-box-ordinal-group: 9 !important }

.urlbar-textbox-container menuitem[cmd="cmd_paste"][disabled="true"] {
  -moz-box-ordinal-group: 5 !important }

.urlbar-textbox-container menuitem[anonid="paste-and-go"][disabled="true"] {
  -moz-box-ordinal-group: 6 !important }
more options
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */

.urlbar-textbox-container menuitem[anonid="paste-and-go"] { -moz-box-ordinal-group: 0 !important; }

The customization files userChrome.css (interface) and userContent.css (websites) are located in the chrome folder in the user profile folder.

more options

Thank you very much for your help, Gingerbread_Man. I really appreciate it :) .

Thank you very much also to cor-el. You're code works too.

Best regards to you both.