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.
scrollmirror
Advanced tools
npm i scrollmirror
import ScrollMirror from "scrollmirror";
/** Mirror all divs that match the class `.scroller` */
new ScrollMirror(document.querySelectorAll(".scroller"));
You can pass in a few additional options to ScrollMirror as the second argument:
new ScrollMirror(document.querySelectorAll(".scroller"), options);
The type signature of the options object:
type Options = {
proportional: boolean;
vertical: boolean;
horizontal: boolean;
}
proportional
Type: boolean
, default: true
. Should the scrolling speed be adjusted so that all mirrored elements reach the maximum scroll position at the same time?
vertical
Type: boolean
, default: true
. Should the vertical scroll position be mirrored?
horizontal
Type: boolean
, default: true
. Should the horizontal scroll position be mirrored?
There are already a few libraries out there that do the same thing. But all I could find had some limitations (For example, react-scroll-sync needs React, syncscroll doesn't provide an NPM package).
Also, this simple package gave me an excuse to play around with the tooling involved with creating a robust open source npm
package:
[0.0.2] - 2023-11
FAQs
Sync the scroll position of multiple elements on your page
The npm package scrollmirror receives a total of 1,377 weekly downloads. As such, scrollmirror popularity was classified as popular.
We found that scrollmirror demonstrated a healthy version release cadence and project activity because the last version was released less than 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.