Revert "Delete dialog.js"

This reverts commit 439ad8dbe07aab31f996a12bbf25264fc2fdd898.