only insert fpmenu once - for #3062
This commit is contained in:
parent
4889b0c0f6
commit
f6f22e051f
|
@ -612,10 +612,9 @@ lichess.topMenuIntent = function() {
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#ham-plate').one('mouseover', function() {
|
$('#ham-plate').one('mouseover click', function() {
|
||||||
|
if (!$('#fpmenu').length) $('body').append($('<div id=fpmenu>').load('/fpmenu'));
|
||||||
lichess.loadCss('/assets/stylesheets/fpmenu.css');
|
lichess.loadCss('/assets/stylesheets/fpmenu.css');
|
||||||
}).one('click', function() {
|
|
||||||
$('body').append($('<div id=fpmenu>').load('/fpmenu'));
|
|
||||||
}).click(function() {
|
}).click(function() {
|
||||||
document.body.classList.toggle('fpmenu');
|
document.body.classList.toggle('fpmenu');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue