2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-05-28 18:50:47 +00:00
Commit Graph

1259 Commits

Author SHA1 Message Date
Omoeba
95e2ff9a3f
App context menu: Add electron-context-menu image entries - Save, Copy, Copy Address (PR #1256) 2021-07-10 10:55:00 -04:00
Sam Potts
5e526fb000
Fix badge/counter icon not being removed correctly (fixes #1251) (PR #1252)
The current check for `count` means the value to reset/remove the badge (`''`) is treated as `false` and therefore the badge does not get removed. This PR changes the check for `undefined` instead which resolves the issue. 

Related issue: 
https://github.com/nativefier/nativefier/issues/1251

Testing performed:
- I ran `npm t` as per the docs. All tests passed. 
- I created a new app build for Twitter (`https://twitter.com`) and Messenger (`https://messenger.com`) to verify the correct behaviour. Both were showed the issue as resolved. 

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-07-05 18:35:50 -04:00
Ronan Jouchet
629369d885 API.md: help users not be confused by platform vs. architecture (fix #1254) 2021-07-05 17:22:44 -04:00
Ronan Jouchet
a9bab01858
HACKING.md: document a few maintainer deps things (#1248) 2021-06-29 00:57:58 -04:00
Ronan Jouchet
9943d7f3cc HACKING.md: formatting & nits 2021-06-28 23:04:49 -04:00
Ronan Jouchet
d0849ce794 generate-changelog: integrate running "npm out" for a reminder of outdated dependencies 2021-06-28 22:56:53 -04:00
Ronan Jouchet
af80acf7e9 Update changelog for v44.0.6 2021-06-26 10:55:11 -04:00
Adam Weeden
b74c0bf959
Make app strict TypeScript + linting (and add a shared project) (#1231)
* Convert app to strict typing + shared library

* Fix new code post-merge

* Remove extraneous lint ignores

* Apply suggestions from code review

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>

* Fix prettier complaint

* Dedupe eslint files

* Fix some refs after merge

* Fix clean:full command

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-06-26 09:59:28 -04:00
Ronan Jouchet
f8f48d2f09 Update changelog for v44.0.5 2021-06-25 16:17:59 -04:00
Ronan Jouchet
9893d19085 Bump default Electron to 12.0.12 2021-06-25 16:10:12 -04:00
Adam Weeden
a6c1dcf952
Fix "Reset Zoom" menu item (fix #1241) (PR #1243) 2021-06-25 16:05:23 -04:00
Adam Weeden
dc0e6cb68f
Fix app keeping running in the background after closed (--tray false regression) (PR #1242)
By tightening up typing and logic around tray options.
2021-06-25 16:03:23 -04:00
Adam Weeden
d69d4b253a
Fix tray icon always on (regression from #1235) 2021-06-22 19:09:11 -04:00
Adam Weeden
a491e34966
Fix --tray start-in-tray (fix #1225) (#1235) 2021-06-22 01:22:46 -04:00
Adam Weeden
8b34c6d12d
Resolves #1228; Don't treat 'about:blank#blocked' as new tabs (#1229) 2021-06-16 23:03:49 -04:00
Ronan Jouchet
37769e463c HACKING.md: mention app pkgjson/devDeps/electron 2021-06-16 19:16:55 -04:00
Ronan Jouchet
b2af6f5435 HACKING.md: clarification 2021-06-16 19:15:05 -04:00
Ronan Jouchet
564c616d12 HACKING.md: formatting 2021-06-16 19:13:11 -04:00
Ronan Jouchet
05c3cbfb76 HACKING.md: document major-updating Electron 2021-06-16 19:12:31 -04:00
Ronan Jouchet
996183b949 Update changelog for v44.0.4 2021-06-15 22:36:01 -04:00
Adam Weeden
7a08a2d676
Enable TypeScript strict:true, and more typescript-eslint rules (#1223)
* Catch promise errors better

* Move subFunctions to bottom of createNewWindow

* Use parents when creating child BrowserWindow instances

* Some about:blank pages have an anchor (for some reason)

* Inject browserWindowOptions better

* Interim refactor to MainWindow object

* Split up the window functions/helpers/events some

* Further separate out window functions + tests

* Add a mock for unit testing functions that access electron

* Add unit tests for onWillPreventUnload

* Improve windowEvents tests

* Add the first test for windowHelpers

* Move WebRequest event handling to node

* insertCSS completely under test

* clearAppData completely under test

* Fix contextMenu require bug

* More tests + fixes

* Fix + add to createNewTab tests

* Convert createMainWindow back to func + work out gremlins

* Move setupWindow away from main since its shared

* Make sure contextMenu is handling promises

* Fix issues with fullscreen not working + menu refactor

* Run jest against app/dist so that we can hit app unit tests as well

* Requested PR changes

* Add strict typing; tests currently failing

* Fix failing unit tests

* Add some more eslint warnings and fixes

* More eslint fixes

* Strict typing on (still issues with the lib dir)

* Fix the package.json import/require

* Fix some funky test errors

* Warn -> Error for eslint rules

* @ts-ignore -> @ts-expect-error

* Add back the ext code I removed
2021-06-15 22:20:49 -04:00
Ronan Jouchet
7807bbb327 Update changelog for v44.0.3 2021-06-15 09:06:44 -04:00
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
Ronan Jouchet
9d0a2f5b44 Bump default Electron to 12.0.11 2021-06-14 14:39:51 -04:00
Ronan Jouchet
ea24a0fdeb Fix gitcloud 0.2.3 import 2021-06-14 14:39:43 -04:00
Adam Weeden
9a6c6f870d
Selective css injection (#1222)
* Don't inject CSS for unneeded responses

* Remove some non-injectable methods

* Actually check for CSS to inject + unit tests

* Update app/src/helpers/windowHelpers.ts

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-06-09 09:49:35 -04:00
Peter Lewis
d67f533fa5
README: Update node & npm requirements (#1224)
Update required `node` and `npm` versions to match what's in package.json
2021-06-09 08:14:46 -04:00
Ronan Jouchet
437ae55d2e Update changelog for v44.0.2 2021-06-07 17:28:34 -04:00
Ronan Jouchet
4badf3dc70 manual-test: fix shellcheck nits, make tests structure more distinct 2021-06-07 17:27:23 -04:00
Adam Weeden
826625f4a4
Fix HTTP basic auth (fix #1219) (#1220)
Should resolve #1219, as well adds a manual test for basic auth as suggested.

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-06-07 17:09:24 -04:00
Adam Weeden
363fa966ee
Fix tabs opening twice (fix #1209) (#1221)
* Only add a new window handler to the main window

* Update app/src/components/mainWindow.ts

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-06-07 16:49:06 -04:00
Ronan Jouchet
460d70f915 Update changelog for v44.0.1 2021-06-07 09:38:53 -04:00
Ronan Jouchet
709557c7ab
macOS: fix crash on activating main window (fix #1212) (PR #1213)
```
Uncaught Exception:
TypeError: Cannot read property 'show' of undefined
at App.<anonymous> (/src/main.ts:177:18)
```

Seems like an oversight of the recent refactor.

* macOS: fix crash on activating main window (fix #1210)
* Eliminate need for global mainWindow, refactor widevine / non-widevine events (#1218)

Co-authored-by: Adam Weeden <adamweeden@gmail.com>
2021-06-07 09:35:27 -04:00
Adam Weeden
cdc6fa79c2
Fix fullscreen not working + menu refactor (fix #1206) (#1210)
* Catch promise errors better

* Move subFunctions to bottom of createNewWindow

* Use parents when creating child BrowserWindow instances

* Some about:blank pages have an anchor (for some reason)

* Inject browserWindowOptions better

* Interim refactor to MainWindow object

* Split up the window functions/helpers/events some

* Further separate out window functions + tests

* Add a mock for unit testing functions that access electron

* Add unit tests for onWillPreventUnload

* Improve windowEvents tests

* Add the first test for windowHelpers

* Move WebRequest event handling to node

* insertCSS completely under test

* clearAppData completely under test

* Fix contextMenu require bug

* More tests + fixes

* Fix + add to createNewTab tests

* Convert createMainWindow back to func + work out gremlins

* Move setupWindow away from main since its shared

* Make sure contextMenu is handling promises

* Fix issues with fullscreen not working + menu refactor

* Run jest against app/dist so that we can hit app unit tests as well

* Requested PR changes
2021-06-07 08:55:17 -04:00
Ronan Jouchet
16cacb0915 CATALOG.md: Spotify: mention faking user agent may not be necessary 2021-06-04 18:53:38 -04:00
Ronan Jouchet
69bc3306f9 Update changelog for v44.0.0 2021-06-04 17:03:35 -04:00
Ronan Jouchet
5d67156deb API.md: cleanup 2021-06-04 16:53:35 -04:00
Ronan Jouchet
c6b50e8d0a API.md: add "New in x.y.z" info for (most) flags 2021-06-04 16:45:05 -04:00
Ronan Jouchet
5673989117 Bump default Electron to 12.0.10 2021-06-04 16:18:34 -04:00
Adam Weeden
72de7b3fca
Refactor app window creation/events + add some unit tests; fix #1197 (#1203)
* Catch promise errors better

* Move subFunctions to bottom of createNewWindow

* Use parents when creating child BrowserWindow instances

* Some about:blank pages have an anchor (for some reason)

* Inject browserWindowOptions better

* Interim refactor to MainWindow object

* Split up the window functions/helpers/events some

* Further separate out window functions + tests

* Add a mock for unit testing functions that access electron

* Add unit tests for onWillPreventUnload

* Improve windowEvents tests

* Add the first test for windowHelpers

* Move WebRequest event handling to node

* insertCSS completely under test

* clearAppData completely under test

* Fix contextMenu require bug

* More tests + fixes

* Fix + add to createNewTab tests

* Convert createMainWindow back to func + work out gremlins

* Move setupWindow away from main since its shared

* Make sure contextMenu is handling promises
2021-06-02 15:18:32 -04:00
Ronan Jouchet
ec12702359 HACKING.md: video doesn't embed, just link to it 2021-06-02 09:52:28 -04:00
Ronan Jouchet
1ceffb1a0d HACKING.md: embed video showing what a live-reload experience looks like
Also, a paragraph on limiting breaking changes
2021-06-02 09:48:57 -04:00
Ronan Jouchet
62ee24662c More test:watch fix: bring upgrade to Jest 27 from TheCleric' closed jest-ts PR
See https://github.com/nativefier/nativefier/pull/1204
2021-06-02 00:35:19 -04:00
Ronan Jouchet
6b09d1467f More test:watch fixes & usability
See https://github.com/nativefier/nativefier/pull/1204#issuecomment-852679403
2021-06-01 23:37:04 -04:00
Ronan Jouchet
9c5dba7f07 Fix test:watch requiring two saves to actually run the code/test you just changed
Will fix https://github.com/nativefier/nativefier/pull/1204#issuecomment-852155755
See package.json in comments for description
2021-06-01 20:43:46 -04:00
Adam Weeden
86a27d4f39
Allow non-ascii app names like 微信读书 (fix #1056) (#1207)
* Resolves #1056 Allow non-ascii app names like 微信读书

* Update src/utils/sanitizeFilename.ts

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>

* Fix prettier

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-05-31 23:27:32 -04:00
Adam Weeden
6c55e1a9a1
Add login.microsoftonline.com to internal login pages (#1205)
* Add login.microsoftonline.com to internal login pages

* Update API.md

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>

* Add extra messaging for adding to internalLoginPages

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-05-29 20:38:24 -04:00
Ronan Jouchet
8801ca5150 app/tsconfig.json: document when to bump compilerOptions, and rationale 2021-05-29 20:07:38 -04:00
Ronan Jouchet
2b780e6c67 Test watcher: warn that it's necessary to run build:watch for the test watcher to work
See https://github.com/nativefier/nativefier/pull/1204#issuecomment-850915981
2021-05-29 19:58:46 -04:00
Adam Weeden
d6730f7022
Improve user agent handling/provide user agent "short" codes (#1198) 2021-05-21 23:41:13 -04:00