
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@todesktop/electron-selected-text-prebuild
Advanced tools
a utility to get selected text for Electron apps
Get selected text from any application using Electron's clipboard and robotjs
For Electron 9 and later, this module should only be used in the main process because robotjs is not context aware
$ npm install electron-selected-text
import { app } from "electron";
import { getSelectedText, registerShortcut } from "electron-selected-text";
const printSelectedText = (selectedText) => {
console.log(`Selected Text: ${selectedText}`);
};
getSelectedText().then(printSelectedText);
app.whenReady().then(() => {
const ret = registerShortcut("F6", printSelectedText);
if (!ret) {
console.warn("registration failed");
}
});
FAQs
a utility to get selected text for Electron apps
We found that @todesktop/electron-selected-text-prebuild 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.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.