mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 07:01:58 +08:00
17 lines
533 B
JavaScript
17 lines
533 B
JavaScript
|
(function() {
|
||
|
$('.api-key-input').on('keyup change', function() {
|
||
|
var initialValue = this.dataset.originalValue;
|
||
|
if (initialValue.length) {
|
||
|
if (initialValue !== this.value) {
|
||
|
$('.api-key-container').addClass('warning');
|
||
|
$('.save-button').removeClass('hidden');
|
||
|
$('.saved-button').addClass('hidden');
|
||
|
} else {
|
||
|
$('.api-key-container').removeClass('warning');
|
||
|
$('.save-button').addClass('hidden');
|
||
|
$('.saved-button').removeClass('hidden');
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}());
|