Move dialog code out ot notifications.js
Don't reopen dialog if setting indicates so
Check if playing a video before reopening dialog