Skip to content

Commit

Permalink
Merge pull request #58 from teddy-gustiaux/issue-56
Browse files Browse the repository at this point in the history
fix: bookmarking tabs not working properly in non-English UI (close #56)
  • Loading branch information
teddy-gustiaux committed Apr 30, 2019
2 parents 8e4d5f5 + 4d9daf7 commit e8ceeb2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/background/bookmarking/BuiltinBookmarking.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ class BuiltinBookmarking {
return isSystemCreated;
}

// The default name template is "[Folder Name]", but is language-specific
_isAllTabsSystemCreatedFolder(bookmarkInfo) {
return bookmarkInfo.title === FIREFOX_DEFAULT_ALL_TABS_FOLDER_NAME;
if (bookmarkInfo.title.length < 3) return false;
const firstLetter = bookmarkInfo.title[0];
const lastLetter = bookmarkInfo.title[bookmarkInfo.title.length - 1];
return firstLetter === '[' && lastLetter === ']';
}

_createMovingPropertiesForBookmark() {
Expand Down
1 change: 0 additions & 1 deletion src/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const QUICK_BOOOKMARKING_COMMAND = 'quick-bookmark';

// Default bookmark folders ('unfiled' by default for all versions, 'menu' with shortcut/context menu on stable version)
const FIREFOX_DEFAULT_FOLDERS = ['unfiled_____', 'menu________'];
const FIREFOX_DEFAULT_ALL_TABS_FOLDER_NAME = '[Folder Name]';
const FIREFOX_ROOT_BOOKMARK_FOLDER = 'root________';

// List of status
Expand Down

0 comments on commit e8ceeb2

Please sign in to comment.