add guards in case add/removeEventListener do not exist

This commit is contained in:
rolux 2015-02-21 16:05:07 +05:30
parent 90a49b2a4d
commit b00a3a0d19

View file

@ -60,7 +60,7 @@ appPanel
theme = legacyThemes[theme] || theme; theme = legacyThemes[theme] || theme;
document.addEventListener('keydown', onKeydown); document.addEventListener && document.addEventListener('keydown', onKeydown);
loadImages(function(images) { loadImages(function(images) {
loadScreen(images); loadScreen(images);
@ -433,7 +433,7 @@ appPanel
Ox.Fullscreen.bind('exit', pandora.UI.set); Ox.Fullscreen.bind('exit', pandora.UI.set);
pandora.site.sectionButtonsWidth = pandora.$ui.sectionButtons.width() + 8; pandora.site.sectionButtonsWidth = pandora.$ui.sectionButtons.width() + 8;
loadUserScript && pandora.loadUserScript(); loadUserScript && pandora.loadUserScript();
document.removeEventListener('keydown', onKeydown); document.removeEventListener && document.removeEventListener('keydown', onKeydown);
} }
function loadBrowserMessage() { function loadBrowserMessage() {