Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
browserify-widget
Advanced tools
Readme
It makes it a bit easier to create html widgets with the help of browserify.
To create a widget you need this and the inherits
module:
var Widget = require('browserify-widget');
var html = '<button id="like-button">Click to like</button><span class="text"></span>';
var events = {
'like-button:click': function() {
this.querySelector('.text').innerHTML = 'You like this!';
}
}
var myWidget = Widget(html);
myWidget.addEvents(events);
You can avoid writing the html directly into your javascripts by using the brfs browserify transform.
The following functions are defined through browserify-widget
:
Register custom events. The keys are the css selector plus the event (without
the 'on'), the value is the function which will be called when the event occurs
on this element. The this
of the to be called function is automatically set
to the container element of the widget itself (remember: a widget can
be rendered multiple times).
Basically the same like .addEvents
but with only one event.
Render the widget into an existing DOM element. el
can be an actual element or a selector.
Appends the widget to a DOM element. el
can be an actual element or a selector.
FAQs
Easily create html widgets with browserify
We found that browserify-widget 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.