diff --git a/readingListBookmarklet.js b/readingListBookmarklet.js index 1793576..0c62870 100644 --- a/readingListBookmarklet.js +++ b/readingListBookmarklet.js @@ -1,7 +1,7 @@ // TO USE: Replace the value of `token` with your value for `WEBSITE_READINGLIST_TOKEN`, then minify this script and set it as a bookmark. javascript:(() => { const requestURL = "http://127.0.0.1:8080/api/readingList"; - const token = "gkjslxhdfkgljhsdklgjh"; + const token = "dfgkjlhsdfgkljghklhj"; const pageTitle = document.title; const pageURL = window.location.href; @@ -53,67 +53,14 @@ javascript:(() => { console.log("BOOKMARKET PRESSED:", pageTitle, pageURL, metaDescription, metaImage); - // make HTML page + const url = new URL(requestURL); + const searchParams = url.searchParams; + searchParams.set("title", pageTitle); + searchParams.set("url", pageURL); + searchParams.set("description", metaDescription); + searchParams.set("image", metaImage); + searchParams.set("nexturl", pageURL); + searchParams.set("token", token); - const page = ` - -
- - - -- | - |
- | - |
- | - |
- | - |