
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
medium-style-confirm
Advanced tools
mscConfirm(title, okCallback)
:mscConfirm("Delete?",function(){
alert("Post deleted");
});
mscConfirm(title, subheading, okCallback)
:mscConfirm("Delete", "Are you sure you want to delete this post?", function(){
alert("Post deleted");
});
mscConfirm(title, subheading, okCallback, cancelCallback)
:mscConfirm("Delete", "Are you sure you want to delete this post?", function(){
alert("Post deleted");
},
function() {
alert('Cancelled');
});
mscConfirm(object)
:mscConfirm({
title: 'License',
subtitle: 'Do you accept the licese agreement?', // default: ''
okText: 'I Agree', // default: OK
cancelText: 'I Dont', // default: Cancel
dismissOverlay: true, // default: false, closes dialog when clicked on overlay.
onOk: function() {
alert('Awesome.');
},
onCancel: function() {
alert('Sad face :( .');
}
});
prompt()
mscPrompt
and mscConfirm
is same. Just the onOk
callback of prompt receives a value
parameter entered into the prompt.mscPrompt(object)
:mscPrompt({
title: 'Subscribe',
subtitle: 'Enter your email to subscribe to the newsletter.', // default: '',
defaultValue: 'email', // default: '', this value will be prefilled in the prompt box
okText: 'Subscribe', // default: OK
cancelText: 'Cancel', // default: Cancel
dismissOverlay: true, // default: false, closes dialog when clicked on overlay.
placeholder: 'Enter your email', // placeholder value to show in input textbox
onOk: function(value) {
mscAlert(value+ " has been subscribed to the newsletter.");
},
onCancel: function() {
mscAlert('Sad face :( .');
}
});
alert()
mscAlert(text)
:mscAlert("Hello World.");
mscAlert(object)
:mscAlert({
title: 'Done',
subtitle: 'You have been registered successfully. \n Your reg. ID is 4321', // default: ''
okText: 'Close', // default: OK
});
bower install medium-style-confirm
or download msc-style.css and msc-script.js.msc-style.css
in html as <link rel="stylesheet" href="msc-style.css">
just before ending head
tag.msc-script.js
in html as <script src="msc-script.js">
just before ending body
tag.mscConfirm()
function as shown above.FAQs
A medium.com like modal dialog UI library.
We found that medium-style-confirm 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
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.