
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.
@todesktop/plugin-selected-text
Advanced tools
Retrieve the selected text from any application.
Install @todesktop/client-selected-text
in your client-side application using
npm install @todesktop/client-selected-text
Installation of the plugin package is also necessary. Using ToDesktop Builder, navigate to Plugins. Click on the Explore button for "Selected Text" and install the package.
Gets selected text by synthesizing the keyboard shortcut "CommandOrControl+c" then reading text from the clipboard
getSelectedText
import { getSelectedText } from "@todesktop/client-selected-text";
getSelectedText().then((selectedText) => console.log(selectedText));
registerShortcut
Registers a global shortcut of accelerator
. The callback
is called with the selected text when the registered shorcut is pressed by the user
Returns true
if the shortcut was registered successfully
import { registerShortcut } from "@todesktop/client-selected-text";
const isRegistered = registerShortcut("F6", (selectedText) =>
console.log(selectedText)
);
unregisterShortcut
Unregisters a global shortcut of accelerator
and is equivalent to electron.globalShortcut.unregister
import { unregisterShortcut } from "@todesktop/client-selected-text";
unregisterShortcut("F6"); // void
FAQs
Retrieve the selected text from any application.
The npm package @todesktop/plugin-selected-text receives a total of 857 weekly downloads. As such, @todesktop/plugin-selected-text popularity was classified as not popular.
We found that @todesktop/plugin-selected-text demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
/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.