
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@servicensw/drop-menu
Advanced tools
Service NSW package documentation and examples
(Login credentials required)
npm install @servicensw/drop-menu --save-dev
CSS
@import '@servicensw/drop-menu';
@import 'servicensw-drop-menu';
@import url('dist/drop-menu.css');
<link href="dist/drop-menu.css" rel="stylesheet" type="text/css">
JS
The recommended usage is of ES modules, to take advantage of code-splitting.
import DropMenu from "@servicensw/drop-menu"
const dropMenus = document.querySelectorAll(".drop-button:not(.is-excluded)")
dropMenus.forEach((element, index) => {
new DropMenu(element, index)
})
Legacy usage;
<script src="dist/drop-menu.js" type="text/javascript"></script>
(initialized for all .drop-button:not(.is-excluded)
elements)const DropMenu = require("@servicensw/drop-menu")
(initialize yourself)HTML
<div class="drop-button__wrapper">
<p id="dropMenuDescription">Select an option from the list</p>
<div class="drop-button">
<ul aria-label="Drop menu" aria-describedby="dropMenuDescription">
<li><a href="#">Option 1</a></li>
<li><a href="#">Option 2</a></li>
<li><a href="#">Option 3</a></li>
<li><a href="#">Option 4</a></li>
</ul>
</div>
</div>
FAQs
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
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.