Security News
How Threat Actors are Abusing GitHub’s File Upload Feature to Host Malware
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
js-alert
Advanced tools
Readme
A simple JavaScript alert manager.
// Import as an ESM module
import JSAlert from 'js-alert'
<!-- ... or include directly in your HTML code -->
<script src="https://unpkg.com/js-alert/dist/jsalert.min.js"></script>
// Show a plain alert
JSAlert.alert("This is an alert.");
// Show an alert with a title and custom dismiss button
JSAlert.alert("Your files have been saved successfully.", "Files Saved", "Got it");
// Show multiple alerts (alerts are automatically queued)
JSAlert.alert("This is the first alert.");
JSAlert.alert("This is the second alert.");
JSAlert.alert("This is the third and final alert.");
// Automatically dismiss alert
JSAlert.alert("This will only last 10 seconds").dismissIn(1000 * 10);
// Event when dismissed
JSAlert.alert("This one has an event listener!").then(function() {
console.log("Alert dismissed!");
});
// Show a confirm alert
JSAlert.confirm("Are you sure you want to delete this file?").then(function(result) {
// Check if pressed yes
if (!result)
return;
// User pressed yes!
JSAlert.alert("File deleted!");
});
// Create an alert with custom buttons
var alert = new JSAlert("My text", "My title");
alert.addButton("Yes").then(function() {
console.log("Alert button Yes pressed");
});
alert.addButton("No").then(function() {
console.log("Alert button No pressed");
});
alert.show();
See all tests here.
FAQs
A simple JavaScript popup alert manager.
The npm package js-alert receives a total of 1,098 weekly downloads. As such, js-alert popularity was classified as popular.
We found that js-alert 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
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.