
Research
/Security News
jscrambler npm Package Compromised in Supply Chain Attack
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.
youtube-lite
Advanced tools
Embed lazy-loaded YouTube videos and playlists and uses the no-cookie version of YouTube for privacy.
By @craigbuckler but there are lots of alternatives that gave me inspiration.
Load the script anywhere in your HTML page as an ES6 module (2.2Kb):
<script type="module" src="./dist/youtube-lite.min.js"></script>
or using a CDN:
<script src="https://cdn.jsdelivr.net/npm/youtube-lite/dist/youtube-lite.min.js"></script>
Add single video elements to the page using their YouTube ID:
<youtube-lite
video="wbuBs7b6RDQ"
></youtube-lite>
The standard placeholder will be used but a custom image can be defined:
<youtube-lite
video="wbuBs7b6RDQ"
placeholder="./video.png"
></youtube-lite>
Add playlist video elements to the page using their YouTube ID. Note that a placeholder image must be set manually:
<youtube-lite
playlist="PLjpnFshmVzHZV_H5GslyUrV4Kr8R2hsxl"
placeholder="https://i.ytimg.com/vi/Z3l8Iec4dBk/hqdefault.jpg"
></youtube-lite>
Use custom YouTube parameters:
<youtube-lite
video="wbuBs7b6RDQ"
params="start=10&end=30&controls=0"
></youtube-lite>
The elements can be styled like any other element, e.g.
youtube-lite {
display: block;
width: 100%;
max-width: 50em;
margin: 1em auto;
}
The element's attributes can be changed at any time using JavaScript to update the current video, e.g.
// get first <youtube-lite> element
const player = document.querySelector('youtube-lite');
// change video
player.setAttribute('video', 'hKsxtmS8WIc');
1.0.0: 29 March 2021
FAQs
Lazy-loaded YouTube video and playlist embed.
We found that youtube-lite 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
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.

Security News
/Research
Compromised Injective SDK npm version 1.20.21 exfiltrates wallet private keys and mnemonics through fake telemetry functionality.