1
0
mirror of https://github.com/jiahaog/Nativefier synced 2024-06-20 06:56:35 +02:00
Nativefier/app/src
Adam Weeden 113d8448c1
Fix CSS injection (#1227)
This fixes https://github.com/nativefier/nativefier/pull/1222#issuecomment-860913698 , where:

1. When it works (e.g. initial page load), CSS is slower to inject (you can see pages without injected CSS)
2. CSS isn't injected when navigating to a page

On both Windows & Linux, a `git revert 9a6c6f870d && npm run build` fixes the issue.

--

I'm still not 100% sure what went wrong, but I suspect that the new version of Electron may not be firing onHeadersReceived for the actual navigation events, and only its child requests. To counteract it, I'm now injecting at the navigation event as well. I was able to reproduce the issue and this does seem to fix it. Please let me know if it does for you as well..

Also I noticed some funkiness in your logs where we're trying to inject on font files. So I realized the method is probably not nearly as important as the content-type, so I've switched blacklist methods to blacklist content-types.
2021-06-15 09:02:57 -04:00
..
components Fix HTTP basic auth (fix #1219) (#1220) 2021-06-07 17:09:24 -04:00
helpers Fix CSS injection (#1227) 2021-06-15 09:02:57 -04:00
mocks Fix fullscreen not working + menu refactor (fix #1206) (#1210) 2021-06-07 08:55:17 -04:00
static Revamp and move to TypeScript (#898) 2020-03-15 16:50:01 -04:00
main.ts Fix HTTP basic auth (fix #1219) (#1220) 2021-06-07 17:09:24 -04:00
preload.ts Fix crash in preload.js due to 3rd-party 'loglevel' (fix #1175, fix #1176) (PR #1177) 2021-05-02 18:12:08 -04:00