X
點擊此處開啟此網站的行動版。

技術支援討論區

autocomplete-richlistitem order no longer works

已張貼

For a few months I have been using a userChrome.css customisation which displayed a URL at the beginning of each drop down autocomplete result for the URL Bar (normally a useless page title is displayed).

Here is the thread where I got the script from (thanks for your help, jscher2000): https://support.mozilla.org/en-US/questions/1256581

Today I upgraded to Firefox 68 and it stopped working. Autocomplete results now display website title first, which is completely unreadable and pointless.

My userChrome.css definitely works, because if I add the following line at the end:

  • { color: red !important; }

then the text becomes red.

Unfortunately changing the order of autocomplete results so that the URL is first, has no effect.


Here is the entire content of my userChrome.css

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

.ac-url-text  { color: black !important; font-size: 12px !important; }
.ac-url-text[selected="true"]  { color: white !important; }
.ac-site-icon { display: none !important; }

/* Site Identity Button, EV: hide label */
#identity-box #identity-icon-labels {display:none !important}
#identity-box:hover #identity-icon-labels {display:-moz-box !important}

/* Squash tab bar to 1px tall and hide the tabs */
#TabsToolbar
{
  height: 1px !important;
  min-height: 1px !important;
  max-height: 1px !important;
} 
#TabsToolbar .tabbrowser-tab
{
  display: none !important;
}

#PopupAutoCompleteRichResult {
  margin-left: -9px !important;
    }

#PopupAutoCompleteRichResult .autocomplete-richlistbox {
  width: auto !important;
  max-width: 78vw !important;
}



/* Oldbar flex layout based on 
     https://userstyles.org/styles/131235/firefox-autocomplete-prioritize-url 
     used with permission, new errors my own */

    .autocomplete-richlistitem[type="favicon"],
    .autocomplete-richlistitem[type="bookmark"],
    .autocomplete-richlistitem[type="switchtab"] {
      display: flex;
    }

    .autocomplete-richlistitem[type="favicon"] .ac-url,
    .autocomplete-richlistitem[type="bookmark"] .ac-url,
    .autocomplete-richlistitem[type="switchtab"] .ac-url {
      order: 1;
      display: block !important; /* Force URL for Switch to Tab */
    }

    .autocomplete-richlistitem[type="favicon"] .ac-separator,
    .autocomplete-richlistitem[type="bookmark"] .ac-separator,
    .autocomplete-richlistitem[type="switchtab"] .ac-separator {
      order: 2;
      -moz-margin-start: 2px;
      -moz-margin-end: 4px;
    }
    .autocomplete-richlistitem:not([actiontype="searchengine"]) .ac-separator {
      visibility: hidden !important;
      -moz-margin-start: 0;
      -moz-margin-end: 0;
    }

    .autocomplete-richlistitem[type="favicon"] .ac-title,
    .autocomplete-richlistitem[type="bookmark"] .ac-title,
    .autocomplete-richlistitem[type="switchtab"] .ac-title {
      order: 3;
    }

    .autocomplete-richlistitem[type="switchtab"] .ac-action,
    .autocomplete-richlistitem .ac-tags {
      order: 4;
    }


  /* Overall Layout of the "Oldbar" style at 65/35 */
    /* Drop-down width */
    #PopupAutoCompleteRichResult {
      max-width: 1000px !important;
    }
    /* Space allocated to URL and title */
    #PopupAutoCompleteRichResult .autocomplete-richlistitem:not([actiontype="searchengine"]) .ac-url-text {
      min-width: calc(0.65 * (1000px - 200px)) !important;
      max-width: calc(0.65 * (1000px - 200px)) !important;
    }
    #PopupAutoCompleteRichResult .autocomplete-richlistitem:not([actiontype="searchengine"]) .ac-title-text {
      min-width: calc(0.35 * (1000px - 200px)) !important;
      max-width: calc(0.35 * (1000px - 200px)) !important;
    }

    .autocomplete-richlistitem .ac-type-icon, 
    .autocomplete-richlistitem .ac-site-icon,
    .autocomplete-richlistitem .ac-tags {
      margin-top: 6px;
    }
    
    /* Font-sizes */
    #PopupAutoCompleteRichResult .autocomplete-richlistitem:not([actiontype="searchengine"]) .ac-url,
    #PopupAutoCompleteRichResult .autocomplete-richlistitem:not([actiontype="searchengine"]) .ac-title,
    #PopupAutoCompleteRichResult .autocomplete-richlistitem:not([actiontype="searchengine"]) .ac-action {
      font-size: 14px !important;
    }
    .autocomplete-richlistitem .ac-url,
    .autocomplete-richlistitem .ac-action {
        margin-top: 4px;
    }



 /* Remove Page Actions Menu */
    #pageActionButton 
    {
      display: none !important;
    }


