joethei/obsidian-link-favicon

No metadata for custom URI scheme icons in live preview

Closed this issue · 0 comments

The icon I set for obsidian:// links only has the following metadata on the DOM:

class="isc-icon isc-obs link-favicon" data-host="" contenteditable="false"

Here's the metadata from reading view:

aria-label-position="top" aria-label="obsidian://vault/notes" rel="noopener" class="external-link"
href="obsidian://vault/notes" target="_blank" data-favicon="true"><img class="isc-icon isc-obs link-favicon"
    data-host=""

I tried styling icons based on these and there's no way to tell which URI I'm dealing with. To get rid of the auto invert colors in this specific instance I'd either need the aria-label or href-data that I have in reading view. Or even better, I'd really like to know which specific icon I'm dealing with from the Icon Shortcodes plugin which otherwise provides this info. That way the icons could be styled the same way easily whether or not they are used as a favicon or somewhere else. The ids are not present anywhere, not just in custom URIs and not just in live preview.