I thought the exact same thing and that's what I would do too(I didn't). This is from the official openpgp repository and you end up asking your self these things.

PGP is set up in a way where this wouldn't be that hard either. You could easily encrypt every message with a master key so that every PGP message sent would be decryptable. That's how group messaging works, everyone encrypts the same message with everyone's key. Otherwise you would not be able to read your own outbound main for instance.

The hardest thing you would have to do is hide the fact that your key exists inside the source code, as well as the instruction set to encrypt it with this key.

If you want to do encryption the proper way on modern browser, look into https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_...

I'm aware of webcrypto, but decided PGP was more suitable.

Mainly, the physical private key

It's also been battle tested much longer then webcrypto.

What makes it improper in your eyes?