/* Reduce height of URL Bar drop down */
    #PopupAutoCompleteRichResult .autocomplete-richlistitem
    {
      height: 26px !important;
      min-height: 26px !important;
    }
For a few months I have been using a userChrome.css customisation which displayed a URL at the beginning of each drop down autocomplete result for the URL Bar (normally a useless page title is displayed). Here is the thread where I got the script from (thanks for your help, jscher2000): https://support.mozilla.org/en-US/questions/1256581 Today I upgraded to Firefox 68 and it stopped working. Autocomplete results now display website title first, which is completely unreadable and pointless. My userChrome.css definitely works, because if I add the following line at the end: * { color: red !important; } then the text becomes red. Unfortunately changing the order of autocomplete results so that the URL is first, has no effect. Here is the entire content of my userChrome.css <pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */ .ac-url-text { color: black !important; font-size: 12px !important; } .ac-url-text[selected="true"] { color: white !important; } .ac-site-icon { display: none !important; } /* Site Identity Button, EV: hide label */ #identity-box #identity-icon-labels {display:none !important} #identity-box:hover #identity-icon-labels {display:-moz-box !important} /* Squash tab bar to 1px tall and hide the tabs */ #TabsToolbar { height: 1px !important; min-height: 1px !important; max-height: 1px !important; } #TabsToolbar .tabbrowser-tab { display: none !important; } #PopupAutoCompleteRichResult { margin-left: -9px !important; } #PopupAutoCompleteRichResult .autocomplete-richlistbox { width: auto !important; max-width: 78vw !important; } /* Oldbar flex layout based on https://userstyles.org/styles/131235/firefox-autocomplete-prioritize-url used with permission, new errors my own */ .autocomplete-richlistitem[type="favicon"], .autocomplete-richlistitem[type="bookmark"], .autocomplete-richlistitem[type="switchtab"] { display: flex; } .autocomplete-richlistitem[type="favicon"] .ac-url, .autocomplete-richlistitem[type="bookmark"] .ac-url, .autocomplete-richlistitem[type="switchtab"] .ac-url { order: 1; display: block !important; /* Force URL for Switch to Tab */ } .autocomplete-richlistitem[type="favicon"] .ac-separator, .autocomplete-richlistitem[type="bookmark"] .ac-separator, .autocomplete-richlistitem[type="switchtab"] .ac-separator { order: 2; -moz-margin-start: 2px; -moz-margin-end: 4px; } .autocomplete-richlistitem:not([actiontype="searchengine"]) .ac-separator { visibility: hidden !important; -moz-margin-start: 0; -moz-margin-end: 0; } .autocomplete-richlistitem[type="favicon"] .ac-title, .autocomplete-richlistitem[type="bookmark"] .ac-title, .autocomplete-richlistitem[type="switchtab"] .ac-title { order: 3; } .autocomplete-richlistitem[type="switchtab"] .ac-action, .autocomplete-richlistitem .ac-tags { order: 4; } /* Overall Layout of the "Oldbar" style at 65/35 */ /* Drop-down width */ #PopupAutoCompleteRichResult { max-width: 1000px !important; } /* Space allocated to URL and title */ #PopupAutoCompleteRichResult .autocomplete-richlistitem:not([actiontype="searchengine"]) .ac-url-text { min-width: calc(0.65 * (1000px - 200px)) !important; max-width: calc(0.65 * (1000px - 200px)) !important; } #PopupAutoCompleteRichResult .autocomplete-richlistitem:not([actiontype="searchengine"]) .ac-title-text { min-width: calc(0.35 * (1000px - 200px)) !important; max-width: calc(0.35 * (1000px - 200px)) !important; } .autocomplete-richlistitem .ac-type-icon, .autocomplete-richlistitem .ac-site-icon, .autocomplete-richlistitem .ac-tags { margin-top: 6px; } /* Font-sizes */ #PopupAutoCompleteRichResult .autocomplete-richlistitem:not([actiontype="searchengine"]) .ac-url, #PopupAutoCompleteRichResult .autocomplete-richlistitem:not([actiontype="searchengine"]) .ac-title, #PopupAutoCompleteRichResult .autocomplete-richlistitem:not([actiontype="searchengine"]) .ac-action { font-size: 14px !important; } .autocomplete-richlistitem .ac-url, .autocomplete-richlistitem .ac-action { margin-top: 4px; } /* Remove Page Actions Menu */ #pageActionButton { display: none !important; } /* Reduce height of URL Bar drop down */ #PopupAutoCompleteRichResult .autocomplete-richlistitem { height: 26px !important; min-height: 26px !important; }</nowiki></pre>

由 cor-el 於 修改

引用

額外的系統細節

已安裝的外掛程式

Adblock Plus Default Bookmark Folder Easy Youtube Video Downloader Express F.B Purity - Cleans up Facebook (WX) Greasemonkey I Hate Tabs - SDI for Firefox

