aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/js.js')
-rw-r--r--core/js/js.js33
1 files changed, 6 insertions, 27 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 67da7915cfb..0d255b55e57 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1115,35 +1115,14 @@ function initCore() {
var $toggle = $('#header #owncloud');
var $navigation = $('#navigation');
- function updateMainMenu() {
- if (!$toggle.hasClass('menutoggle')) {
- // init the menu
- OC.registerMenu($toggle, $navigation);
- $toggle.data('oldhref', $toggle.attr('href'));
- $toggle.attr('href', '#');
- $navigation.hide();
- }
- else {
- OC.unregisterMenu($toggle, $navigation);
- $toggle.attr('href', $toggle.data('oldhref'));
- $navigation.show();
- }
- }
-
- updateMainMenu();
-
- // TODO: debounce this
- $(window).resize(function() {
- if (lastMatch !== mq.matches) {
- lastMatch = mq.matches;
- updateMainMenu();
- }
- });
+ // init the menu
+ OC.registerMenu($toggle, $navigation);
+ $toggle.data('oldhref', $toggle.attr('href'));
+ $toggle.attr('href', '#');
+ $navigation.hide();
}
- if (window.matchMedia) {
- setupMainMenu();
- }
+ setupMainMenu();
}
$(document).ready(initCore);