
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
electron-capture-plugin
Advanced tools
Electron multi-screen screenshot plugin with annotation and multi-language support.
Electron Capture Plugin is a lightweight Electron plugin that supports multi-display screenshot capturing, annotations, Chinese/English interface switching, and is easy to integrate into your desktop applications.
Electron Capture Plugin 是一个轻量级的 Electron 插件,支持多屏幕截图、标注工具和中英文切换,方便集成到桌面应用。
Currently supports Windows 7 to Windows 11.
macOS support is under development.
目前支持 Windows 7 - Windows 11。
macOS 支持正在开发中。
npm install electron-capture-plugin
import { app, ipcMain, BrowserWindow, screen, desktopCapturer, dialog } from 'electron';
import { onLoad } from 'electron-capture-plugin';
let mainWindow: BrowserWindow | null = null;
const pluginContext = {
electron: { ipcMain, screen, BrowserWindow, desktopCapturer, dialog },
ipc: {
registerCommand: (channel, handler) => {
ipcMain.handle(channel, async (_, args) => await handler(args));
},
},
logger: (msg) => {
console.log(`[plugin log] ${msg}`);
},
config: {
lang: 'zh', // Optional: 'zh' | 'en'
color: '#409EFF', // Optional: customize main theme color
},
};
app.whenReady().then(async () => {
mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
},
});
await mainWindow.loadURL('your app entry point');
await onLoad(pluginContext);
if (pluginContext.exports) {
pluginContext.exports.onCaptureDone = (finalImageDataURL) => {
console.log('Capture completed:', finalImageDataURL);
mainWindow?.webContents.send('your-custom-capture-done-event', { image: finalImageDataURL });
};
}
});
const { ipcRenderer } = require('electron');
function requestCapture() {
ipcRenderer.send('screenshot-plugin/request-capture');
}
// Example: Bind to a button click
// 示例:按钮点击请求
document.getElementById('captureButton').addEventListener('click', requestCapture);
prepareCaptureWindow
is used to create and prepare capture windows. / prepareCaptureWindow
用于创建和准备截图窗口onCaptureDone
is called when screenshot is completed, returning the final image data URL. / onCaptureDone
在截图完成时被调用,返回截图图片数据URLMIT License.
FAQs
Electron multi-screen screenshot plugin with annotation and multi-language support.
The npm package electron-capture-plugin receives a total of 0 weekly downloads. As such, electron-capture-plugin popularity was classified as not popular.
We found that electron-capture-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.