A weighted endomorphism of an algebra is an endomorphism followed by a multiplier.
In [6] and [4], H. Kamowitz characterized compact weighted endomorphisms of $C(X)$ and the disc algebra.
In this note we define a weighted composition operator on a function algebra as a generalization of a weighted endomorphism, and characterize compact weighted composition operators on a function algebra satisfying a certain condition [Theorem 2].
This theorem not only includes Kamowitz's results as corollaries, but also has an application to compact weighted composition operators on the Hardy class $H^\infty(D)$.