2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-09-28 20:29:04 +00:00
nativefier/app/package.json
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

26 lines
593 B
JSON

{
"name": "nativefier-placeholder",
"version": "1.0.0",
"description": "Placeholder for the nativefier cli to override with a target url",
"main": "lib/main.js",
"author": "Jia Hao",
"license": "MIT",
"keywords": [
"desktop",
"electron",
"placeholder"
],
"scripts": {},
"dependencies": {
"electron-context-menu": "^2.5.0",
"electron-dl": "^3.2.0",
"electron-squirrel-startup": "^1.0.0",
"electron-window-state": "^5.0.3",
"loglevel": "^1.7.1",
"source-map-support": "^0.5.19"
},
"devDependencies": {
"electron": "^12.0.11"
}
}