swift-selection-search icon indicating copy to clipboard operation
swift-selection-search copied to clipboard

file:// icons not shown in popup

Open tefbop opened this issue 6 years ago • 3 comments

If the icon URL begins with file://, the icon can not be seen in the popup. In contrast, it's completely normal and visible in the context menu, and also visible in the popup when the visited web page is on the local file-system. Maybe it's an issue related to same-origin policy.

tefbop avatar Mar 17 '19 14:03 tefbop

Hey, thanks for the report. I can confirm this behaviour on my end as well. It is also not visible in the options page itself (so it's really only visible in the context menu).

If I open a popup in this page, the Browser Console (Ctrl+Shift+J) shows something like:

Security Error: Content at https://github.com/CanisLupus/swift-selection-search/issues/135 may not load or link to file:///C:/dummy_image.jpg.

I'm not aware if something can be done to remedy this. If anyone knows please let me know!

Cheers, Daniel

CanisLupus avatar Mar 17 '19 22:03 CanisLupus

Maybe convert the image to a base64 encoded data URI and fill into the icon URL input box automatically after a user input the image path?

mikelei8291 avatar Aug 02 '19 17:08 mikelei8291

I'll have to look but it would have to be the options page doing that, and since it cannot display the file via URI I'm not sure it would be able to encode it. But again, I didn't check, so I will when I can.

CanisLupus avatar Aug 03 '19 17:08 CanisLupus