From 5a389246d3b25f3c5f3d712b027a7a62d77d043f Mon Sep 17 00:00:00 2001 From: y1ndan <53508617+y1ndan@users.noreply.github.com> Date: Thu, 3 Dec 2020 23:50:21 +0800 Subject: [PATCH] docs: update the way to get cookie & fix issue #32 --- README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c936749..86ed40b 100644 --- a/README.md +++ b/README.md @@ -46,13 +46,18 @@ Genshin Impact Helper * 复制以下代码 ``` -JSON.stringify({ - Cookie: document.cookie -}); +var cookie = document.cookie; +var ask = confirm('Cookie:' + cookie + '\n\n是否复制内容到剪切板?'); +if (ask == true) { + copy(cookie); + msg = cookie; +} else { + msg = 'Cancel'; +} ``` * 按`F12`,打开`开发者工具`,找到`Console`并点击 -* 命令行粘贴代码并运行,获得类似`"{"Cookie":"xxxxxx"}"`的输出信息 -* `xxxxxx`部分即为所需复制的`Cookie` +* 命令行粘贴代码并运行,获得类似`Cookie:xxxxxx`的输出信息 +* `xxxxxx`部分即为所需复制的`Cookie`,点击确定复制 ### 3. 添加 Cookie 至 Secrets