0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-30 01:46:24 +01:00

code clean up

This commit is contained in:
mr-winter 2016-02-11 08:47:17 +13:00 committed by Josh Barr
parent cbb8a7dfd1
commit d5727a93d9

View File

@ -6,15 +6,15 @@ document.addEventListener('DOMContentLoaded', function() {
var className = 'is-active';
if ('ontouchstart' in window) {
userbar.classList.add("touch");
userbar.classList.add('touch');
} else {
userbar.classList.add("no-touch");
userbar.classList.add('no-touch');
}
trigger.addEventListener("mouseenter", showUserbar, false);
userbar.addEventListener("mouseleave", hideUserbar, false);
trigger.addEventListener('mouseenter', showUserbar, false);
userbar.addEventListener('mouseleave', hideUserbar, false);
trigger.addEventListener("touchstart", toggleUserbar, false);
trigger.addEventListener('touchstart', toggleUserbar, false);
// make sure userbar is hidden when navigating back
window.addEventListener('pageshow', hideUserbar, false);