Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
The scrolltoggle module listens for scroll events and updates elements that are tagged with the ak-scrolltoggle class with the state of the scroll, i.e. whether the user has scrolled up or down.
JS
var scrolltoggle = require('airkit/scrolltoggle');
scrolltoggle.init();
HTML
<div class="ak-scrolltoggle">
Ths div turns blue when scrolling down, red when scrolling up.
</div>
SASS
.ak-scrolltoogle {
background-color: white;
}
.ak-scrolltoggle--down {
background-color: blue;
}
.ak-scrolltoggle--up {
background-color: red;
}
Configuration options can be passed to the scrolltoggle.init()
function to override default behavior.
Example
scrolltoggle.init({
querySelector: 'header.mobile-slider'
});
Option | Default | Description |
---|---|---|
querySelector | ".ak-scrolltoggle" | The CSS query selector for all elements that this module will toggle on scroll. |
upClassName | "ak-scrolltoggle--up" | If provided, the CSS class name to apply when the user scrolls up. |
downClassName | "ak-scrolltoggle--down" | If provided, the CSS class name to apply when the user scrolls down. |
topClassName | null | If provided, the CSS class name to apply when the user scrolls to the very top of the page. |
offset | 5 | The offset, in px, to use before toggling the element. |
FAQs
Open-source JS and SASS modules
The npm package airkit receives a total of 673 weekly downloads. As such, airkit popularity was classified as not popular.
We found that airkit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.