Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Customisable javascript video stream QR Code scanner
npm install scannqr
// ES6 import
import {QRScanner} from "/your-path-to-scanner/dist/scannqr.js";
// CommonJS require
const {QRScanner} = require("/your-path-to-scanner/dist/scannqr.js");
<script src="/your-path-to-scannqr/dist/scannqr.js"></script>
<form class="qrscanner__wrapper">
<button class="qrscanner__startBtn" type="button">Scan</button>
<input class="qrscanner__input"/>
<button class="qrscanner__submitBtn">Submit</button>
</form>
</div>
<link rel="stylesheet" href="/your-path-to-scannqr/dist/css/scannqr.css"/>
const qrscanner = new QRScanner({
wrapper: document.querySelector('.qrscanner__wrapper'),
startBtn: document.querySelector('.qrscanner__startBtn'),
output: document.querySelector('.qrscanner__input'),
submitBtn: document.querySelector('.qrscanner__submitBtn'),
//See list of all possible options below
});
wrapper
Type: HTMLElement
Element to append scanner
startElement
Type: HTMLElement
Element to commence scanning and calculate starting position
output
Type: String
Input element to output QR code message
submitBtn
Type: String
Submit button to click on successful QR code extraction
backBtnHTML
Type: string
Default:Go Back
HTML used for scanner background prior/instead of video display
handleSuccess
Type: Function
Default:
function() {
await this.outlineQRCode();
await this.stop();
if (this.output) this.output.value = this.QRCode.data;
if (this.submitBtn) this.submitBtn.click();
}
Customisable callback for successful QR code detection - default outlines QR code, populates input and submits form
primaryColor
Type: String
Default: #03a803
Primary color used for scanner e.g. used to draw on canvas
FAQs
Customisable javascript video scanner with the ability to scan QR codes
The npm package scannqr receives a total of 2 weekly downloads. As such, scannqr popularity was classified as not popular.
We found that scannqr 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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
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.