cp_excalidraw_frame.html 1.2 KB

1234567891011121314151617181920212223242526
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>复制一个frame</title>
  6. <script src="js/util.js"></script>
  7. </head>
  8. <body>
  9. <script>
  10. 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\":{}}";
  11. // 时间戳 秒
  12. let timestamp = getTimeStamp();
  13. str = str.replace(/667374/g, timestamp);
  14. // 复制到剪切板
  15. copyUtil.copyText(str);
  16. setInterval(function () {
  17. copyUtil.getClipboardText().then(function (text) {
  18. if (text.indexOf(timestamp) > -1) {
  19. closeWindow();
  20. }
  21. });
  22. }, 500);
  23. </script>
  24. </body>
  25. </html>