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.
alpinejs-scroll-amount
Advanced tools
Track the users scroll position and their progress on the page 🤿
<script
defer
src="https://unpkg.com/alpinejs-scroll-amount@latest/dist/scroll-amount.min.js"
></script>
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
yarn add -D alpinejs-scroll-amount
npm install -D alpinejs-scroll-amount
import Alpine from 'alpinejs'
import scrollAmount from 'alpinejs-scroll-amount'
Alpine.plugin(scrollAmount)
Alpine.start()
<div
x-data="{ scrollPos: {} }"
x-init="scrollPos = $scrollAmount"
x-on:scroll.window="scrollPos = $scrollAmount"
>
<span
class="h-px bg-green-500"
:class="{ 'bg-green-600': scrollPos.end }"
:style="{ width: `${scrollPos.percent}%` }"
>
</span>
<article> ... </article>
</div>
This is a basic example of showing a progress bar based on the user scroll.
return {
px: 0,
percent: 0,
start: true / false,
end: true / false,
}
FAQs
Track the users scroll position and their progress on the page 🤿
The npm package alpinejs-scroll-amount receives a total of 290 weekly downloads. As such, alpinejs-scroll-amount popularity was classified as not popular.
We found that alpinejs-scroll-amount 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.