diff --git a/src/index.html b/src/index.html index 81549530..7ebf8825 100644 --- a/src/index.html +++ b/src/index.html @@ -13,6 +13,7 @@ + @@ -98,6 +99,7 @@

Preferences

Clear Data +
diff --git a/src/lsSaveHandler.js b/src/lsSaveHandler.js new file mode 100644 index 00000000..ab460a2c --- /dev/null +++ b/src/lsSaveHandler.js @@ -0,0 +1,19 @@ +function lsSaveBookmarks() { + let bookmarksFile = new Blob([JSON.stringify(bookmarks)], { type: "text/plain" }); + let bookmarksURL = URL.createObjectURL(bookmarksFile); + let bookmarksLink = document.createElement("a"); + bookmarksLink.href = bookmarksURL; + bookmarksLink.download = "bookmarks.json"; + bookmarksLink.click(); + URL.revokeObjectURL(bookmarksURL); +} + +function loadBookmarksJSON(pathToFile) { + // if pathToFile ends with json continue, if not stop function + if (!pathToFile.endsWith(".json")) { + console.log("This functionality is incomplete") + } else { + return; + } + +} \ No newline at end of file