Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Zoom an image to full-screen, as seen on Medium.com. It uses transforms for buttery smoothness, but should still work on older browsers given polyfills for classList & bind. Demo here
Install using Duo or NPM for use with browserify.
$ npm install image-zoom
var Zoom = require('bmcmahen/image-zoom');
or use the standalone build in dist
using the global Imagezoom
.
You can use markup (much like Bootstrap) for initiating zoom on certain elements.
<img class='thumb' src='inst6.jpg' data-zoom-padding='20' data-zoom-url='inst6.jpg' data-zoom-overlay='true'>
<script src='imagezoom.js'></script>
Or you can use the javascript API, like in the example below.
<img class='thumb' src='inst6.jpg'>
<script>
var ImageZoom = require('image-zoom');
var img = document.querySelector('img');
var zoom = new Imagezoom(img).overlay().padding(350);
img.onclick = function(e){
// stop propagation if we want to retain our HTML api
// in other parts of the site.
e.stopPropagation();
zoom2.show();
};
// unbind our delegate listener if we aren't
// using the HTML api.
zoom.stopListening();
</script>
Zoom in.
Zoom out.
Enable the overlay when zooming into the image.
Set the padding of the zoomed image.
Use a plugin.
var zoom = require('image-zoom');
var z = zoom(document.querySelector('img'));
z.on('shown', function(){
// our element is zoomed in
});
MIT
FAQs
A simple thumbnail viewer, like that found on Medium.com or iOS
The npm package image-zoom receives a total of 14 weekly downloads. As such, image-zoom popularity was classified as not popular.
We found that image-zoom 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 malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.