diff options
Diffstat (limited to 'juick-www/src/main/static/scripts.js')
-rw-r--r-- | juick-www/src/main/static/scripts.js | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js index 6a28d96d..a3bff879 100644 --- a/juick-www/src/main/static/scripts.js +++ b/juick-www/src/main/static/scripts.js @@ -1,16 +1,8 @@ require('whatwg-fetch'); require('element-closest'); require('classlist.js'); -let killy = require('killy'); let Awesomplete = require('awesomplete'); - -if (!('remove' in Element.prototype)) { // Firefox <23 - Element.prototype.remove = function() { - if (this.parentNode) { - this.parentNode.removeChild(this); - } - }; -} +let killy = require('killy'); NodeList.prototype.forEach = Array.prototype.forEach; HTMLCollection.prototype.forEach = Array.prototype.forEach; @@ -691,10 +683,11 @@ ready(function () { }); }); - makeMenu( - document.querySelector('#user-menu'), - document.querySelector('#user-menu-dropdown') - ); + let userMenu = document.querySelector('#user-menu'); + let userMenuDropDown = document.querySelector('#user-menu-dropdown'); + if (userMenu) { + makeMenu(userMenu, userMenuDropDown); + } let column = document.querySelector('#column'); if (column && column.querySelector('#ctitle') && column.querySelector('#column-expander')) { |