From 34c37a2bee1265f0ddd5a468fec740f02e3c24eb Mon Sep 17 00:00:00 2001 From: vahtos <30844190+vahtos@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:54:15 -0400 Subject: [PATCH] docs: fix import bookmarklet trailing slashes (#4057) --- .../community-guide/import-recipe-bookmarklet.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/docs/documentation/community-guide/import-recipe-bookmarklet.md b/docs/docs/documentation/community-guide/import-recipe-bookmarklet.md index 0755605bc95..2ef49d03781 100644 --- a/docs/docs/documentation/community-guide/import-recipe-bookmarklet.md +++ b/docs/docs/documentation/community-guide/import-recipe-bookmarklet.md @@ -7,7 +7,9 @@ You can use bookmarklets to generate a bookmark that will take your current loca You can use a [bookmarklet generator site](https://caiorss.github.io/bookmarklet-maker/) and the code below to generate a bookmark for your site. Just change the `http://localhost:8080` to your sites web address and follow the instructions. ```js -var url = document.URL; +var url = document.URL.endsWith('/') ? + document.URL.slice(0, -1) : + document.URL; var mealie = "http://localhost:8080"; var group_slug = "home" // Change this to your group slug. You can obtain this from your URL after logging-in to Mealie var use_keywords= "&use_keywords=1" // Optional - use keywords from recipe - update to "" if you don't want that