
Security News
Opengrep Adds Apex Support and New Rule Controls in Latest Updates
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Javascript dialog alternative using promise. Supports alert, confirm, and prompt with text and password input.
Javascript dialog alternative using promise.
Using NPM:
npm install dialogjs --save
Then, add dialog.min.css
and dialog.min.js
from dist
directory to your project html file.
<link rel="stylesheet" type="text/css" href="npm_modules/dialogjs/dist/dialog.min.css">
<script type="text/javascript" src="npm_modules/dialogjs/dist/dialog.min.js"></script>
After required files are inserted, you can access Dialog
object from your script.
Display alert dialog box, can be used for displaying important information that requires user's attention.
Dialog.alert('Title','Message you want to show.')
.then(function(){
console.log("You clicked OK");
},function(){
console.log("You didn't click OK");
});
Display confirmation dialog box with Yes or No options.
Dialog.confirm('Question','Am I good enough?')
.then(function(){
console.log("You answered Yes");
},function(){
console.log("You answered No");
});
Display prompt dialog box with an input. Input types can be defined via option type
. Currently, possible values for input types are: text
(default) and password
.
Dialog.prompt('Dialog Title','Message to be displayed')
.then(function(value){
// user clicked OK button, access user input via 'value' variable.
console.log('Your input is: ' + value);
},function(){
// user clicked Cancel button or closed the dialog.
console.log("You clicked Cancel");
});
Dialog.prompt('Dialog Title','Message to be displayed', { type: 'password' })
.then(function(value){
// user clicked OK button, access user input via 'value' variable.
console.log('Your input is: ' + value);
},function(){
// user clicked Cancel button or closed the dialog.
console.log("You clicked Cancel");
});
This project is published under MIT license. This project was originally forked from coderaiser/smalltalk. Thanks to coderaiser for the great work of Smalltalk.
FAQs
Javascript dialog alternative using promise. Supports alert, confirm, and prompt with text and password input.
The npm package dialogjs receives a total of 3 weekly downloads. As such, dialogjs popularity was classified as not popular.
We found that dialogjs 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
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.