illixion / vscode-vibrancy-continued

Enable Acrylic/Glass effect for your VS Code.
MIT License
544 stars 31 forks source link

:bug: fix(inject): load local resource #20

Closed frg2089 closed 1 year ago

frg2089 commented 2 years ago

not allowed to load local resource. the URL should be started by 'vscode-file://vscode-app/'

I have not tested this and it may not work.

illixion commented 2 years ago

Thanks for the contribution, will test this and merge if there are no issues.

frg2089 commented 1 year ago

well, it does not worked when I test it.

frg2089 commented 1 year ago

well, it does not worked when I test it.

I was wrong, it was working.

The thing to note is that there must be only one space between vscode-app and the path, and it must be the / symbol and not the \ symbol.

vscode-file://vscode-app/path/to/file

illixion commented 1 year ago

I’ve actually tried using your solution while I was trying to fix this bug, and it did work, but there was still a CSP rule preventing loading JS/CSS files from outside of the app’s folders. I went for a different solution instead, where Vibrancy will read the JS/CSS contents directly and embed them in style/script tags, which seems to work just as well.