
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@threespot/freeze-scroll
Advanced tools
This script provides a cross-browser way of preventing scroll on the body element. A common use case for this is when a modal window is open. Without this script, it’s easy for users to unknowingly scroll the page behind the modal and be disoriented when it’s closed.
Inspired by https://benfrain.com/preventing-body-scroll-for-modals-in-ios/
Note: Once Safari and iOS Safari support the “touch-action” CSS property (caniuse.com), we can simply toggle a class that adds the following:
.js-no-scroll,
.js-no-scroll body {
overflow: hidden;
touch-action: none;
}
/* Create class to allow scrolling on certain elements, like modal windows */
.allow-scroll { touch-action: auto !important; }
yarn add @threespot/freeze-scroll
import scroll from "@threespot/freeze-scroll";
// Disable scrolling
scroll.freeze();
// Enable scrolling
scroll.unfreeze();
This is free software and may be redistributed under the terms of the MIT license.
Threespot is an independent digital agency hell-bent on helping those, and only those, who are committed to helping others. Find out more at https://www.threespot.com.
FAQs
Prevent scrolling
The npm package @threespot/freeze-scroll receives a total of 160 weekly downloads. As such, @threespot/freeze-scroll popularity was classified as not popular.
We found that @threespot/freeze-scroll 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.