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.
A simple utility to display modal box
npm --save modal-box
Include the downloaded script in your page.
See example.html for some examples
// Content can be any HTMLElement, like an iframe for example.
var content = document.createElement('iframe');
content.src = [....];
content.style.width = '1000px';
content.style.height = '800px';
// Open the modal box with the given content
Coveo.ModalBox.open(content);
// Close all open modal box
Coveo.ModalBox.close();
// When you create a modal box, you can pass additional options
var content = createSomeContent();
var modalBox = Coveo.ModalBox.open(content, {
title : 'This is a title',
overlayClose : true
});
Type : Boolean
Specify if you wish to open the modal box full screen. Default is false
. If false, the modal box will fit the size of the content.
Type : Boolean
Specify that you wish the modal box to close when the user click on the title. Default is false
.
Type : Boolean
Specify if you wish to close the modal box when the overlay (black background) is clicked. Default is false
.
Type : string
Specify that you wish to add a prefix to the class name of the modal box container, to not clash with existing css in the page
Type : number
Specify the button you wish to create for the modal box.
Possible buttons :
Can use multiple button like so :
var modalBox = Coveo.ModalBox.open(content, {
buttons: Coveo.ModalBox.BUTTON.OK | Coveo.ModalBox.BUTTON.APPLY | Coveo.ModalBox.BUTTON.CANCEL
});
When you create a modal box, you receive a modal box object
var content = createSomeContent();
var modalBox = Coveo.ModalBox.open(content);
Type : HTMLElement
The whole modal box HTMLElement (the top most container);
Type : HTMLElement
The clickable overlay, which can close the modal box if needed.
Type : HTMLElement
The wrapper around the the content given to create the modal box
Type : HTMLElement
The wrapper that contains all the given button to create the modal box
Type : HTMLElement
The content that was given to create the modal box
Type : Function
The function that you can call to close this instance of the modal box
Feel free to override the css with your own stuff, or modify the src/modalBox.css
file
npm install
// Gulp globally if you don;t already have it
npm install -g gulp
gulp
Generated css + js under bin/
FAQs
Small utility lib to display a modal box
We found that modal-box 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.