1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-10 16:44:17 +02:00

JS: Use arrow functions

All function () {} left in the code reference `this` and thus couldn't use arrow functions.
This commit is contained in:
Jakub Vrana
2025-03-20 10:22:44 +01:00
parent 3c310ddfaf
commit 1f5a7fa717
12 changed files with 31 additions and 35 deletions

View File

@@ -52,7 +52,7 @@ foreach (table_status('', true) as $table => $table_status) {
?>
<div id="schema" style="height: <?php echo $top; ?>em;">
<script<?php echo nonce(); ?>>
qs('#schema').onselectstart = function () { return false; };
qs('#schema').onselectstart = () => false;
const tablePos = {<?php echo implode(",", $table_pos_js) . "\n"; ?>};
const em = qs('#schema').offsetHeight / <?php echo $top; ?>;
document.onmousemove = schemaMousemove;