Talk:Browser.urlbar.default.behavior: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(Combined values)
Line 25: Line 25:
===Combined values===
===Combined values===
I'm also wondering,  is the "visited bookmarks" value (3) the intersection (combination) of the restrictions, "only visited pages in history" (1) and "only bookmarks" (2)?  If so, maybe you could add a "Combined values" paragraph underneath the main list of values,  showing the effects of of various combinations.  You could list "Visited bookmarks:''' 3''' (1+2)" as well as the other examples already mentioned (17=History+match URL; 49=History+match URL+Typed)?  Just a thought.  [[User:Alice Wyman|Alice]] 21:37, 22 September 2009 (UTC)
I'm also wondering,  is the "visited bookmarks" value (3) the intersection (combination) of the restrictions, "only visited pages in history" (1) and "only bookmarks" (2)?  If so, maybe you could add a "Combined values" paragraph underneath the main list of values,  showing the effects of of various combinations.  You could list "Visited bookmarks:''' 3''' (1+2)" as well as the other examples already mentioned (17=History+match URL; 49=History+match URL+Typed)?  Just a thought.  [[User:Alice Wyman|Alice]] 21:37, 22 September 2009 (UTC)
Make sure not to get confused by what those values mean to represent. They are not possible values of the pref, but represent the meaning of each bit in the binary representation: 1: bit0 2:bit1 4:bit2 8:bit3 16:bit4 32:bit5. So even the mention of the default settings does not apply.<br />
I'm thinking about moving the default values text to above that table because the purpose of that list is to show the meaning of bits in the bit map that forms the pref and not the meaning of the value of the pref (then you will have to mention all possible 64: 0-63 values to be complete).<br />
I think that 3 (History+Bookmarks: visited bookmarks) is the same as 0 for the last two bits and that applies to others as well, but I haven't tested that. If you apply all filters or matches (title+url) then that is the same as no filtering.<br />
If you want to add examples then use an extra Example section to show some useful examples and leave the list that shows the meaning of the bits as I originally wrote it. Otherwise it is difficult to make your own filter.<br />
--[[User:Dickvl|Dickvl]] 22:54, 23 September 2009 (UTC)

Revision as of 22:54, 23 September 2009

Possible values and their effects

Added 0 (no filtering) which is the default for Firefox. [1] The default for SeaMonkey is 1 (History). [2] Alice 13:55, 22 September 2009 (UTC)

Also, what about including 3 (visited bookmarks) as a possible value?

http://mxr.mozilla.org/comm-central/source/mozilla/browser/app/profile/firefox.js
   232 // The special characters below can be typed into the urlbar to either restrict
   233 // the search to visited history, bookmarked, tagged pages; or force a match on
   234 // just the title text or url.
   235 pref("browser.urlbar.restrict.history", "^");
   236 pref("browser.urlbar.restrict.bookmark", "*");
   237 pref("browser.urlbar.restrict.tag", "+");
   238 pref("browser.urlbar.restrict.typed", "~");
   239 pref("browser.urlbar.match.title", "#");
   240 pref("browser.urlbar.match.url", "@");
   241
   242 // The default behavior for the urlbar can be configured to use any combination
   243 // of the restrict or match filters with each additional filter restricting
   244 // more (intersection). Add the following values to set the behavior as the
   245 // default: 1: history, 2: bookmark, 4: tag, 8: title, 16: url, 32: typed
   246 // E.g., 0 = show all results (no filtering), 1 = only visited pages in history,
   247 // 2 = only bookmarks, 3 = visited bookmarks, 1+16 = history matching in the url
   248 pref("browser.urlbar.default.behavior", 0);

Alice 13:55, 22 September 2009 (UTC)

Combined values

I'm also wondering, is the "visited bookmarks" value (3) the intersection (combination) of the restrictions, "only visited pages in history" (1) and "only bookmarks" (2)? If so, maybe you could add a "Combined values" paragraph underneath the main list of values, showing the effects of of various combinations. You could list "Visited bookmarks: 3 (1+2)" as well as the other examples already mentioned (17=History+match URL; 49=History+match URL+Typed)? Just a thought. Alice 21:37, 22 September 2009 (UTC)

Make sure not to get confused by what those values mean to represent. They are not possible values of the pref, but represent the meaning of each bit in the binary representation: 1: bit0 2:bit1 4:bit2 8:bit3 16:bit4 32:bit5. So even the mention of the default settings does not apply.
I'm thinking about moving the default values text to above that table because the purpose of that list is to show the meaning of bits in the bit map that forms the pref and not the meaning of the value of the pref (then you will have to mention all possible 64: 0-63 values to be complete).
I think that 3 (History+Bookmarks: visited bookmarks) is the same as 0 for the last two bits and that applies to others as well, but I haven't tested that. If you apply all filters or matches (title+url) then that is the same as no filtering.
If you want to add examples then use an extra Example section to show some useful examples and leave the list that shows the meaning of the bits as I originally wrote it. Otherwise it is difficult to make your own filter.
--Dickvl 22:54, 23 September 2009 (UTC)