tianyunperfect 1 anno fa
parent
commit
fa080e1cb7
2 ha cambiato i file con 8 aggiunte e 51 eliminazioni
  1. 0 12
      simple-demo/edit_online.html
  2. 8 39
      tmp/tmp.html

+ 0 - 12
simple-demo/edit_online.html

@@ -121,18 +121,6 @@
         // source - 表示触发变化的原因,如'user'(用户输入)或'silent'(编程方式修改)
 
         // 在这里执行你想要的操作,比如更新数据或执行其他逻辑
-
-        // 获取顶级父类的url
-        let url = window.top.location.href;
-        if (getQueryStringByUrl(url, "share_id")) {
-            // 如果是分享的页面,不同步
-            return;
-        }
-        if (getQueryStringByUrl(url, "version") && getQueryStringByUrl(url, "version").startsWith("back_read")) {
-            return;
-        }
-
-
         console.log("内容发生变化");
         showTextOnTopRight("待同步");
         // 防抖 1秒内同步一次

+ 8 - 39
tmp/tmp.html

@@ -1,46 +1,15 @@
 <!DOCTYPE html>
-<html lang="en">
+<html>
 <head>
-    <meta charset="UTF-8">
-    <title>Title</title>
-    <style>
-        body{
-            background: #00FFFF;
-        }
-    </style>
+    <title>Page Swipe</title>
+    <script src="jquery.js"></script>
+<!--    支持中文-->
+    <meta charset="utf-8">
+
 </head>
 <body>
-<!--下载按钮-->
-<button onclick="downloadDivContent('#test123')">下载</button>
-<div id="test123">
-    <h1>测试</h1>
-    <p>测试内容</p>
+<div>
+    $2$的平方是指$2$乘以$2$。\n\n解答过程如下:\n\n$2\\times2$ $=4$所以,$2$的平方等于$4$。
 </div>
-<script>
-    function downloadDivContent(selector) {
-        // 获取目标div的内容
-        var targetDiv = document.querySelector(selector).innerHTML;
-
-        // 创建Blob对象
-        var blob = new Blob([targetDiv], { type: 'text/html' });
-
-        // 创建下载链接
-        var downloadLink = document.createElement('a');
-        downloadLink.href = URL.createObjectURL(blob);
-
-        // 设置下载链接的属性
-        downloadLink.download = 'div_content.html'; // 设置文件名
-        downloadLink.style.display = 'none'; // 隐藏下载链接
-
-        // 将下载链接添加到页面中
-        document.body.appendChild(downloadLink);
-
-        // 模拟用户点击下载链接
-        downloadLink.click();
-
-        // 清理下载链接
-        document.body.removeChild(downloadLink);
-    }
-</script>
 </body>
 </html>