
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
No dependencies vanilla javascript class to easily handle swipe events on page elements.
What do you want more from 2KB of code? :P
NB: obviously it works only for touch devices.
include lc-swiper.min.js
initialize plugin targeting one/multiple page elements and the callback function triggered after each swipe.
NB: first parameter may be a textual selector or a DOM object (yes, also jQuery objects)
You must use a valid callback function as second parameter. It will be triggered each time a swipe event is performed.
It has got two parameters:
<script type="text/javascript>
new lc_swiper('#swipe_target', function(directions, $el) {
// .. do something awesome!
/*
* directions object composition:
* {
up : (int) number of pixels swiped
right : (int) number of pixels swiped
down : (int) number of pixels swiped
left : (int) number of pixels swiped
* }
*/
});
</script>
As said, you can setup multiple instances of the class and also destroy the single instance for a granular control on what is enabled
<script type="text/javascript>
const instance1 = new lc_swiper('#swipe_target', function(dir, $el) {
...
});
const instance2 = new lc_swiper('#swipe_target', function(dir, $el) {
...
});
// stop performing the first instance callback on swipe
instance1.destroy();
</script>
Copyright © Luca Montanari - LCweb
FAQs
Micro vanilla javascript (ES6) class making swipe events easy!
The npm package lc-swiper receives a total of 1 weekly downloads. As such, lc-swiper popularity was classified as not popular.
We found that lc-swiper 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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.