
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
A modern and simple modal
NPM
npm install --save modal.js
Download
See https://necolas.github.io/normalize.css/latest/normalize.css
Not recommended! My use of styles is disgusting, You are warned!
$().modal({"content": {"type":"text","data": "Hola mundo!" }});
$().modal({"content": {"type":"image", "data": "http://lorempixel.com/400/200/"}})
The parameter is json with this structure:
'content' : { //<-- Content!
'type' : String, //<-- Type of data entry. Default: text. It must exist on plugin.json
'data' : Object, //<-- Any data to show. Here.
'className' : String, //<-- Name of class on css who define style of content.
},
'shape' : { //<-- Shape!
'className' : String, //<-- Name of class on css who define style of the shape literally*
'style' : String //<-- Name of class on css who define style of the canvas of content*
}
'layout' : String, //<-- Define layout of modal*
'header' : { //<-- Header!
'icon' : String, //<-- If you wanna set a icon or a something on header but not content.
'title' : { //<-- Title!
'className' : String, //<-- Name of class on css who define style of title header.
'content' : String //<-- Text of title
}
},
'close' : { //<-- Close modal!
'button' : Boolean, //<-- True or empty or null create a close button. False dont.
'escape' : Boolean //<-- True or empty or null set key 'Esc' to close modal.
},
'acc' : { //<-- Accessibility time!
'text' : String //<-- Text to read for accessibility readers.
},
'btns' : [{ //<-- Buttons everywhere! Is an array of buttons.
'value' : String, //<-- Text display on button.
'shape' : String, //<-- Name of class on css who define a style of button.
'type' : String, //<-- Define event of button. Function, link or close modal.
'action' : String, //<-- Define funcion or link of type button.
'close' : Boolean, //<-- True or empty or null button close modal. False dont.
'key' : CharCode //<-- Charcode of key trigger of btn.
}],
'overlay' : { //<-- Overlay!
'className' : String, //<-- Overwrite style of overlay.
'click' : Boolean //<-- True, empty or null close modal on click overlay. False dont.
},
'width' : String //<-- Set with of modal. Auto for default.
You can modify defaults plugins.json and create diferents templates of modal. Plugins.json have this structure:
"text" : { //<-- Name for plugin.
"element" : "", //<-- Parent element of content.
"objAttrs": { //<-- Set attr to element. elm.attr = value
"innerHTML" : "",
"id" : ""
},
'attrs' : { //<-- Set attr to element. elm.setAttribute(attr, value)
},
"dfts" : { //<-- Overwrite defaults
"shape" : "",
"shapeStyle" : "",
"layout" : "",
"icon" : "",
"mb_clase" : ""
}
}
Use text plugin for guide you.
By default, Chrome on OS X and Safari on OS X allow very limited styling of
select
, unless a border property is set. The default font weight on optgroup
elements cannot safely be changed in Chrome on OSX and Safari on OS X.
Normalize.css is a project by Nicolas Gallagher, co-created with Jonathan Neal.
1.0.0 (December 21, 2014)
(Only the notable changes since public release)
FAQs
A simple modern modal
The npm package modal.js receives a total of 8 weekly downloads. As such, modal.js popularity was classified as not popular.
We found that modal.js 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
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.