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.
active-scroll-navigation
Advanced tools
This is a plain JavaScript Class that changes the active navigation item while the user scroll up/down the page. It has options for active class name and scroll offset. You can also turn the event listener for window scroll on and off if need along with retrieving the active item index.
https://codepen.io/Cagosto/pen/opwJoK
Get if from npm
npm i active-scroll-navigation
import it in your app
import ACTIVE_SCROLL from 'active-scroll-navigation'
new ACTIVE_SCROLL({
nav: '.main-nav'
offSet: 0,
activeString: 'main-nav__item—active'
});
Name | Type | Required | Value |
---|---|---|---|
nav | String | True | "" |
offSet | Num | False | 0 |
activeString | String | True | main-nav__item--active |
const activeScroll = new ACTIVE_SCROLL();
let index = activeScroll.activeItem();
const activeScroll = new ACTIVE_SCROLL();
activeScroll.eventsSrollOff() //Stop Scroll Listener
activeScroll.eventsSroll() //Start Scroll Listener
FAQs
Navigation will change active state when user scroll.
The npm package active-scroll-navigation receives a total of 22 weekly downloads. As such, active-scroll-navigation popularity was classified as not popular.
We found that active-scroll-navigation 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.