benjypng / firefox-extension-logseq-quickcapture

firefox-extension-logseq-quickcapture
MIT License
37 stars 4 forks source link

`undefined` values in quickCapture url #6

Closed alx closed 1 year ago

alx commented 1 year ago

Hi @hkgnp

Thanks for your extension, it works well, until it's not, I'm trying to know why.

It appears that some variable are undefined after 'something' happens, page and append values are built at following line:

https://github.com/hkgnp/firefox-extension-logseq-quickcapture/blob/4a843b47460b03f885ede49bb198f885ab62acd4/src/script.js#L11

console output:

13:19:39.676 › open-url {:url "logseq://x-callback-url/quickCapture?page=TODAY&append=true&title=Tweet%20/%20Twitter&content=&url=https%3A%2F%2Ftwitter.com%2Fjakluge%2Fstatus%2F1607683259961573377"}
13:21:04.749 › open-url {:url "logseq://x-callback-url/quickCapture?page=undefined&append=undefined&title=Add-ons%20Manager&content=&url=about%3Aaddons"}
13:22:56.711 › open-url {:url "logseq://x-callback-url/quickCapture?page=undefined&append=undefined&title=Kris%20Kashtanova%20on%20Twitter:%20%22My%20prompt:%20in%20a%20style%20of%201990s%20point%20and%20click%2016bit%20adventure%20game%20Stranger%20Things%20--ar%203:2%20--v%204%20Would%20love%20your%20fav%20movies%20and%20shows%20as%20old%20games%20https://t.co/PY2Pst2pyv%22%20/%20Twitter&content=My%20prompt:%20in%20a%20style%20of%201990s%20point%20and%20click%2016bit%20adventure%20game%20Stranger%20Things%20--ar%203:2%20--v%204&url=https%3A%2F%2Ftwitter.com%2Ficreatelife%2Fstatus%2F1607555335664844801"}

Could you have a look?

Thanks and have a nice day,

Alex

benjypng commented 1 year ago

Could you take a screenshot of your options page please?

alx commented 1 year ago

Here is the screenshot, I havnt modified the default settings.

image

alx commented 1 year ago

I've tried to disable all other extensions to see if something else was messing up with the async browser call, but it didn't change anything.

benjypng commented 1 year ago

Could you try changing today to TODAY?

benjypng commented 1 year ago

Changing to TODAY fixes the issue.