
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
nav-scroll-spy
Advanced tools
Simple ES6 Scroll Spy Class
Example: komock.github.io/nav-scroll-spy
npm i --save-dev nav-scroll-spy
// Absolute path to module 'node_modules/nav-scroll-spy/src/js/nav-scroll-spy.js'
import NavScrollSpy from 'nav-scroll-spy';
let spy = new NavScrollSpy();
spy.init();
<nav>
<ul>
<li><a href="#section-1">section-1</a></li>
<li><a href="#section-2">section-2</a></li>
</ul>
</nav>
Option | Type | Default | Description |
---|---|---|---|
offset | number | 0 | Scroll offset |
currentClass | string | 'active' | Element class for current navigation item (or items). Class will be applied to link parent. |
selector | string (html) | 'nav a[href*="#"]' | Selector for navigation links |
throttle | number | 100 | Throttling window events (scroll and resize) to improve performance |
FAQs
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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.