Bug 888773 - Sidebar followup: show/hide should take a window argument

Nit: it's better use `setImmediate` for such task, instead of `setTimeout` without a delay.