
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
modal-utility
Advanced tools
This module provides Javascript and Sass to enable creating modal windows. General UI Events are provided by default (see parameters section) in relation to the modals:
npm install modal-utility
You only need to import these two files into your build:
dist/_modal-utility.scss
dist/modal-utility.js
The Javascript is an ES6 module
Once its imported, you'll need to execute a setup function like so:
const modalUtility = ModalUtility(document);
Then you can use a set of functions returned, like so:
config options
const options = {
title: 'This is my title',
dismissable: true
};
create some content
const modalContents = document.createElement('p');
modalContents.textContent = 'Hello, Modal';
create a modal
let modal = modalUtility.createModal(document, options);
set the content into the modal
modalUtility.setContents(modal, modalContents);
show the modal
modalUtility.showModal(document, modal);
hide the modal
modalUtility.hideModal(document);
Setting | Description |
---|---|
title | The text to display in the title area of the modal |
dismissable | True if the modal removal events should be bound, False if not. (default: true) |
additionalClasses | An array of classes to set on the modal |
headingClasses | An array of classes to set on the heading |
Parameter | Purpose |
---|---|
options | An object containing various settings, see below |
Parameter | Purpose |
---|---|
modal | a modal created with ModalUtility, contents will be inserted into its content area |
contents | a DOM Element containing 0 or more other Elements to be inserted |
Parameter | Purpose |
---|---|
modal | a modal created with ModalUtility, appended to the given element |
FAQs
A set of functions that allow creating accessible modals.
We found that modal-utility demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.