1234567891011121314151617181920212223242526 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>复制一个frame</title>
- <script src="js/util.js"></script>
- </head>
- <body>
- <script>
- let str = "{\"type\":\"excalidraw/clipboard\",\"elements\":[{\"type\":\"embeddable\",\"version\":180,\"versionNonce\":1920335448,\"isDeleted\":false,\"id\":\"f9LOsIKv8drPM8aOetFXl\",\"fillStyle\":\"hachure\",\"strokeWidth\":1,\"strokeStyle\":\"solid\",\"roughness\":1,\"opacity\":100,\"angle\":0,\"x\":864.2622041015625,\"y\":232.2603759765625,\"strokeColor\":\"#000000\",\"backgroundColor\":\"transparent\",\"width\":722.40234375,\"height\":318.40625,\"seed\":607107403,\"groupIds\":[],\"frameId\":null,\"roundness\":null,\"boundElements\":[],\"updated\":1704786477631,\"link\":\"https://web.tianyunperfect.cn/simple/edit_online.html?id=667374\",\"locked\":false,\"validated\":true}],\"files\":{}}";
- // 时间戳 秒
- let timestamp = Date.parse(new Date()) / 1000;
- str = str.replace(/667374/g, timestamp);
- // 复制到剪切板
- copyUtil.copyText(str);
- setInterval(function () {
- copyUtil.getClipboardText().then(function (text) {
- if (text.indexOf(timestamp) > -1) {
- closeWindow();
- }
- });
- }, 500);
- </script>
- </body>
- </html>
|