File tree 1 file changed +13
-1
lines changed
functional-samples/sample.bookmarks
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,19 @@ function dumpNode(bookmarkNode, query) {
40
40
41
41
const anchor = $ ( '<a>' ) ;
42
42
anchor . attr ( 'href' , bookmarkNode . url ) ;
43
- anchor . text ( bookmarkNode . title ) ;
43
+
44
+ // Chrome may have multiple top-level folder nodes with the same title. To
45
+ // disambiguate them, include a suffix depending on the value of the
46
+ // syncing property.
47
+ //
48
+ // folderType is set for top-level folders in the tree, and not for child
49
+ // folders. In Chrome versions prior to milestone 134, folderType is never
50
+ // set.
51
+ let title_text = bookmarkNode . title ;
52
+ if ( bookmarkNode . folderType ) {
53
+ title_text += bookmarkNode . syncing ? ' (Account)' : ' (Local)' ;
54
+ }
55
+ anchor . text ( title_text ) ;
44
56
45
57
/*
46
58
* When clicking on a bookmark in the extension, a new tab is fired with
You can’t perform that action at this time.
0 commit comments