應用程式

  • User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0

更多資訊

cor-el
  • Top 10 Contributor
  • Moderator
17520 個解決方法 158427 個答案

The layout of this drop-down list has changed completely and is now an HTML #urlbar-results panel The actual list is in a div#urlbarview-results and each item is a numbered div#urlbarview-row-xx item that consists of spans.


The layout of this drop-down list has changed completely and is now an HTML #urlbar-results panel The actual list is in a div#urlbarview-results and each item is a numbered div#urlbarview-row-xx item that consists of spans. ---- *https://dxr.mozilla.org/mozilla-release/source/browser/components/urlbar/UrlbarView.jsm#486
這篇文章有幫助嗎?
引用

提出問題者

So what should I modify to get the desired behaviour?

So what should I modify to get the desired behaviour?
這篇文章有幫助嗎?
引用
cor-el
  • Top 10 Contributor
  • Moderator
17520 個解決方法 158427 個答案

I don't know what all your code is doing. You can look at the tool on this website.

I don't know what all your code is doing. You can look at the tool on this website. *https://www.jeffersonscher.com/gm/url-bar-tweaks.html
這篇文章有幫助嗎?
引用

提出問題者

The tool generates practically the same script as I had, it uses the obsolete "autocomplete-richlistitem".

Is there any sample script showing how to change the new layout of the URL bar drop down rows? I can see the code in UrlbarView.jsm, but I have no idea what to write to userChrome.css to get rid of the "urlbarView-title" and "urlbarView-title-separator" and leave just "urlbarView-secondary urlbarView-url".

The tool generates practically the same script as I had, it uses the obsolete "autocomplete-richlistitem". Is there any sample script showing how to change the new layout of the URL bar drop down rows? I can see the code in UrlbarView.jsm, but I have no idea what to write to userChrome.css to get rid of the "urlbarView-title" and "urlbarView-title-separator" and leave just "urlbarView-secondary urlbarView-url".
這篇文章有幫助嗎?
引用
cor-el
  • Top 10 Contributor
  • Moderator
17520 個解決方法 158427 個答案

The tool includes urlbarview code (do a search for urlbar), but still has a lot of old code.

See this CSS file:

display:flex code is beyond this forum and you can try Reddit.

The tool includes urlbarview code (do a search for urlbar), but still has a lot of old code. See this CSS file: *https://dxr.mozilla.org/mozilla-release/source/browser/themes/shared/urlbar-autocomplete.inc.css display:flex code is beyond this forum and you can try Reddit. *https://www.reddit.com/r/FirefoxCSS/
這篇文章有幫助嗎?
引用
jscher2000
  • Top 10 Contributor
8758 個解決方法 71655 個答案

ralphos said

The tool generates practically the same script as I had, it uses the obsolete "autocomplete-richlistitem".

Could you compare again? For example, do you get the new selectors after the old ones (this user style is supposed to be backwards and forwards compatible, it isn't limited to Firefox 68):

  /* Oldbar flex layout based on 
     https://userstyles.org/styles/131235/firefox-autocomplete-prioritize-url 
     used with permission, new errors my own */

    .autocomplete-richlistitem[type="favicon"],
    .autocomplete-richlistitem[type="bookmark"],
    .autocomplete-richlistitem[type="switchtab"],
    #urlbarView-results .urlbarView-row {
      display: flex;
    }

Also, bear in mind that the old drop-down was built with XUL and the new drop-down is primarily HTML. If you keep the XUL namespace line at the top of your userChrome.css file, my rules for HTML elements will be ignored. Yes, there is a way I can modify all the selectors to work around that, but it's faster if you remove the @namespace.

''ralphos [[#answer-1235981|said]]'' <blockquote> The tool generates practically the same script as I had, it uses the obsolete "autocomplete-richlistitem". </blockquote> Could you compare again? For example, do you get the new selectors after the old ones (this user style is supposed to be backwards and forwards compatible, it isn't limited to Firefox 68): <pre> /* Oldbar flex layout based on https://userstyles.org/styles/131235/firefox-autocomplete-prioritize-url used with permission, new errors my own */ .autocomplete-richlistitem[type="favicon"], .autocomplete-richlistitem[type="bookmark"], .autocomplete-richlistitem[type="switchtab"], '''#urlbarView-results .urlbarView-row''' { display: flex; } </pre> Also, bear in mind that the old drop-down was built with XUL and the new drop-down is primarily HTML. If you keep the XUL namespace line at the top of your userChrome.css file, my rules for HTML elements will be ignored. Yes, there is a way I can modify all the selectors to work around that, but it's faster if you remove the @namespace.
這篇文章有幫助嗎?
引用
問個問題

如果您還沒有帳號,您必須先 登入您的帳號 來回覆文章。請 開始一個新問題