mirror of
https://github.com/Mabbs/mabbs.github.io
synced 2026-01-10 21:11:46 +08:00
Compare commits
27 Commits
AR-Backup-
...
AR-Backup-
| Author | SHA1 | Date | |
|---|---|---|---|
| b666bd16b2 | |||
| bc094788c2 | |||
| c0b1009935 | |||
| 129c4d1b5b | |||
| a8b9118a20 | |||
| dff8a2d2c9 | |||
| 2952d9f63e | |||
| 3de3d63d77 | |||
| 3dab9f333a | |||
| 85aa965218 | |||
| 0e065bf282 | |||
| 680afdca5a | |||
| 9e7e727897 | |||
| f5accbcad4 | |||
| d3ef0a278b | |||
| 38c549606e | |||
| 443d65ac50 | |||
| c8ce8de1d9 | |||
| 03d9517241 | |||
| 9b9efd0f60 | |||
| 07a3d18350 | |||
| 550321e80a | |||
| 50c6c49c4c | |||
| 593b4fa003 | |||
| 46f1b8d742 | |||
| 7a525073f9 | |||
| dc37b70586 |
@ -79,7 +79,7 @@
|
||||
background-color: rgba(74, 59, 114,0.9);
|
||||
}
|
||||
.live_talk_input_name_body{
|
||||
width:70px;
|
||||
width:100px;
|
||||
box-sizing:border-box;
|
||||
height:24px;
|
||||
border: 2px solid rgb(223, 179, 241);
|
||||
|
||||
@ -158,7 +158,7 @@ if(!norunFlag){
|
||||
function showHitokoto(){
|
||||
if(sessionStorage.getItem("Sleepy")!=="1"){
|
||||
if(!AITalkFlag){
|
||||
$.getJSON('https://v1.hitokoto.cn/',function(result){
|
||||
$.getJSON('https://hitokoto.mayx.eu.org/',function(result){
|
||||
talkValTimer();
|
||||
showMessage(result.hitokoto, 0);
|
||||
});
|
||||
@ -188,7 +188,26 @@ if(!norunFlag){
|
||||
if(Array.isArray(text)) text = text[Math.floor(Math.random() * text.length + 1)-1];
|
||||
//console.log('showMessage', text);
|
||||
$('.message').stop();
|
||||
$('.message').html(text);
|
||||
if(text instanceof EventSource){
|
||||
var outputContainer = $('.message')[0];
|
||||
var eventFlag = false;
|
||||
text.onmessage = (event) => {
|
||||
if (event.data == "[DONE]") {
|
||||
text.close();
|
||||
return;
|
||||
} else {
|
||||
if(!eventFlag){
|
||||
talkValTimer();
|
||||
outputContainer.textContent = "";
|
||||
eventFlag = true;
|
||||
}
|
||||
const data = JSON.parse(event.data);
|
||||
outputContainer.textContent += data.response;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$('.message').html(text);
|
||||
}
|
||||
$('.message').fadeTo(200, 1);
|
||||
//if (timeout === null) timeout = 5000;
|
||||
//hideMessage(timeout);
|
||||
@ -275,36 +294,18 @@ if(!norunFlag){
|
||||
});
|
||||
$('#talk_send').on('click',function(){
|
||||
var info_ = $('#AIuserText').val();
|
||||
var userid_ = $('#AIuserName').val();
|
||||
// var userid_ = $('#AIuserName').val();
|
||||
let add_id = "";
|
||||
if($('#load_this').prop("checked")){
|
||||
add_id = "&id="+encodeURIComponent($('#post_id').val());
|
||||
}
|
||||
if(info_ == "" ){
|
||||
showMessage('写点什么吧!',0);
|
||||
return;
|
||||
}
|
||||
if(userid_ == ""){
|
||||
showMessage('聊之前请告诉我你的名字吧!',0);
|
||||
return;
|
||||
}
|
||||
showMessage('思考中~', 0);
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: talkAPI,
|
||||
data: {
|
||||
"info": info_,
|
||||
"userId": userid_
|
||||
},
|
||||
success: function(res) {
|
||||
if(res.intent.code !== 0){
|
||||
talkValTimer();
|
||||
showMessage('似乎有什么错误,请和站长联系!',0);
|
||||
}else{
|
||||
talkValTimer();
|
||||
showMessage(res.results[0].values.text,0);
|
||||
}
|
||||
console.log(res);
|
||||
$('#AIuserText').val("");
|
||||
sessionStorage.setItem("live2duser", userid_);
|
||||
}
|
||||
});
|
||||
const evSource = new EventSource(talkAPI + "?info=" + encodeURIComponent(info_) + add_id);
|
||||
showMessage(evSource);
|
||||
});
|
||||
}else{
|
||||
$('#showInfoBtn').hide();
|
||||
@ -379,11 +380,11 @@ if(!norunFlag){
|
||||
showMessage('音乐似乎加载不出来了呢!',0);
|
||||
});
|
||||
}
|
||||
//获取用户名
|
||||
var live2dUser = sessionStorage.getItem("live2duser");
|
||||
if(live2dUser !== null){
|
||||
$('#AIuserName').val(live2dUser);
|
||||
}
|
||||
// //获取用户名
|
||||
// var live2dUser = sessionStorage.getItem("live2duser");
|
||||
// if(live2dUser !== null){
|
||||
// $('#AIuserName').val(live2dUser);
|
||||
// }
|
||||
//获取位置
|
||||
var landL = sessionStorage.getItem("historywidth");
|
||||
var landB = sessionStorage.getItem("historyheight");
|
||||
|
||||
@ -16,13 +16,16 @@ Powered by [Jekyll](https://github.com/jekyll/jekyll)
|
||||
[Simple-Jekyll-Search](https://github.com/christian-fei/Simple-Jekyll-Search)
|
||||
|
||||
## 使用的网络资源
|
||||
[Github](https://github.com/) | 包含:
|
||||
[Github](https://github.com/) | 包含:
|
||||
- Issue
|
||||
- Pages
|
||||
- Git
|
||||
|
||||
[Cloudflare](https://www.cloudflare.com/) | 包含:
|
||||
- CDN、规则以及缓存
|
||||
- Workers、D1 SQL 数据库、Vectorize 数据库、AI
|
||||
|
||||
[网易云音乐](https://music.163.com/)
|
||||
[一言](https://hitokoto.cn/)
|
||||
[CDNJS](https://cdnjs.com/)
|
||||
[unpkg](https://unpkg.com/)
|
||||
|
||||
|
||||
@ -27,6 +27,19 @@
|
||||
|
||||
gtag('config', '{{ site.google_analytics }}');
|
||||
var lastUpdated = new Date("{{ site.time | date: "%FT%T%z" }}");
|
||||
var BlogAPI = "https://summary.mayx.eu.org";
|
||||
function getSearchJSON(callback) {
|
||||
var searchData = JSON.parse(localStorage.getItem("blog_" + lastUpdated.valueOf()));
|
||||
if (!searchData) {
|
||||
localStorage.clear();
|
||||
$.getJSON("/search.json", function (data) {
|
||||
localStorage.setItem("blog_" + lastUpdated.valueOf(), JSON.stringify(data));
|
||||
callback(data);
|
||||
});
|
||||
} else {
|
||||
callback(searchData);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{% endif %}
|
||||
<style>
|
||||
@ -99,8 +112,12 @@
|
||||
<div class="message" style="opacity:0"></div>
|
||||
<canvas id="live2d" width="500" height="560" class="live2d"></canvas>
|
||||
<div class="live_talk_input_body">
|
||||
<div class="live_talk_input_name_body" style="display:none;">
|
||||
<input name="name" type="hidden" class="live_talk_name white_input" id="AIuserName" value="Mayx_Blog_Talk" />
|
||||
<div class="live_talk_input_name_body" {% unless page.layout == "post" %}style="display:none;"{% endunless %}>
|
||||
<input type="checkbox" id="load_this">
|
||||
<input type="hidden" id="post_id" value="{{ page.url }}">
|
||||
<label for="load_this">
|
||||
<span style="font-size: 11px; color: #fff;"> 想问这篇文章</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="live_talk_input_text_body">
|
||||
<input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?"/>
|
||||
|
||||
@ -44,15 +44,15 @@ layout: default
|
||||
var postContent = "文章标题:" + {{ page.title | jsonify }} + ";文章内容:" + {{ page.content | strip_html | strip_newlines | jsonify }};
|
||||
var postContentSign = await sha(postContent);
|
||||
var outputContainer = document.getElementById("ai-output");
|
||||
$.get("https://summary.mayx.eu.org/is_uploaded?id={{ page.url }}&sign=" + postContentSign, function (data) {
|
||||
$.get(BlogAPI + "/is_uploaded?id={{ page.url }}&sign=" + postContentSign, function (data) {
|
||||
if (data == "yes") {
|
||||
$.get("https://summary.mayx.eu.org/get_summary?id={{ page.url }}&sign=" + postContentSign, function (data2) {
|
||||
$.get(BlogAPI + "/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) {
|
||||
$.get("https://summary.mayx.eu.org/get_summary?id={{ page.url }}&sign=" + postContentSign);
|
||||
const evSource = new EventSource("https://summary.mayx.eu.org/summary?id={{ page.url }}");
|
||||
$.post(BlogAPI + "/upload_blog?id={{ page.url }}", postContent, function (data) {
|
||||
$.get(BlogAPI + "/get_summary?id={{ page.url }}&sign=" + postContentSign);
|
||||
const evSource = new EventSource(BlogAPI + "/summary?id={{ page.url }}");
|
||||
outputContainer.textContent = "";
|
||||
evSource.onmessage = (event) => {
|
||||
if (event.data == "[DONE]") {
|
||||
@ -80,7 +80,33 @@ layout: default
|
||||
{% if page.tags %}
|
||||
<small>tags: <em>{{ page.tags | join: "</em> - <em>" }}</em></small>
|
||||
{% endif %}
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<p id="suggest-container"></p>
|
||||
<script>
|
||||
var blogurl = "{{ page.url }}";
|
||||
var suggest = $("#suggest-container")[0];
|
||||
suggest.innerHTML = "Loading...";
|
||||
$.get(BlogAPI + "/suggest?id=" + blogurl + "&update=" + lastUpdated.valueOf(), function (data) {
|
||||
if (data.length) {
|
||||
getSearchJSON(function (search) {
|
||||
suggest.innerHTML = '<b>推荐文章</b><hr style="margin: 0 0 5px"/>';
|
||||
const searchMap = new Map(search.map(item => [item.url, item]));
|
||||
const merged = data.map(suggestObj => {
|
||||
const searchObj = searchMap.get(suggestObj.id);
|
||||
return searchObj ? { ...searchObj } : null;
|
||||
});
|
||||
merged.forEach(element => {
|
||||
if (element) {
|
||||
suggest.innerHTML += "<a href=" + element.url + ">" + element.title + "</a> - " + element.date + "<br />";
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
suggest.innerHTML = "暂无推荐文章……";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="pagination">
|
||||
{% if page.previous.url %}
|
||||
<span class="prev">
|
||||
@ -114,7 +140,8 @@ layout: default
|
||||
owner: 'Mabbs',
|
||||
admin: ['Mabbs'],
|
||||
id: '{{ page.id }}', // Ensure uniqueness and length less than 50
|
||||
distractionFreeMode: false // Facebook-like distraction free mode
|
||||
distractionFreeMode: false, // Facebook-like distraction free mode
|
||||
proxy: "https://cors-anywhere.mayx.eu.org/?https://github.com/login/oauth/access_token"
|
||||
})
|
||||
}
|
||||
else {
|
||||
@ -125,7 +152,8 @@ layout: default
|
||||
owner: 'Mabbs',
|
||||
admin: ['Mabbs'],
|
||||
id: '{{ page.id }}', // Ensure uniqueness and length less than 50
|
||||
distractionFreeMode: false // Facebook-like distraction free mode
|
||||
distractionFreeMode: false, // Facebook-like distraction free mode
|
||||
proxy: "https://cors-anywhere.mayx.eu.org/?https://github.com/login/oauth/access_token"
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
58
_posts/2024-08-03-cangjie.md
Normal file
58
_posts/2024-08-03-cangjie.md
Normal file
File diff suppressed because one or more lines are too long
23
_posts/2024-08-17-mac-mini.md
Normal file
23
_posts/2024-08-17-mac-mini.md
Normal file
File diff suppressed because one or more lines are too long
81
_posts/2024-09-02-gmssl.md
Normal file
81
_posts/2024-09-02-gmssl.md
Normal file
File diff suppressed because one or more lines are too long
335
_posts/2024-09-27-rag.md
Normal file
335
_posts/2024-09-27-rag.md
Normal file
File diff suppressed because one or more lines are too long
97
_posts/2024-10-01-suggest.md
Normal file
97
_posts/2024-10-01-suggest.md
Normal file
File diff suppressed because one or more lines are too long
39
_posts/2024-10-13-arm-linux.md
Normal file
39
_posts/2024-10-13-arm-linux.md
Normal file
File diff suppressed because one or more lines are too long
1875
_posts/2024-11-02-trojan.md
Normal file
1875
_posts/2024-11-02-trojan.md
Normal file
File diff suppressed because one or more lines are too long
32
_posts/2024-12-08-simulator.md
Normal file
32
_posts/2024-12-08-simulator.md
Normal file
File diff suppressed because one or more lines are too long
40
_posts/2024-12-29-vm.md
Normal file
40
_posts/2024-12-29-vm.md
Normal file
File diff suppressed because one or more lines are too long
19
_posts/2025-01-01-summary.md
Normal file
19
_posts/2025-01-01-summary.md
Normal file
File diff suppressed because one or more lines are too long
@ -56,7 +56,7 @@ title: 首页 - 我的文章
|
||||
<p>
|
||||
<h2>其他页面</h2>
|
||||
|
||||
<a href="{% unless site.github %}https://mabbs.github.io{% endunless %}/pixiv-index/">Pixiv图片索引API</a><br>
|
||||
<a href="/service.html">Mayx的公开服务</a><br>
|
||||
|
||||
<a href="{% unless site.github %}https://mabbs.github.io{% endunless %}/karyl-yabaival/">拯救凯露</a><br>
|
||||
|
||||
@ -66,7 +66,7 @@ title: 首页 - 我的文章
|
||||
|
||||
<a href="/proxylist.html">代理列表</a><br>
|
||||
|
||||
<a href="https://mabbs.github.io/MayxDaily/">Mayx日报</a><br>
|
||||
<!-- <a href="https://mabbs.github.io/MayxDaily/">Mayx日报</a><br> -->
|
||||
|
||||
<br>
|
||||
</p>
|
||||
|
||||
74
js/main.js
74
js/main.js
@ -1,44 +1,44 @@
|
||||
(function() {
|
||||
(function () {
|
||||
var $backToTopTxt = "返回顶部", $backToTopEle = $('<div class="backToTop"></div>').appendTo($("body"))
|
||||
.text($backToTopTxt).attr("title", $backToTopTxt).click(function() {
|
||||
.text($backToTopTxt).attr("title", $backToTopTxt).click(function () {
|
||||
$("html, body").animate({ scrollTop: 0 }, 120);
|
||||
}), $backToTopFun = function() {
|
||||
var st = $(document).scrollTop(), winh = $(window).height();
|
||||
(st > 0)? $backToTopEle.show(): $backToTopEle.hide();
|
||||
};
|
||||
}), $backToTopFun = function () {
|
||||
var st = $(document).scrollTop(), winh = $(window).height();
|
||||
(st > 0) ? $backToTopEle.show() : $backToTopEle.hide();
|
||||
};
|
||||
$(window).bind("scroll", $backToTopFun);
|
||||
$(function() { $backToTopFun(); });
|
||||
$(function () { $backToTopFun(); });
|
||||
})();
|
||||
$(function(){
|
||||
$("div#landlord").mouseenter(function(){
|
||||
$("div.live_ico_box").fadeIn();
|
||||
});
|
||||
$("div#landlord").mouseleave(function(){
|
||||
$("div.live_ico_box").fadeOut();
|
||||
});
|
||||
function showHitS(hits){
|
||||
$.get("https://summary.mayx.eu.org/count_click?id="+hits.id,function(data){
|
||||
hits.innerHTML=Number(data);
|
||||
});
|
||||
}
|
||||
function showHitCount() {
|
||||
var visitors=$(".visitors-index");
|
||||
for(var i = 0; i < visitors.length; i++){
|
||||
showHitS(visitors[i]);
|
||||
}
|
||||
|
||||
}
|
||||
function addCount() {
|
||||
var visitors=$(".visitors");
|
||||
$.get("https://summary.mayx.eu.org/count_click_add?id="+visitors[0].id,function(data){
|
||||
visitors[0].innerHTML=Number(data);
|
||||
$(function () {
|
||||
$("div#landlord").mouseenter(function () {
|
||||
$("div.live_ico_box").fadeIn();
|
||||
});
|
||||
}
|
||||
if ($('.visitors').length == 1) {
|
||||
addCount();
|
||||
} else if ($('.visitors-index').length > 0){
|
||||
showHitCount();
|
||||
}
|
||||
$("div#landlord").mouseleave(function () {
|
||||
$("div.live_ico_box").fadeOut();
|
||||
});
|
||||
function showHitS(hits) {
|
||||
$.get(BlogAPI + "/count_click?id=" + hits.id, function (data) {
|
||||
hits.innerHTML = Number(data);
|
||||
});
|
||||
}
|
||||
function showHitCount() {
|
||||
var visitors = $(".visitors-index");
|
||||
for (var i = 0; i < visitors.length; i++) {
|
||||
showHitS(visitors[i]);
|
||||
}
|
||||
|
||||
}
|
||||
function addCount() {
|
||||
var visitors = $(".visitors");
|
||||
$.get(BlogAPI + "/count_click_add?id=" + visitors[0].id, function (data) {
|
||||
visitors[0].innerHTML = Number(data);
|
||||
});
|
||||
}
|
||||
if ($('.visitors').length == 1) {
|
||||
addCount();
|
||||
} else if ($('.visitors-index').length > 0) {
|
||||
showHitCount();
|
||||
}
|
||||
});
|
||||
|
||||
today = new Date();
|
||||
@ -53,4 +53,4 @@ if (daysold > 90) {
|
||||
}
|
||||
|
||||
var message_Path = '/Live2dHistoire/live2d/';
|
||||
var talkAPI = "https://turing-api.mayx.eu.org/";
|
||||
var talkAPI = BlogAPI + "/ai_chat";
|
||||
|
||||
2
links.md
2
links.md
@ -8,7 +8,7 @@ tags: [links]
|
||||
|
||||
| Links | Introduce |
|
||||
| - | - |
|
||||
| [花火学园](https://www.sayhuahuo.shop/) | 和谐融洽的ACG交流以及资源聚集地 |
|
||||
| [花火学园](https://www.sayhanabi.net/) | 和谐融洽的ACG交流以及资源聚集地 |
|
||||
| [资源统筹局](https://gkdworld.com/) | 统筹保管用户分享的资源 |
|
||||
| [贫困的蚊子](https://mozz.ie/) | *No description* |
|
||||
| [极客兔兔](https://geektutu.com/) | 致力于分享有趣的技术实践 |
|
||||
|
||||
@ -12,9 +12,9 @@ title: 代理列表
|
||||
(根据可能的可用性排序)
|
||||
- <https://blog.mayx.workers.dev/> <img src="https://blog.mayx.workers.dev/images/online.svg" style="width:22px;vertical-align: bottom" onerror="this.src = '/images/offline.svg'"/>
|
||||
- <https://mayx.deno.dev/> <img src="https://mayx.deno.dev/images/online.svg" style="width:22px;vertical-align: bottom" onerror="this.src = '/images/offline.svg'"/>
|
||||
- <https://mayx.serv00.net/> <img src="https://mayx.serv00.net/images/online.svg" style="width:22px;vertical-align: bottom" onerror="this.src = '/images/offline.svg'"/>
|
||||
- <https://mayx.glitch.me/> <img src="https://mayx.glitch.me/images/online.svg" style="width:22px;vertical-align: bottom" onerror="this.src = '/images/offline.svg'"/>
|
||||
- <https://yuki.gear.host/> <img src="https://yuki.gear.host/images/online.svg" style="width:22px;vertical-align: bottom" onerror="this.src = '/images/offline.svg'"/>
|
||||
- <https://mayx.serv00.net/> <img src="https://mayx.serv00.net/images/online.svg" style="width:22px;vertical-align: bottom" onerror="this.src = '/images/offline.svg'"/>
|
||||
|
||||
# 镜像列表
|
||||
由于[Github已经不再可信](/2022/01/04/banned.html),所以现在提供以下镜像站:
|
||||
@ -25,7 +25,6 @@ title: 代理列表
|
||||
- <https://mayx.netlify.app/> <img src="https://mayx.netlify.app/images/online.svg" style="width:22px;vertical-align: bottom" onerror="this.src = '/images/offline.svg'"/>
|
||||
- <https://mayx.4everland.app/> <img src="https://mayx.4everland.app/images/online.svg" style="width:22px;vertical-align: bottom" onerror="this.src = '/images/offline.svg'"/>
|
||||
- <https://mayx.dappling.network/> <img src="https://mayx.dappling.network/images/online.svg" style="width:22px;vertical-align: bottom" onerror="this.src = '/images/offline.svg'"/>
|
||||
- <https://xu4qy-yiaaa-aaaag-aa2iq-cai.raw.ic0.app/> <img src="https://xu4qy-yiaaa-aaaag-aa2iq-cai.raw.ic0.app/images/online.svg" style="width:22px;vertical-align: bottom" onerror="this.src = '/images/offline.svg'"/>
|
||||
|
||||
# 其他平台博客(备用)
|
||||
- <https://unmayx.blogspot.com/>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user