Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
dropmic is a lightweight dropdown plugin written in pure javascript
Method | Procedure |
---|---|
Bower | bower install dropmic --save |
NPM | npm install dropmic --save |
Download | Download zip |
Then dropmic have some css you will have to add (feel free to custom it for a better integration in your UI):
<link rel="stylesheet" href="dist/dropmic.css">
Finally just link the dropmic's code at the end of your document:
<script src="dist/dropmic.js"></script>
data-dropmic-btn
attribute to your buttondropmic
css classdata-dropmic-direction
attribute to the span (default behavior: bottom-right
):data-dropmic-direction="top-left"
data-dropmic-direction="top-right"
data-dropmic-direction="top-middle"
data-dropmic-direction="bottom-left"
data-dropmic-direction="bottom-right"
data-dropmic-direction="bottom-middle"
data-dropmic
attribute to you span for target it.Example:
<span class="dropmic" data-dropmic="42"
data-dropmic-direction="bottom-right">
<button data-dropmic-btn>click me</button>
</span>
var dropmic = new Dropmic(document.querySelector('[data-dropmic="42"]'));
You can create the content by yourself or use the API.
<div class="dropmic-menu">
is needed, otherwise you can completely customize the content)<span class="dropmic" data-dropmic="42" data-dropmic-direction="bottom-right">
<button data-dropmic-btn>click me</button>
<div class="dropmic-menu">
<div class="dropmic-menu__custom">Custom content</div>
<ul class="dropmic-menu__list">
<li class="dropmic-menu__listItem">
<a class="dropmic-menu__listContent" href="http://example.com">label link</a>
</li>
<li class="dropmic-menu__listItem">
<button class="dropmic-menu__listContent">label button</button>
</li>
</ul>
</div>
</span>
Name | Parameter type(s) | Description |
---|---|---|
addLink(label, url) | string or int, string | Add a link |
addBtn(label, callback) | string or int, function | Add a button |
addLabel(label) | string or int | Add a text label |
setCustomContent(content) | string | Set a custom content |
open() | Open your dropdown | |
close() | Close your dropdown |
Example:
dropmic.setCustomContent("toto custom");
dropmic.addLink('link label', 'http://example.com');
dropmic.addBtn('close dropdown', function() {
dropmic.close();
});
dropmic.addLabel('text label');
Released under the MIT LICENSE Developed by Robin Parisi and Théotix
FAQs
A lightweight dropdown plugin
The npm package dropmic receives a total of 8 weekly downloads. As such, dropmic popularity was classified as not popular.
We found that dropmic 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.