2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-06-01 12:20:48 +00:00
Commit Graph

1165 Commits

Author SHA1 Message Date
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
Ronan Jouchet
4f3b449218 Deps: bump ts-loader from 8 to 9, now that we require Node 12
See https://github.com/TypeStrong/ts-loader/releases
2021-05-21 19:44:53 -04:00
Ronan Jouchet
45db4e7ec6 README: whoopsie, bad rename of animation 2021-05-21 18:17:59 -04:00
Ronan Jouchet
cc02b87de7
Get rid of "docs" folder (#1194)
It contains a weird mix of stuff and hides valuable files from view at the root of the repo. Better to have:
- Docs at the root
- Rest of the github/release-related hodgepodge (screenshots, scripts) in hidden folder .github
2021-05-21 18:16:59 -04:00
Adam Weeden
1a810e5ce5
Organize CLI flags into groups (for better --help usability) (#1191)
* Organize CLI options for better UX

* Fix some documentation

* Whoops. Stupid VS Code linter.

* Fix prettier issues

* Make paths less unixy in tests

* Update src/cli.test.ts

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

* Apply suggestions from code review

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

* Add example to reference CATALOG.md

* Make honest appear near user-agent

* Standardize descriptions

* Hide flash options

* Add explanation of parsed._

* Redo groups in yargs

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-05-18 22:02:55 -04:00
Adam Weeden
b3c202fd33
Bump minimum required version: node>=12.9, npm>=6.9 (#1192)
* Move minimum supported version: node=12, npm=6.9

* Add missing bits and documentation for future bumping

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-05-15 13:32:54 -04:00
Ronan Jouchet
9225114e77 Update changelog for v43.1.3 2021-05-15 13:28:16 -04:00
Ronan Jouchet
3fd34549d6 Bump to Electron 12.0.7 2021-05-15 13:12:34 -04:00
Ronan Jouchet
0216d4f9c4 CATALOG.md: add HBO Max
From https://github.com/nativefier/nativefier/issues/1153#issuecomment-840697278
2021-05-13 22:51:08 -04:00
Knallli
668ca723dc
CATALOG.md: Add Spotify (PR #1187)
Co-authored-by: Knallli <41125802+Knallli@users.noreply.github.com>
Co-authored-by: Adam Weeden <adamweeden@gmail.com>
Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-05-12 19:53:47 -04:00
Ronan Jouchet
b9615b4cbd
CATALOG.md: cleanup & add Google apps section (#1188) 2021-05-12 18:39:52 -04:00
Ronan Jouchet
d61a4e709a Make prettier happier 2021-05-10 10:23:56 -04:00
Ronan Jouchet
03325b45ce README: remove broken npm badge, and btw useless build status 2021-05-10 10:11:34 -04:00
Adam Weeden
5fbf14d35d
Only try to inject CSS for valid web requests (fix #939: crash on tab close, PR #1181) 2021-05-08 10:12:10 -04:00
RippiN
067327e863
linkIsInternal: consider shop.foo.com and blog.foo.com as internal (still without extra dep or SLD list) (PR #1171)
Domain-ish URL test now also covers considering internal URLs with different sub-domains like
- `https://listen.tidal.com`
- `https://login.tidal.com`

Co-authored-by: Daniel Fuchs <dfuchs@multamedio.de>
Co-authored-by: Adam Weeden <adamweeden@gmail.com>
Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-05-03 13:22:44 -04:00
deciacco
d6f0a28a90
CATALOG.md: build command library (fix #1166) (PR #1178) 2021-05-03 13:08:32 -04:00
Ronan Jouchet
6cf533c5ac Update changelog for v43.1.2 2021-05-03 11:19:30 -04:00
Ronan Jouchet
331fe8db39
Fix logging out users on upgrade / app recreate with same URL (fix #1176) (PR #1179)
This is a follow-up of https://github.com/nativefier/nativefier/pull/1162#discussion_r623766247

PR #1162 introduced a new `generateRandomSuffix` helper function,
used it for its needs (avoiding collisions of injected js/css).

But it also replaced existing appname normalizing logic with it,
introducing randomness in a place that used to be deterministic.

As a result, starting with dd6e15fb5 / v43.1.0, re-creating an app would cause
the app to use a different appName, thus a different appData folder, thus
losing user data including cookies.

This PR leaves the `--inject` fixes of #1176, but reverts the appName logic
to the pre-#1176 code.
2021-05-03 11:16:50 -04:00
Ronan Jouchet
beae6e872b development.md: expand on why I'm such a bore with limiting extra deps 2021-05-02 18:29:05 -04:00
Ronan Jouchet
d9670d6bb0 Update changelog for v43.1.1 2021-05-02 18:15:08 -04:00
Adam Weeden
14d95da079
Fix crash in preload.js due to 3rd-party 'loglevel' (fix #1175, fix #1176) (PR #1177)
Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-05-02 18:12:08 -04:00
Ronan Jouchet
e58823985a Update changelog for v43.1.0 2021-05-01 11:09:05 -04:00
Ronan Jouchet
36a9e2d616 Bump to Electron 12.0.6 with security fixes
See https://github.com/electron/electron/releases/tag/v12.0.6
2021-05-01 10:48:29 -04:00
Adam Weeden
2774888924
App: fix child windows not inheriting mainWindow properties, including userAgent (#1174)
When a new child window is spawned (such as for a Google login popup), those child windows were not receiving the mainWindow's properties. Chiefly among this was the userAgent which caused a bug in #831
2021-05-01 10:46:40 -04:00
Adam Weeden
bcdbd58f06
App: replace console.xyz calls with loglevel.xyz, with a level controlled by app argv --verbose (#1172)
In reference to request in https://github.com/nativefier/nativefier/pull/1168/files#r623753290 ,
this PR fixes a lot of the disparity in logging in the app, and fleshes the logging out a bit.
2021-04-30 23:21:37 -04:00
Adam Weeden
895c11a53e
Support setting the browserWindow's language (fix #175) (PR #1173 ) 2021-04-30 23:16:57 -04:00
Adam Weeden
7dc189ef3f
Support creating self-contained "portable" apps writing their app data to the app folder (fix #376) (PR #1168)
In response to #376

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-04-30 23:10:12 -04:00
Adam Weeden
dd6e15fb5c
Fix injecting multiple css/js files (fix #458) (#1162)
* Add ability to inject multiple css/js files

* API doc: Move misplaced macOS shortcuts doc (PR #1158)

When I added this documentation originally, I guess I placed it in the wrong location.

* README: use quotes in example, to divert users from shell globbing pitfalls

Follow-up of https://github.com/nativefier/nativefier/issues/1159#issuecomment-827184112

* Support opening URLs passed as arg to Nativefied application (fix #405) (PR #1154)

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

* macOS: Fix crash when using --tray (fix #527), and invisible icon (fix #942, fix #668) (#1156)

This fixes:

1. A startup crash on macOS when using the `--tray` option; see #527.
  ![image](https://user-images.githubusercontent.com/22625791/115987741-99544600-a5b6-11eb-866a-dadb5640eecb.png)
2. Invisible tray icon on macOS; see #942 and #668.  
   ![image](https://user-images.githubusercontent.com/22625791/115988276-24364000-a5b9-11eb-80c3-561a8a646754.png)

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

* API.md / --widevine: document signing apps to make some sites like HBO Max & Udemy work (fix #1147)

* Prompt to confirm when page is attempting to prevent unload (#1163)

Should alleviate part of the issue in #1151

* Add an option to upgrade an existing app (fix #1131) (PR #1138)

This adds a `--upgrade` option to upgrade-in-place an old app, re-using its options it can.
Should help fix #1131

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

* Bump to Electron 12.0.5 with Chrome 89.0.4389.128

* Add newly discovered Google internal login page (#1167)

* Fix Widevine by properly listening to widevine-... events, and update docs (fix #1153) (PR #1164)

As documented in #1153, for Widevine support to work properly, we need to listen for the Widevine ready event, and as well for certain sites the app must be signed.

This PR adds the events, and as well adds better documentation on the signing limitation.

This may also help resolve #1147

* Improve suffix creation + tests

* API: clarif in existing doc by the way

* Typo

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
Co-authored-by: Ben Curtis <github@nosolutions.com>
Co-authored-by: Fabian Wolf <22625791+fabiwlf@users.noreply.github.com>
2021-04-30 11:04:10 -04:00
Ronan Jouchet
1ad1844619 linkIsInternal: add test to ensure we don't regress on cases of SLDs 2021-04-30 07:52:58 -04:00
Ronan Jouchet
c4356e48f1
Fix app not starting since widevine PR / #1164 (#1170) 2021-04-30 01:23:13 -04:00
Adam Weeden
ec0ea4bd67
README: add troubleshooting section for common issues (#1169)
Per #1112, I'm adding some common troubleshooting steps to the README. As well, this adds a checkbox requesting users to check this section before submitting a ticket, which will hopefully lead to more self-help.
2021-04-29 20:02:43 -04:00
Adam Weeden
f6e1ebd876
Fix Widevine by properly listening to widevine-... events, and update docs (fix #1153) (PR #1164)
As documented in #1153, for Widevine support to work properly, we need to listen for the Widevine ready event, and as well for certain sites the app must be signed.

This PR adds the events, and as well adds better documentation on the signing limitation.

This may also help resolve #1147
2021-04-29 13:27:55 -04:00
Adam Weeden
d2c7de37a2
Add newly discovered Google internal login page (#1167) 2021-04-29 13:24:15 -04:00
Ronan Jouchet
a19ccd5fda Bump to Electron 12.0.5 with Chrome 89.0.4389.128 2021-04-28 22:05:17 -04:00
Adam Weeden
9330c8434f
Add an option to upgrade an existing app (fix #1131) (PR #1138)
This adds a `--upgrade` option to upgrade-in-place an old app, re-using its options it can.
Should help fix #1131

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-04-28 22:00:31 -04:00
Adam Weeden
bc6be8445d
Prompt to confirm when page is attempting to prevent unload (#1163)
Should alleviate part of the issue in #1151
2021-04-28 21:37:50 -04:00
Ronan Jouchet
83b284e727 API.md / --widevine: document signing apps to make some sites like HBO Max & Udemy work (fix #1147) 2021-04-28 21:09:25 -04:00
Fabian Wolf
cf8e51e7ab
macOS: Fix crash when using --tray (fix #527), and invisible icon (fix #942, fix #668) (#1156)
This fixes:

1. A startup crash on macOS when using the `--tray` option; see #527.
  ![image](https://user-images.githubusercontent.com/22625791/115987741-99544600-a5b6-11eb-866a-dadb5640eecb.png)
2. Invisible tray icon on macOS; see #942 and #668.  
   ![image](https://user-images.githubusercontent.com/22625791/115988276-24364000-a5b9-11eb-80c3-561a8a646754.png)

Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-04-28 20:25:15 -04:00
Ben Curtis
41b208fcb7
Support opening URLs passed as arg to Nativefied application (fix #405) (PR #1154)
Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
2021-04-28 20:18:12 -04:00
Ronan Jouchet
9286fc8086
README: use quotes in example, to divert users from shell globbing pitfalls
Follow-up of https://github.com/nativefier/nativefier/issues/1159#issuecomment-827184112
2021-04-27 18:12:02 -04:00
Adam Weeden
12c8c9f4cb
API doc: Move misplaced macOS shortcuts doc (PR #1158)
When I added this documentation originally, I guess I placed it in the wrong location.
2021-04-26 12:25:47 -04:00
Ronan Jouchet
9f561c0091 CI: run less node versions, oldest supported / latest is enough 2021-04-23 21:52:03 -04:00
Ronan Jouchet
09accbd28a CI: run in node 16, stop node 15 2021-04-23 21:47:54 -04:00
Chris Dzombak
b4ddd6865c
Support defining a custom bookmarks menu (fix #1065) (PR #1155)
This PR adds an optional, customizable menu of predefined bookmarks. In addition to containing a list of bookmarks, this file customizes the name of the menu and (optionally) allows assigning keyboard shortcuts to bookmarks. It adds a new command-line flag, `--bookmarks-menu <string>`, which can be set as the path to a JSON file containing configuration for the bookmarks menu.

Example of such a JSON file:

```json
{
    "menuLabel": "Music",
    "bookmarks": [
        {
            "title": "lofi.cafe",
            "url": "https://lofi.cafe/",
            "type": "link",
            "shortcut": "Cmd+1"
        },
        {
            "title": "beats to relax/study to",
            "url": "https://www.youtube.com/watch?v=5qap5aO4i9A",
            "type": "link",
            "shortcut": "Cmd+2"
        },
        {
            "type": "separator"
        },
        {
            "title": "RÜFÜS DU SOL Live from Joshua Tree",
            "type": "link",
            "url": "https://www.youtube.com/watch?v=Zy4KtD98S2c"
        }
    ]
}
```

## Checks
- [x] `npm run ci` passes

## Notes

Compared to the fork linked in #1065, this PR:
- adds no dependencies
- doesn't currently support submenus (this should be easy enough to add, but I didn't need it)

## Screenshot

<img width="853" alt="screenshot" src="https://user-images.githubusercontent.com/102904/115882015-5493a800-a41a-11eb-85ef-a190f3dbfe76.png">
2021-04-23 21:46:34 -04:00
Ronan Jouchet
fa9bd2aba5 Update changelog for v43.0.2 2021-04-13 21:53:05 -04:00