Then what's the use of calling the `alert()` function on others?

To be clear: there are two codepaths for alerts to show: those that are inserted into the template directly (and you trigger those with the function() { } code), and those that are inserted during page operation via the `show_message` function here (which has no `alert()` call).  I only tested the former codepath; did you test the latter?

the video update page, for example, uses the latter codepath.