Argent X injects the StarkNet API into every website’s javascript context, to allow Dapps to request transactions to be made from your wallet. You can review every transaction, and approve or reject.
You can view the source code of Argent X, or find it here: https://github.com/argentlabs/argent-x