It's not possible to prevent applications from creating modal dialogs and still allow them to be usefully interactive. If you took away `alert` and friends, sites would (and do) just create dialogs with HTML instead.
If you want websites to be able to be dynamic at all, then they can use that power to be annoying. Two sides of the same coin.
(the history thing seems like it might be more addressable)