-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added function to auto-import bookmarks from the existing site, desig…
…n updates
- Loading branch information
Showing
6 changed files
with
67 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { updateSettings } from "$utils/updateSettings"; | ||
|
||
// checking if the user have any bookmarks from the old v3 update and transfer them to the new website's local settings | ||
export function checkOldBookmarks() { | ||
let oldBookmarks = localStorage.getItem("bookmarks"); | ||
|
||
if (oldBookmarks !== null) { | ||
const bookmarks = oldBookmarks.slice(0, -1).split("|"); | ||
|
||
bookmarks.forEach((bookmark) => { | ||
updateSettings({ type: "userBookmarks", key: bookmark, oldCheck: true }); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters