delay inquiry JS
parent
a1c0a72040
commit
ad1eb4d7b5
|
@ -1,24 +1,26 @@
|
|||
$(function() {
|
||||
$('#inquiry .notes').on('mouseenter', function() {
|
||||
$(this).find('textarea')[0].focus();
|
||||
});
|
||||
$('#inquiry .costello').click(function() {
|
||||
$('#inquiry').toggleClass('hidden');
|
||||
$('body').toggleClass('no-inquiry');
|
||||
});
|
||||
window.requestIdleCallback(function() {
|
||||
$(function() {
|
||||
$('#inquiry .notes').on('mouseenter', function() {
|
||||
$(this).find('textarea')[0].focus();
|
||||
});
|
||||
$('#inquiry .costello').click(function() {
|
||||
$('#inquiry').toggleClass('hidden');
|
||||
$('body').toggleClass('no-inquiry');
|
||||
});
|
||||
|
||||
var nextStore = lichess.storage.make('inquiry-auto-next');
|
||||
var next = function() {
|
||||
return nextStore.get() !== '';
|
||||
};
|
||||
var nextStore = lichess.storage.make('inquiry-auto-next');
|
||||
var next = function() {
|
||||
return nextStore.get() !== '';
|
||||
};
|
||||
|
||||
if (!next()) {
|
||||
$('#inquiry .switcher input').attr('checked', false);
|
||||
$('#inquiry input.auto-next').val('0');
|
||||
}
|
||||
if (!next()) {
|
||||
$('#inquiry .switcher input').attr('checked', false);
|
||||
$('#inquiry input.auto-next').val('0');
|
||||
}
|
||||
|
||||
$('#inquiry .switcher input').on('change', function() {
|
||||
nextStore.set(next() ? '' : '1');
|
||||
$('#inquiry input.auto-next').val(next() ? '1' : '0');
|
||||
$('#inquiry .switcher input').on('change', function() {
|
||||
nextStore.set(next() ? '' : '1');
|
||||
$('#inquiry input.auto-next').val(next() ? '1' : '0');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue