Skip to content

Commit

Permalink
fix: manually added bookmarks in system folders moved to default folder
Browse files Browse the repository at this point in the history
Bookmarks created manually in "Bookmarks Menu" or "Other Bookmarks" folders (via the sidebar or the library context menu) were moved to the default bookmark location.
  • Loading branch information
teddy-gustiaux committed Dec 14, 2019
1 parent bb0d640 commit cb1e8f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/background/bookmarking/BuiltinBookmarking.js
Expand Up @@ -16,7 +16,8 @@ class BuiltinBookmarking {
let isSystemCreated = false;
if (
Object.prototype.hasOwnProperty.call(bookmarkInfo, 'parentId') &&
FIREFOX_DEFAULT_FOLDERS.includes(bookmarkInfo.parentId)
FIREFOX_DEFAULT_FOLDERS.includes(bookmarkInfo.parentId) &&
bookmarkInfo.url !== FIREFOX_BOOKMARK_DEFAULT_MANUAL_URL
) {
isSystemCreated = true;
}
Expand Down
3 changes: 3 additions & 0 deletions src/globals.js
Expand Up @@ -38,6 +38,9 @@ const QUICK_BOOOKMARKING_COMMAND = 'quick-bookmark';
const FIREFOX_DEFAULT_FOLDERS = ['unfiled_____', 'menu________'];
const FIREFOX_ROOT_BOOKMARK_FOLDER = 'root________';

// Default bookmark URL if manually created without changes via the "New Bookmark..." context menu
const FIREFOX_BOOKMARK_DEFAULT_MANUAL_URL = 'about:blank';

// List of status
const ST_BOOKMARKED = 100;
const ST_NOT_BOOKMARKED = 101;
Expand Down

0 comments on commit cb1e8f7

Please sign in to comment.