mirror of
				https://github.com/Mabbs/mabbs.github.io
				synced 2025-11-04 02:12:01 -05:00 
			
		
		
		
	Update file post.html
This commit is contained in:
		
							parent
							
								
									934c04aea7
								
							
						
					
					
						commit
						b7ab4e6356
					
				@ -40,31 +40,34 @@ layout: default
 | 
				
			|||||||
      .join(""); // convert bytes to hex string
 | 
					      .join(""); // convert bytes to hex string
 | 
				
			||||||
    return hashHex;
 | 
					    return hashHex;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  var postContent = "文章标题:" + {{ page.title | jsonify }} +",文章内容:" + {{ page.content | strip_html | strip_newlines | jsonify }};
 | 
					  async function ai_gen(){
 | 
				
			||||||
  var postContentSign = await sha(postContent);
 | 
					    var postContent = "文章标题:" + {{ page.title | jsonify }} + ";文章内容:" + {{ page.content | strip_html | strip_newlines | jsonify }};
 | 
				
			||||||
  var outputContainer = document.getElementById("ai-output");
 | 
					    var postContentSign = await sha(postContent);
 | 
				
			||||||
  $.get("https://summary.mayx.eu.org/is_uploaded?id={{ page.url }}&sign=" + postContentSign, function (data) {
 | 
					    var outputContainer = document.getElementById("ai-output");
 | 
				
			||||||
    if (data == "yes") {
 | 
					    $.get("https://summary.mayx.eu.org/is_uploaded?id={{ page.url }}&sign=" + postContentSign, function (data) {
 | 
				
			||||||
      $.get("https://summary.mayx.eu.org/get_summary?id={{ page.url }}&sign=" + postContentSign, function (data2) {
 | 
					      if (data == "yes") {
 | 
				
			||||||
        outputContainer.textContent = data2;
 | 
					        $.get("https://summary.mayx.eu.org/get_summary?id={{ page.url }}&sign=" + postContentSign, function (data2) {
 | 
				
			||||||
      });
 | 
					          outputContainer.textContent = data2;
 | 
				
			||||||
    } else {
 | 
					        });
 | 
				
			||||||
      $.post("https://summary.mayx.eu.org/upload_blog?id={{ page.url }}", postContent, function (data) {
 | 
					      } else {
 | 
				
			||||||
        $.get("https://summary.mayx.eu.org/get_summary?id={{ page.url }}&sign=" + postContentSign);
 | 
					        $.post("https://summary.mayx.eu.org/upload_blog?id={{ page.url }}", postContent, function (data) {
 | 
				
			||||||
        const evSource = new EventSource("https://summary.mayx.eu.org/summary?id={{ page.url }}");
 | 
					          $.get("https://summary.mayx.eu.org/get_summary?id={{ page.url }}&sign=" + postContentSign);
 | 
				
			||||||
        outputContainer.textContent = "";
 | 
					          const evSource = new EventSource("https://summary.mayx.eu.org/summary?id={{ page.url }}");
 | 
				
			||||||
        evSource.onmessage = (event) => {
 | 
					          outputContainer.textContent = "";
 | 
				
			||||||
          if (event.data == "[DONE]") {
 | 
					          evSource.onmessage = (event) => {
 | 
				
			||||||
            evSource.close();
 | 
					            if (event.data == "[DONE]") {
 | 
				
			||||||
            return;
 | 
					              evSource.close();
 | 
				
			||||||
          } else {
 | 
					              return;
 | 
				
			||||||
            const data = JSON.parse(event.data);
 | 
					            } else {
 | 
				
			||||||
            outputContainer.textContent += data.response;
 | 
					              const data = JSON.parse(event.data);
 | 
				
			||||||
 | 
					              outputContainer.textContent += data.response;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        });
 | 
				
			||||||
      });
 | 
					      }
 | 
				
			||||||
    }
 | 
					    });
 | 
				
			||||||
  });
 | 
					  }
 | 
				
			||||||
 | 
					  ai_gen();
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<hr />
 | 
					<hr />
 | 
				
			||||||
<!-- <![endif]-->
 | 
					<!-- <![endif]-->
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user