q78kgblog 0.0.0-1719984896981 → 0.0.0-1720168649694
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/404.html +5 -5
- package/about/index.html +7 -7
- package/archives/2023/02/index.html +6 -6
- package/archives/2023/04/index.html +6 -6
- package/archives/2023/05/index.html +6 -6
- package/archives/2023/08/index.html +6 -6
- package/archives/2023/09/index.html +6 -6
- package/archives/2023/index.html +6 -6
- package/archives/2024/01/index.html +6 -6
- package/archives/2024/02/index.html +6 -6
- package/archives/2024/index.html +6 -6
- package/archives/index.html +6 -6
- package/atom.xml +9 -9
- package/baidusitemap.xml +8 -8
- package/bangumis/index.html +6 -6
- package/bigpie/index.html +5 -5
- package/categories/Hexo/index.html +6 -6
- package/categories/index.html +5 -5
- package/categories//345/271/264/347/273/210/346/200/273/347/273/223/index.html +6 -6
- package/categories//347/264/240/346/235/220/index.html +6 -6
- package/categories//351/227/262/350/201/212/346/235/202/350/260/210/index.html +6 -6
- package/content.json +1 -1
- package/fcircle/index.html +5 -5
- package/fontawesome/index.html +5 -5
- package/index.html +13 -13
- package/links/index.html +5 -5
- package/othersite/index.html +5 -5
- package/package.json +1 -1
- package/posts/164ef646/index.html +8 -8
- package/posts/228c2ef8/index.html +8 -8
- package/posts/a9a6c1fb/index.html +8 -8
- package/posts/c262e439/index.html +8 -8
- package/posts/c81531cf/index.html +8 -8
- package/posts/ccdf7cfc/index.html +8 -8
- package/posts/de1f83f4/index.html +8 -8
- package/posts/e54f7476/index.html +8 -8
- package/random.html +2 -2
- package/sitemap.txt +2 -2
- package/sitemap.xml +53 -53
- package/sw.js +25 -25
- package/tags/AI/index.html +7 -7
- package/tags/Butterfly/index.html +7 -7
- package/tags/Cloudflare/index.html +7 -7
- package/tags/DiffSinger/index.html +7 -7
- package/tags/Hexo/index.html +7 -7
- package/tags/Next/index.html +7 -7
- package/tags/RAID/index.html +7 -7
- package/tags/Vercel/index.html +7 -7
- package/tags/Workers/index.html +7 -7
- package/tags/index.html +5 -5
- package/tags//344/270/273/351/242/230/index.html +7 -7
- package/tags//345/206/231/344/275/234/index.html +7 -7
- package/tags//345/245/263/346/200/247/346/204/217/350/257/206/index.html +7 -7
- package/tags//345/255/246/344/271/240/index.html +7 -7
- package/tags//345/256/266/351/207/214/344/272/221/index.html +7 -7
- package/tags//345/271/264/347/273/210/346/200/273/347/273/223/index.html +7 -7
- package/tags//346/212/230/350/205/276/index.html +7 -7
- package/tags//346/227/245/345/270/270/index.html +7 -7
- package/tags//346/234/215/345/212/241/345/231/250/index.html +7 -7
- package/tags//346/265/252/346/275/256/index.html +7 -7
- package/tags//347/256/200/347/210/261/index.html +7 -7
- package/tags//350/207/252/345/212/250/346/240/207/346/263/250/index.html +7 -7
- package/tags//350/256/272/346/226/207/index.html +7 -7
- package/tags//350/260/267/346/255/214/347/277/273/350/257/221/index.html +7 -7
- package/tags//350/264/237/350/275/275/345/235/207/350/241/241/index.html +7 -7
- package/tags//351/207/221/345/217/245/index.html +7 -7
- package/tags//351/255/224/346/224/271/index.html +7 -7
- package/js/bbtalk.js +0 -11354
- package/js/bbtalklunbo.js +0 -78
- package/js/jike.js +0 -121
- package/js/jikewater.js +0 -60
package/js/bbtalklunbo.js
DELETED
@@ -1,78 +0,0 @@
|
|
1
|
-
|
2
|
-
AV.init({
|
3
|
-
appId: "",
|
4
|
-
appKey: "",
|
5
|
-
serverURL: ""
|
6
|
-
});
|
7
|
-
function lunbo(){
|
8
|
-
var speaks=[];
|
9
|
-
const query = new AV.Query('content');
|
10
|
-
Date.prototype.Format = function (fmt) {
|
11
|
-
var o = {
|
12
|
-
"M+": this.getMonth() + 1, //月份
|
13
|
-
"d+": this.getDate(), //日
|
14
|
-
"H+": this.getHours(), //小时
|
15
|
-
"m+": this.getMinutes(), //分
|
16
|
-
"s+": this.getSeconds(), //秒
|
17
|
-
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
|
18
|
-
"S": this.getMilliseconds() //毫秒
|
19
|
-
};
|
20
|
-
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
21
|
-
for (var k in o)
|
22
|
-
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
23
|
-
return fmt;
|
24
|
-
}
|
25
|
-
query.find().then((talks) => {
|
26
|
-
dat=new Date()
|
27
|
-
for(i=talks.length-1;i>=talks.length-31;i--){
|
28
|
-
var usedTime = Date.parse(dat) - Date.parse(talks[i]["createdAt"]);
|
29
|
-
var days = Math.floor(usedTime / (24 * 3600 * 1000));
|
30
|
-
var leave1 = usedTime % (24 * 3600 * 1000);
|
31
|
-
var hours = Math.floor(leave1 / (3600 * 1000));
|
32
|
-
var leave2 = leave1 % (3600 * 1000);
|
33
|
-
var minutes = Math.floor(leave2 / (60 * 1000));
|
34
|
-
var bbcontent=talks[i]["attributes"]["content"].replace(/<[^>]+>/g, "").replace(/<[^>]+>/g, "").replace(/(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\*\+,;=.]+\.(png|jpg|jpeg|webp)/g,"[图片]").replace(/(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\*\+,;=.]+/g,"[链接]");
|
35
|
-
if(days>31){
|
36
|
-
speaks.push(String(talks[i]["createdAt"].Format("yyyy-MM-dd"))+":"+bbcontent)
|
37
|
-
}
|
38
|
-
else if(days>0){
|
39
|
-
speaks.push(String(days)+" 天前:"+bbcontent);
|
40
|
-
}
|
41
|
-
else if(hours>0){
|
42
|
-
speaks.push(String(hours)+" 小时前:"+bbcontent);
|
43
|
-
}
|
44
|
-
else{
|
45
|
-
speaks.push(String(minutes)+" 分钟前:"+bbcontent);
|
46
|
-
}
|
47
|
-
}
|
48
|
-
document.querySelector(".shuoshuo").innerHTML=""
|
49
|
-
for(i=0;i<speaks.length;i++){
|
50
|
-
var ch=document.createElement("div");
|
51
|
-
ch.className="swiper-slide bbtalks";
|
52
|
-
ch.innerHTML=speaks[i];
|
53
|
-
document.querySelector(".shuoshuo").appendChild(ch)
|
54
|
-
}
|
55
|
-
var fxxkccf = new Swiper("#speaks", {
|
56
|
-
loop: true,
|
57
|
-
direction: "vertical",
|
58
|
-
autoplay: {
|
59
|
-
delay: 5000,
|
60
|
-
disableOnInteraction: false,
|
61
|
-
},
|
62
|
-
mousewheel:true,
|
63
|
-
})
|
64
|
-
fxxkccf.el.onmouseover = function(){
|
65
|
-
fxxkccf.autoplay.stop();
|
66
|
-
}
|
67
|
-
fxxkccf.el.onmouseout = function(){
|
68
|
-
fxxkccf.autoplay.start();
|
69
|
-
}
|
70
|
-
});
|
71
|
-
|
72
|
-
}
|
73
|
-
document.addEventListener('pjax:complete', (e) => {
|
74
|
-
lunbo();
|
75
|
-
})
|
76
|
-
document.addEventListener('DOMContentLoaded', (e) => {
|
77
|
-
lunbo();
|
78
|
-
})
|
package/js/jike.js
DELETED
@@ -1,121 +0,0 @@
|
|
1
|
-
var percentFlag = false; // 节流阀
|
2
|
-
function essayScroll() {
|
3
|
-
let a = document.documentElement.scrollTop || window.pageYOffset; // 卷去高度
|
4
|
-
const waterfallResult = a % document.documentElement.clientHeight; // 卷去一个视口
|
5
|
-
result <= 99 || (result = 99);
|
6
|
-
|
7
|
-
if (
|
8
|
-
!percentFlag &&
|
9
|
-
waterfallResult + 100 >= document.documentElement.clientHeight &&
|
10
|
-
document.querySelector("#waterfall")
|
11
|
-
) {
|
12
|
-
// console.info(waterfallResult, document.documentElement.clientHeight);
|
13
|
-
setTimeout(() => {
|
14
|
-
waterfall("#waterfall");
|
15
|
-
}, 500);
|
16
|
-
} else {
|
17
|
-
setTimeout(() => {
|
18
|
-
document.querySelector("#waterfall") && waterfall("#waterfall");
|
19
|
-
}, 500);
|
20
|
-
}
|
21
|
-
|
22
|
-
const r = window.scrollY + document.documentElement.clientHeight;
|
23
|
-
|
24
|
-
let p = document.getElementById("post-comment") || document.getElementById("footer");
|
25
|
-
|
26
|
-
(p.offsetTop + p.offsetHeight / 2 < r || 90 < result) && (percentFlag = true);
|
27
|
-
}
|
28
|
-
function replaceAll(e, n, t) {
|
29
|
-
return e.split(n).join(t);
|
30
|
-
}
|
31
|
-
var starryif = {
|
32
|
-
diffDate: function (d, more = false) {
|
33
|
-
const dateNow = new Date();
|
34
|
-
const datePost = new Date(d);
|
35
|
-
const dateDiff = dateNow.getTime() - datePost.getTime();
|
36
|
-
const minute = 1000 * 60;
|
37
|
-
const hour = minute * 60;
|
38
|
-
const day = hour * 24;
|
39
|
-
const month = day * 30;
|
40
|
-
|
41
|
-
let result;
|
42
|
-
if (more) {
|
43
|
-
const monthCount = dateDiff / month;
|
44
|
-
const dayCount = dateDiff / day;
|
45
|
-
const hourCount = dateDiff / hour;
|
46
|
-
const minuteCount = dateDiff / minute;
|
47
|
-
|
48
|
-
if (monthCount >= 1) {
|
49
|
-
result = datePost.toLocaleDateString().replace(/\//g, "-");
|
50
|
-
} else if (dayCount >= 1) {
|
51
|
-
result = parseInt(dayCount) + " " + GLOBAL_CONFIG.date_suffix.day;
|
52
|
-
} else if (hourCount >= 1) {
|
53
|
-
result = parseInt(hourCount) + " " + GLOBAL_CONFIG.date_suffix.hour;
|
54
|
-
} else if (minuteCount >= 1) {
|
55
|
-
result = parseInt(minuteCount) + " " + GLOBAL_CONFIG.date_suffix.min;
|
56
|
-
} else {
|
57
|
-
result = GLOBAL_CONFIG.date_suffix.just;
|
58
|
-
}
|
59
|
-
} else {
|
60
|
-
result = parseInt(dateDiff / day);
|
61
|
-
}
|
62
|
-
return result;
|
63
|
-
},
|
64
|
-
changeTimeInEssay: function () {
|
65
|
-
document.querySelector("#bber") &&
|
66
|
-
document.querySelectorAll("#bber time").forEach(function (e) {
|
67
|
-
var t = e,
|
68
|
-
datetime = t.getAttribute("datetime");
|
69
|
-
(t.innerText = starryif.diffDate(datetime, true)), (t.style.display = "inline");
|
70
|
-
});
|
71
|
-
},
|
72
|
-
reflashEssayWaterFall: function () {
|
73
|
-
document.querySelector("#waterfall") &&
|
74
|
-
setTimeout(function () {
|
75
|
-
waterfall("#waterfall");
|
76
|
-
document.getElementById("waterfall").classList.add("show");
|
77
|
-
}, 500);
|
78
|
-
},
|
79
|
-
commentText: function (e) {
|
80
|
-
if (e == "undefined" || e == "null") e = "好棒!";
|
81
|
-
var n = document.getElementsByClassName("el-textarea__inner")[0],
|
82
|
-
t = document.createEvent("HTMLEvents");
|
83
|
-
if (!n) return;
|
84
|
-
t.initEvent("input", !0, !0);
|
85
|
-
var o = replaceAll(e, "\n", "\n> ");
|
86
|
-
(n.value = "> " + o + "\n\n"), n.dispatchEvent(t);
|
87
|
-
var i = document.querySelector("#post-comment").offsetTop;
|
88
|
-
window.scrollTo(0, i - 80),
|
89
|
-
n.focus(),
|
90
|
-
n.setSelectionRange(-1, -1),
|
91
|
-
document.getElementById("comment-tips") && document.getElementById("comment-tips").classList.add("show");
|
92
|
-
},
|
93
|
-
initIndexEssay: function () {
|
94
|
-
setTimeout(() => {
|
95
|
-
let essay_bar_swiper = new Swiper(".essay_bar_swiper_container", {
|
96
|
-
passiveListeners: true,
|
97
|
-
direction: "vertical",
|
98
|
-
loop: true,
|
99
|
-
autoplay: {
|
100
|
-
disableOnInteraction: true,
|
101
|
-
delay: 3000,
|
102
|
-
},
|
103
|
-
mousewheel: true,
|
104
|
-
});
|
105
|
-
|
106
|
-
let essay_bar_comtainer = document.getElementById("bbtalk");
|
107
|
-
if (essay_bar_comtainer !== null) {
|
108
|
-
essay_bar_comtainer.onmouseenter = function () {
|
109
|
-
essay_bar_swiper.autoplay.stop();
|
110
|
-
};
|
111
|
-
essay_bar_comtainer.onmouseleave = function () {
|
112
|
-
essay_bar_swiper.autoplay.start();
|
113
|
-
};
|
114
|
-
}
|
115
|
-
}, 100);
|
116
|
-
},
|
117
|
-
};
|
118
|
-
|
119
|
-
starryif.initIndexEssay();
|
120
|
-
starryif.changeTimeInEssay();
|
121
|
-
starryif.reflashEssayWaterFall();
|
package/js/jikewater.js
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
function waterfall(e) {
|
4
|
-
function n(t, e) {
|
5
|
-
e = window.getComputedStyle(e);
|
6
|
-
return parseFloat(e["margin" + t]) || 0
|
7
|
-
}
|
8
|
-
|
9
|
-
function t(t) {
|
10
|
-
return t + "px"
|
11
|
-
}
|
12
|
-
|
13
|
-
function o(t) {
|
14
|
-
return parseFloat(t.style.left)
|
15
|
-
}
|
16
|
-
|
17
|
-
function r(t) {
|
18
|
-
return t.clientWidth
|
19
|
-
}
|
20
|
-
|
21
|
-
function l(t) {
|
22
|
-
return parseFloat(t.style.top) + t.clientHeight + n("Bottom", t)
|
23
|
-
}
|
24
|
-
|
25
|
-
function i(t) {
|
26
|
-
return o(t) + r(t) + n("Right", t)
|
27
|
-
}
|
28
|
-
|
29
|
-
function s(t) {
|
30
|
-
t.sort(function(t, e) {
|
31
|
-
return l(t) === l(e) ? o(e) - o(t) : l(e) - l(t)
|
32
|
-
})
|
33
|
-
}
|
34
|
-
|
35
|
-
function u(t) {
|
36
|
-
r(e) != g && (t.target.removeEventListener(t.type, arguments.callee), waterfall(e))
|
37
|
-
}
|
38
|
-
"string" == typeof e && (e = document.querySelector(e));
|
39
|
-
var a = [].map.call(e.children, function(t) {
|
40
|
-
return t.style.position = "absolute", t
|
41
|
-
}),
|
42
|
-
f = (e.style.position = "relative", []);
|
43
|
-
a.length && (a[0].style.top = "0px", a[0].style.left = t(n("Left", a[0])), f.push(a[0]));
|
44
|
-
for (var p = 1; p < a.length; p++) {
|
45
|
-
var c = a[p - 1],
|
46
|
-
y = a[p];
|
47
|
-
if (!(i(c) + r(y) <= r(e))) break;
|
48
|
-
y.style.top = c.style.top, y.style.left = t(i(c) + n("Left", y)), f.push(y)
|
49
|
-
}
|
50
|
-
for (; p < a.length; p++) {
|
51
|
-
s(f);
|
52
|
-
var y = a[p],
|
53
|
-
d = f.pop();
|
54
|
-
y.style.top = t(l(d) + n("Top", y)), y.style.left = t(o(d)), f.push(y)
|
55
|
-
}
|
56
|
-
s(f);
|
57
|
-
var h = f[0],
|
58
|
-
g = (e.style.height = t(l(h) + n("Bottom", h)), r(e));
|
59
|
-
window.addEventListener ? window.addEventListener("resize", u) : document.body.onresize = u
|
60
|
-
}
|