Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
arrow-table
Advanced tools
Navigate HTML tables with arrow keys.
$('#my-table').arrowTable();
$('#my-table').arrowTable({
enabledKeys: ['up', 'down']
});
beforeMove
You can use this callback to decide whether to allow the move or not. If you return false
the plugin will stop the move.
$('#my-table').arrowTable({
focusTarget: 'input, textarea',
beforeMove: function(input, targetFinder, direction) {
// Determine the target
var target = targetFinder();
if (direction === 'up' && $(target).is('textarea'))
{
// Don't allow move
return false;
}
// Return nothing to allow the move
}
});
It's even possible to modify the table in the beforeMove
callback adding a row and the plugin will find the newly added row.
$('#my-table').arrowTable({
beforeMove: function(input, targetFinder, direction) {
if (direction === 'down')
{
$(input).closest('table').find('tbody').append('<tr><td><input type="text"/></td></tr>');
}
}
});
See all possible options below.
Option | Default | Description |
---|---|---|
enabledKeys | ['left', 'right', 'up', 'down'] | Enabled keys |
listenTarget | 'input' | Target to listen for key move events |
focusTarget | 'input' | Target to focus after move |
continuousDelay | 50 | Delay in ms before moving onto next cell when holding arrow keys down |
beforeMove | $.noop | Before moving callback. Return false to stop move |
afterMove | $.noop | After moving complete callback. |
$('#my-table').arrowTable('destroy');
Destroy the plugin instance
FAQs
Navigate HTML tables with arrow keys.
We found that arrow-table demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.