To solve the security issue, the bookmarklet could perform some sort of hash checking on the source and refuse to run if it's changed.
The question is, can a hash function and verification logic be made small enough for this to be viable?
The question is, can a hash function and verification logic be made small enough for this to be viable?