From 8597fed446eaf8a22729649414e67bc34d6d78a7 Mon Sep 17 00:00:00 2001 From: Handle Date: Wed, 23 Jan 2019 00:12:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=B0=E5=9C=A8=E4=BD=BF=E7=94=A8=E6=88=AA?= =?UTF-8?q?=E5=9B=BE=E5=BF=AB=E6=8D=B7=E9=94=AE=E6=88=AA=E5=9B=BE=E7=9A=84?= =?UTF-8?q?=E5=90=8C=E6=97=B6=EF=BC=8C=E4=BC=9A=E8=87=AA=E5=8A=A8=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E6=88=AA=E5=9B=BE=E5=88=B0=E6=82=A8=E7=9A=84=E5=89=AA?= =?UTF-8?q?=E8=B4=B4=E6=9D=BF=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/main/mainLoader.js | 8 ++++++-- package.json | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/main/mainLoader.js b/bin/main/mainLoader.js index d5662f5..3672485 100644 --- a/bin/main/mainLoader.js +++ b/bin/main/mainLoader.js @@ -3,9 +3,11 @@ const fs = require('fs') const path = require('path') const electron = require('electron') -const { ipcRenderer } = electron +const { ipcRenderer, remote } = electron const userConfigs = require('../../configs-user.json') +const clipboard = remote.clipboard + /** * @type {Electron.WebviewTag} */ @@ -82,7 +84,9 @@ ipcRenderer.on('take-screenshot', () => { if (webContents) { webContents.capturePage(image => { ipcRenderer.send('application-message', 'take-screenshot', image.toPNG()) - showScreenshotLabel(image.toDataURL()) + const dataURL = image.toDataURL() + showScreenshotLabel(dataURL) + clipboard.writeImage(image) }) } }) diff --git a/package.json b/package.json index ca11288..3378ace 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "majsoul-plus-client", - "version": "1.8.1", + "version": "1.8.2", "productName": "Majsoul Plus", "author": "MajsoulPlus Team", "description": "Majsoul Plus",