2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-11-05 04:47:54 +00:00
nativefier/app
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
..
inject Fix bug where css is always injected 2016-02-25 15:25:14 +08:00
src Fix CSS injection (#1227) 2021-06-15 09:02:57 -04:00
.eslintrc.js App: replace console.xyz calls with loglevel.xyz, with a level controlled by app argv --verbose (#1172) 2021-04-30 23:21:37 -04:00
.npmrc Upgrade dependencies and default to latest Electron 1.7.9 (PR #483) 2017-11-14 08:05:01 -05:00
nativefier.json Fix placeholder for electron app to google 2016-05-26 16:50:42 +08:00
package.json Fix CSS injection (#1227) 2021-06-15 09:02:57 -04:00
tsconfig.json app/tsconfig.json: document when to bump compilerOptions, and rationale 2021-05-29 20:07:38 -04:00
webpack.config.js More test:watch fixes & usability 2021-06-01 23:37:04 -04:00