Fix #122 TypeError: redeclaration of variable
Fix #125 WebSocket connection error on unload
Use Array.prototype.contains

Bug 1069063
Fix #123 infinite loop with the prev/next navigation