From 5b0b52b20e49acee220a709ba7ef7a338d21a831 Mon Sep 17 00:00:00 2001 From: Dio Sylar <1044807034@qq.com> Date: Thu, 27 Jun 2024 11:37:26 +0800 Subject: [PATCH] =?UTF-8?q?vmoptions=E8=87=AA=E5=8A=A8=E5=A4=8D=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/static/js/index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/resources/static/js/index.js b/src/main/resources/static/js/index.js index 2c4a7a9..8f61c48 100644 --- a/src/main/resources/static/js/index.js +++ b/src/main/resources/static/js/index.js @@ -33,9 +33,14 @@ $(document).ready(function() { // Function to show VM options window.showVmoptins = function () { - alert("-javaagent:/(Your Path)/ja-netfilter/ja-netfilter.jar\n" + - "--add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED\n" + - "--add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED"); + var text = "-javaagent:/(Your Path)/ja-netfilter/ja-netfilter.jar\n" + + "--add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED\n" + + "--add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED"; + navigator.clipboard.writeText(text).then(function() { + alert("已复制:\n" + text); + }).catch(function(error) { + alert("复制失败: " + error); + }); }; // Function to copy license