A bookmarklet is probably not the best way to implement this functionality. Perhaps this feature could be added to an extension like MarkDownload. Maybe there are other extensions out there that do what you’re looking for. This Bento app seems like it should be compatible with Obsidian since it outputs markdown, but looks like it’s only for Android.
Thanks for this great idea, but it does nothing for me. not getting that notification that shows in the demo and nothing happens in my vault. I am on win7, maybe that is a problem
Do you see any errors in the dev console?
I am not sure where to look in it tbh,
the notification now appears. but i can’t find any note in my vault. the new note should be created like i am creating a new note, right? my setting is to be place in the current note’s folder
I am not sure. It can be tricky to troubleshoot this because there are several variables that affect the bookmarklet (browser, OS, website you’re on, and title of the page). You might want to try out the MarkDownload extension as it is a bit more user friendly if you don’t want to poke around in the javascript.
i am following that plugin from the start , and eventho it is a good solution it doesn’t always work and recently i can’t download images with it for some unknown reason. there was another similar bookmarklet that used clipboard for the output i use at the moment. your plugin is a great improvement over that. I will try to troubleshoot the problem tomorrow.
on a side note, eventho I don’t know java, today, I was trying to modify that bookmarklet to get my desired metadata from youtube pages ( to use with yaml and dataview). can you guide me on how to get more metadata for that? I know that document.title
gets the title of the page and window.location.href
gets the url. I am specially like to get the channel name and video duration from that.
Hey @kepano ,
Thanks for this, i got it working on my iPad which is amazing. Quick question. Can you talk about how you setup the Clippings page to also be autopopulated, and what plugins you utilize with that?
Sure, it’s using the amazing Dataview plugin. Here’s the basic template. You may need to edit if you have changed the #clippings
tag and clipped::
variable
dataview
table clipped as "Clipped"
from #clippings
sort clipped desc
Sorry, one last quick question. I see how in the JavaScript how you would add in the Clippings/ to have things go to a particular folder, but how do i add that into the min.js file? I tried looking at a couple min compressor files but it wasn’t working out well.
I would try the one mentioned in the readme which is called Bookmarklet Maker
Hi, thanks for this “clipping”! Works great… except for images. I’ve read the previous comments as well as the link you gave in order to fix it, but I’m an Obsidian newbie and not an expert in js. As an example this page: so far I’ve got only text and links.
In advance, thanks for your kind support.
Which images on that page are you trying to capture? The chart? You might be better off taking a screenshot and adding it to your note because the chart is a fairly complex element combining SVG/HTML/JS.
Thanks for your reply. Yes, the chart. The fact that the chart data are changing all the time… I guess then I have to wait a new obsidian plugin to embed charts.
Yes I think that’s a significantly different requirement. If you want it to stay live updated I would recommend that you search the forum or Discord for embedding iframes into a note. See the documentation on iframes here.
Perfect! Thank you very much!!! It works with iframes.
Hello, @kepano!
Thanks for this useful code. Unfortunately, there is a following error on many of the sites, including https://forum.obsidian.md/ , which I was using for testing:
[Error] Refused to load https://unpkg.com/[email protected]?module because it does not appear in the script-src directive of the Content Security Policy.
[Error] Refused to load https://unpkg.com/@tehshrike/[email protected] because it does not appear in the script-src directive of the Content Security Policy.
[Error] Unhandled Promise Rejection: TypeError: Importing a module script failed.
promiseEmptyOnRejected (22068:76)
promiseReactionJob
Is there anything that can be done with this?
Thanks once again!
This question has been answered a few times already both in this thread and on GitHub. The error will appear in browsers such as Vivaldi and certain sites that block execution of scripts. As far as I know the only options are to either use one of the bookmarklets linked above that don’t depend on the Readability script, or potentially try to embed that code into the bookmarklet itself though I have not tested this approach and could run into character limits for bookmarks.
is there a way to modify this script so that this feeds into a specific QuickAdd Capture?
Thank you very much sir ! Confirm it work like a charm on safari, ios 15. For most common page, it work well,
For who still cant make it work, just change the name of Bing bookmark in safari to whatever name you like, then copy paste (replace) that java code into the adress field. When u want to clipping, tap the bookmark icon, then tap that bookmark you just create, it will ask “open in obsidian”, then a new note with content appear in obsidian.
For more convenient, in Obsidian just create a folder called INBOX, then in obsidian setting: set every new note will be create into that INBOX folder. So from now on, all new clipped web will sit in that folder, waiting you to move around to rearrange
I have this working on iPadOS 15 but I can’t get it working on macOS with Safari. Anyone have this setup working?