mirror of
https://github.com/vrana/adminer.git
synced 2025-08-18 04:11:27 +02:00
JS: Change var to let/const
Created by `eslint . --fix` with rules no-var and then prefer-const.
This commit is contained in:
@@ -6,7 +6,7 @@ function messagesPrint() {
|
||||
function selectFieldChange() {
|
||||
}
|
||||
|
||||
var helpOpen;
|
||||
let helpOpen;
|
||||
|
||||
function helpMouseover() {
|
||||
}
|
||||
@@ -22,14 +22,14 @@ function helpClose() {
|
||||
* @this HTMLInputElement
|
||||
*/
|
||||
function whisper(url) {
|
||||
var field = this;
|
||||
const field = this;
|
||||
field.orig = field.value;
|
||||
field.previousSibling.value = field.value; // accept number, reject string
|
||||
return ajax(url + encodeURIComponent(field.value), function (xmlhttp) {
|
||||
if (xmlhttp.status && field.orig == field.value) { // ignore old responses
|
||||
field.nextSibling.innerHTML = xmlhttp.responseText;
|
||||
field.nextSibling.style.display = '';
|
||||
var a = field.nextSibling.firstChild;
|
||||
const a = field.nextSibling.firstChild;
|
||||
if (a && a.firstChild.data == field.value) {
|
||||
field.previousSibling.value = decodeURIComponent(a.href.replace(/.*=/, ''));
|
||||
a.className = 'active';
|
||||
@@ -44,8 +44,8 @@ function whisper(url) {
|
||||
* @this HTMLDivElement
|
||||
*/
|
||||
function whisperClick(event) {
|
||||
var field = this.previousSibling;
|
||||
var el = getTarget(event);
|
||||
const field = this.previousSibling;
|
||||
const el = getTarget(event);
|
||||
if (isTag(el, 'a') && !(event.button || event.shiftKey || event.altKey || isCtrl(event))) {
|
||||
field.value = el.firstChild.data;
|
||||
field.previousSibling.value = decodeURIComponent(el.href.replace(/.*=/, ''));
|
||||
@@ -58,7 +58,7 @@ function whisperClick(event) {
|
||||
* @this HTMLInputElement
|
||||
*/
|
||||
function emailFileChange() {
|
||||
var el = this.cloneNode(true);
|
||||
const el = this.cloneNode(true);
|
||||
this.onchange = function () { };
|
||||
el.value = '';
|
||||
this.parentNode.appendChild(el);
|
||||
|
Reference in New Issue
Block a user