From e7a12bb0dd1743fd52869be5b3e6d6574aedf229 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sat, 22 Sep 2018 17:41:09 +0100 Subject: [PATCH] Clipper: Fixes #809: Saves full URL with note, including query parameters --- Clipper/joplin-webclipper/content_scripts/index.js | 2 +- docs/clipper/index.html | 4 ++++ readme/clipper.md | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Clipper/joplin-webclipper/content_scripts/index.js b/Clipper/joplin-webclipper/content_scripts/index.js index 2a102f360..72d01b525 100644 --- a/Clipper/joplin-webclipper/content_scripts/index.js +++ b/Clipper/joplin-webclipper/content_scripts/index.js @@ -80,7 +80,7 @@ title: title, html: html, base_url: baseUrl(), - url: location.origin + location.pathname, + url: location.origin + location.pathname + location.search, parent_id: command.parent_id, }; } diff --git a/docs/clipper/index.html b/docs/clipper/index.html index a77327b55..8a9410408 100644 --- a/docs/clipper/index.html +++ b/docs/clipper/index.html @@ -339,6 +339,10 @@ for (let portToTest = 41184; portToTest <= 41194; portToTest++) { If body_html is provided and contains relative URLs, provide the base_url parameter too so that all the URLs can be converted to absolute ones. The base URL is basically where the HTML was fetched from, minus the query (everything after the '?'). For example if the original page was https://stackoverflow.com/search?q=%5Bjava%5D+test, the base URL is https://stackoverflow.com/search. +source_url +The full URL of the page. + + image_data_url An image to attach to the note, in Data URL format. diff --git a/readme/clipper.md b/readme/clipper.md index f18f75fdb..7a86b8a6d 100644 --- a/readme/clipper.md +++ b/readme/clipper.md @@ -87,6 +87,7 @@ source_url | The URL the note comes from author | The note author parent_id | The notebook (ID) to move the note to base_url | If `body_html` is provided and contains relative URLs, provide the `base_url` parameter too so that all the URLs can be converted to absolute ones. The base URL is basically where the HTML was fetched from, minus the query (everything after the '?'). For example if the original page was `https://stackoverflow.com/search?q=%5Bjava%5D+test`, the base URL is `https://stackoverflow.com/search`. +source_url | The *full URL* of the page. image_data_url | An image to attach to the note, in [Data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) format. crop_rect | If an image is provided, you can also specify an optional rectangle that will be used to crop the image. In format `{ x: x, y: y, width: width, height: height }`