Add copypaste clipboard
MODIFY
HiddenWallet/HiddenWallet.API/Program.cs
HiddenWallet/HiddenWallet.API/Program.cs
@@ -8,6 +8,7 @@ using System.Diagnostics;
using System.Threading.Tasks;
using Microsoft.DotNet.PlatformAbstractions;
using System.Runtime.InteropServices;
+using NBitcoin;
namespace HiddenWallet.API
{

MODIFY
HiddenWallet/HiddenWallet.GUI/app/js/default.js
HiddenWallet/HiddenWallet.GUI/app/js/default.js
@@ -35,3 +35,43 @@ document.getElementById("title").innerHTML = document.title;
function writeHint(message) {
document.getElementById('hint').innerHTML = message;
}
+
+'use strict';
+
+const electron = require('electron');
+const remote = electron.remote;
+const Menu = remote.Menu;
+
+const EditMenu = Menu.buildFromTemplate([{
+ label: 'Copy',
+ role: 'copy',
+}, {
+ label: 'Paste',
+ role: 'paste',
+},
+]);
+
+const CopyMenu = Menu.buildFromTemplate([{
+ label: 'Copy',
+ role: 'copy',
+},
+]);
+
+document.body.addEventListener('contextmenu', (e) => {
+ e.preventDefault();
+ e.stopPropagation();
+
+ let node = e.target;
+
+ while (node) {
+ if (node.nodeName.match(/^(input|textarea)$/i) || node.isContentEditable) {
+ EditMenu.popup(remote.getCurrentWindow());
+ break;
+ }
+ else {
+ CopyMenu.popup(remote.getCurrentWindow());
+ break;
+ }
+ node = node.parentNode;
+ }
+});
\ No newline at end of file

MODIFY
HiddenWallet/HiddenWallet.GUI/main.js
HiddenWallet/HiddenWallet.GUI/main.js
@@ -57,7 +57,6 @@ app.on('activate', function () {
const os = require('os');
var apiProcess;
-
function startApi() {
var spawn = require('child_process').spawn;
// run server

Add copypaste clipboard