2021-02-21 17:27:48 +08:00
|
|
|
// utils
|
|
|
|
const util = {
|
2021-02-19 23:33:19 +08:00
|
|
|
|
2021-02-21 17:27:48 +08:00
|
|
|
// https://github.com/jerryc127/hexo-theme-butterfly
|
|
|
|
diffDate: (d, more = false) => {
|
|
|
|
const dateNow = new Date()
|
|
|
|
const datePost = new Date(d)
|
|
|
|
const dateDiff = dateNow.getTime() - datePost.getTime()
|
|
|
|
const minute = 1000 * 60
|
|
|
|
const hour = minute * 60
|
|
|
|
const day = hour * 24
|
|
|
|
|
|
|
|
let result
|
|
|
|
if (more) {
|
|
|
|
const dayCount = dateDiff / day
|
|
|
|
const hourCount = dateDiff / hour
|
|
|
|
const minuteCount = dateDiff / minute
|
|
|
|
|
2024-02-07 16:27:35 +08:00
|
|
|
if (dayCount > 7) {
|
2021-02-21 17:27:48 +08:00
|
|
|
result = null
|
|
|
|
} else if (dayCount >= 1) {
|
|
|
|
result = parseInt(dayCount) + ' ' + stellar.config.date_suffix.day
|
|
|
|
} else if (hourCount >= 1) {
|
|
|
|
result = parseInt(hourCount) + ' ' + stellar.config.date_suffix.hour
|
|
|
|
} else if (minuteCount >= 1) {
|
|
|
|
result = parseInt(minuteCount) + ' ' + stellar.config.date_suffix.min
|
|
|
|
} else {
|
|
|
|
result = stellar.config.date_suffix.just
|
2021-02-20 14:56:07 +08:00
|
|
|
}
|
2021-02-21 17:27:48 +08:00
|
|
|
} else {
|
|
|
|
result = parseInt(dateDiff / day)
|
2021-02-20 14:56:07 +08:00
|
|
|
}
|
2021-02-21 17:27:48 +08:00
|
|
|
return result
|
|
|
|
},
|
|
|
|
|
2021-02-27 20:08:36 +08:00
|
|
|
copy: (id, msg) => {
|
|
|
|
const el = document.getElementById(id);
|
2021-02-25 13:12:04 +08:00
|
|
|
if (el) {
|
|
|
|
el.select();
|
|
|
|
document.execCommand("Copy");
|
2021-02-27 21:50:18 +08:00
|
|
|
if (msg && msg.length > 0) {
|
2024-01-05 19:43:39 +08:00
|
|
|
hud.toast(msg, 2500);
|
2021-02-27 21:50:18 +08:00
|
|
|
}
|
2021-02-25 13:12:04 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2021-02-27 20:08:36 +08:00
|
|
|
toggle: (id) => {
|
|
|
|
const el = document.getElementById(id);
|
2021-02-25 13:12:04 +08:00
|
|
|
if (el) {
|
|
|
|
el.classList.toggle("display");
|
|
|
|
}
|
|
|
|
},
|
2024-02-05 22:55:10 +08:00
|
|
|
|
|
|
|
scrollTop: () => {
|
|
|
|
window.scrollTo({top: 0, behavior: "smooth"});
|
|
|
|
},
|
2021-02-19 23:33:19 +08:00
|
|
|
}
|
|
|
|
|
2021-02-27 20:08:36 +08:00
|
|
|
const hud = {
|
|
|
|
toast: (msg, duration) => {
|
2024-01-05 19:43:39 +08:00
|
|
|
const d = Number(isNaN(duration) ? 2000 : duration);
|
2021-02-27 20:08:36 +08:00
|
|
|
var el = document.createElement('div');
|
|
|
|
el.classList.add('toast');
|
2024-01-05 19:43:39 +08:00
|
|
|
el.classList.add('show');
|
2021-02-27 20:08:36 +08:00
|
|
|
el.innerHTML = msg;
|
|
|
|
document.body.appendChild(el);
|
2024-01-05 19:43:39 +08:00
|
|
|
|
|
|
|
setTimeout(function(){ document.body.removeChild(el) }, d);
|
|
|
|
|
2021-02-27 20:08:36 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
}
|
2021-02-21 17:27:48 +08:00
|
|
|
|
|
|
|
// defines
|
|
|
|
|
|
|
|
const l_body = document.querySelector('.l_body');
|
|
|
|
|
2024-02-05 18:01:50 +08:00
|
|
|
const sidebar = {
|
|
|
|
leftbar: () => {
|
|
|
|
if (l_body) {
|
|
|
|
l_body.toggleAttribute('leftbar');
|
|
|
|
l_body.removeAttribute('rightbar');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
rightbar: () => {
|
|
|
|
if (l_body) {
|
|
|
|
l_body.toggleAttribute('rightbar');
|
|
|
|
l_body.removeAttribute('leftbar');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
dismiss: () => {
|
2021-02-21 17:27:48 +08:00
|
|
|
if (l_body) {
|
2024-02-05 18:01:50 +08:00
|
|
|
l_body.removeAttribute('leftbar');
|
|
|
|
l_body.removeAttribute('rightbar');
|
2021-02-21 17:27:48 +08:00
|
|
|
}
|
2024-02-05 18:01:50 +08:00
|
|
|
},
|
|
|
|
toggleTOC: () => {
|
|
|
|
document.querySelector('#data-toc').classList.toggle('collapse');
|
2021-02-21 17:27:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const init = {
|
|
|
|
toc: () => {
|
2021-03-13 23:31:52 +08:00
|
|
|
stellar.jQuery(() => {
|
2021-02-21 17:27:48 +08:00
|
|
|
const scrollOffset = 32;
|
|
|
|
var segs = [];
|
2022-11-23 22:44:11 +08:00
|
|
|
$("article.md-text :header").each(function (idx, node) {
|
2024-02-05 18:01:50 +08:00
|
|
|
segs.push(node);
|
2021-02-21 17:27:48 +08:00
|
|
|
});
|
2024-02-05 18:01:50 +08:00
|
|
|
function activeTOC() {
|
2021-02-21 17:27:48 +08:00
|
|
|
var scrollTop = $(this).scrollTop();
|
2024-02-05 18:01:50 +08:00
|
|
|
var topSeg = null;
|
2021-02-21 17:27:48 +08:00
|
|
|
for (var idx in segs) {
|
2024-02-05 18:01:50 +08:00
|
|
|
var seg = $(segs[idx]);
|
2021-02-21 17:27:48 +08:00
|
|
|
if (seg.offset().top > scrollTop + scrollOffset) {
|
2024-02-05 18:01:50 +08:00
|
|
|
continue;
|
2021-02-21 17:27:48 +08:00
|
|
|
}
|
|
|
|
if (!topSeg) {
|
2024-02-05 18:01:50 +08:00
|
|
|
topSeg = seg;
|
2021-02-21 17:27:48 +08:00
|
|
|
} else if (seg.offset().top >= topSeg.offset().top) {
|
2024-02-05 18:01:50 +08:00
|
|
|
topSeg = seg;
|
2021-02-21 17:27:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (topSeg) {
|
2024-02-05 18:01:50 +08:00
|
|
|
$("#data-toc a.toc-link").removeClass("active");
|
|
|
|
var link = "#" + topSeg.attr("id");
|
2021-02-21 17:27:48 +08:00
|
|
|
if (link != '#undefined') {
|
2024-02-05 18:01:50 +08:00
|
|
|
const highlightItem = $('#data-toc a.toc-link[href="' + encodeURI(link) + '"]');
|
2022-12-16 23:45:36 +08:00
|
|
|
if (highlightItem.length > 0) {
|
2024-02-05 18:01:50 +08:00
|
|
|
highlightItem.addClass("active");
|
2022-12-16 23:45:36 +08:00
|
|
|
}
|
2021-02-21 17:27:48 +08:00
|
|
|
} else {
|
2024-02-05 18:01:50 +08:00
|
|
|
$('#data-toc a.toc-link:first').addClass("active");
|
2021-02-21 17:27:48 +08:00
|
|
|
}
|
|
|
|
}
|
2024-02-05 18:01:50 +08:00
|
|
|
}
|
|
|
|
function scrollTOC() {
|
|
|
|
const e0 = document.querySelector('#data-toc .toc');
|
|
|
|
const e1 = document.querySelector('#data-toc .toc a.toc-link.active');
|
|
|
|
if (e0 == null || e1 == null) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
const offsetBottom = e1.getBoundingClientRect().bottom - e0.getBoundingClientRect().bottom + 100;
|
|
|
|
const offsetTop = e1.getBoundingClientRect().top - e0.getBoundingClientRect().top - 64;
|
|
|
|
if (offsetTop < 0) {
|
|
|
|
e0.scrollBy({top: offsetTop, behavior: "smooth"});
|
|
|
|
} else if (offsetBottom > 0) {
|
|
|
|
e0.scrollBy({top: offsetBottom, behavior: "smooth"});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var timeout = null;
|
|
|
|
window.addEventListener('scroll', function() {
|
|
|
|
activeTOC();
|
|
|
|
if(timeout !== null) clearTimeout(timeout);
|
|
|
|
timeout = setTimeout(function() {
|
|
|
|
scrollTOC();
|
2024-02-06 23:39:51 +08:00
|
|
|
}.bind(this), 50);
|
2024-02-05 18:01:50 +08:00
|
|
|
});
|
2021-02-21 17:27:48 +08:00
|
|
|
})
|
|
|
|
},
|
2024-02-04 21:09:44 +08:00
|
|
|
leftbar: () => {
|
2021-03-13 23:31:52 +08:00
|
|
|
stellar.jQuery(() => {
|
2022-12-12 21:07:22 +08:00
|
|
|
$("#data-toc a.toc-link").click(function (e) {
|
2024-02-04 21:09:44 +08:00
|
|
|
l_body.classList.remove("leftbar");
|
2021-02-21 17:27:48 +08:00
|
|
|
});
|
|
|
|
})
|
|
|
|
},
|
|
|
|
relativeDate: (selector) => {
|
|
|
|
selector.forEach(item => {
|
|
|
|
const $this = item
|
|
|
|
const timeVal = $this.getAttribute('datetime')
|
|
|
|
let relativeValue = util.diffDate(timeVal, true)
|
|
|
|
if (relativeValue) {
|
|
|
|
$this.innerText = relativeValue
|
|
|
|
}
|
|
|
|
})
|
2021-03-08 17:54:23 +08:00
|
|
|
},
|
|
|
|
/**
|
|
|
|
* Tabs tag listener (without twitter bootstrap).
|
|
|
|
*/
|
2022-01-21 11:24:32 +08:00
|
|
|
registerTabsTag: function () {
|
2021-03-08 17:54:23 +08:00
|
|
|
// Binding `nav-tabs` & `tab-content` by real time permalink changing.
|
2022-12-15 22:09:01 +08:00
|
|
|
document.querySelectorAll('.tabs .nav-tabs .tab').forEach(element => {
|
2021-03-08 17:54:23 +08:00
|
|
|
element.addEventListener('click', event => {
|
|
|
|
event.preventDefault();
|
|
|
|
// Prevent selected tab to select again.
|
|
|
|
if (element.classList.contains('active')) return;
|
|
|
|
// Add & Remove active class on `nav-tabs` & `tab-content`.
|
|
|
|
[...element.parentNode.children].forEach(target => {
|
|
|
|
target.classList.toggle('active', target === element);
|
|
|
|
});
|
|
|
|
// https://stackoverflow.com/questions/20306204/using-queryselector-with-ids-that-are-numbers
|
|
|
|
const tActive = document.getElementById(element.querySelector('a').getAttribute('href').replace('#', ''));
|
|
|
|
[...tActive.parentNode.children].forEach(target => {
|
|
|
|
target.classList.toggle('active', target === tActive);
|
|
|
|
});
|
|
|
|
// Trigger event
|
|
|
|
tActive.dispatchEvent(new Event('tabs:click', {
|
|
|
|
bubbles: true
|
|
|
|
}));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
window.dispatchEvent(new Event('tabs:register'));
|
|
|
|
},
|
|
|
|
|
2021-02-21 17:27:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// init
|
|
|
|
init.toc()
|
2024-02-04 21:09:44 +08:00
|
|
|
init.leftbar()
|
2021-02-21 17:27:48 +08:00
|
|
|
init.relativeDate(document.querySelectorAll('#post-meta time'))
|
2021-03-08 17:54:23 +08:00
|
|
|
init.registerTabsTag()
|
2021-02-21 17:27:48 +08:00
|
|
|
|
|
|
|
// scrollreveal
|
|
|
|
if (stellar.plugins.scrollreveal) {
|
2021-03-13 23:31:52 +08:00
|
|
|
stellar.loadScript(stellar.plugins.scrollreveal.js).then(function () {
|
2024-01-19 01:05:44 +08:00
|
|
|
const slideUp = {
|
2021-02-21 17:27:48 +08:00
|
|
|
distance: stellar.plugins.scrollreveal.distance,
|
|
|
|
duration: stellar.plugins.scrollreveal.duration,
|
|
|
|
interval: stellar.plugins.scrollreveal.interval,
|
|
|
|
scale: stellar.plugins.scrollreveal.scale,
|
2024-01-19 01:05:44 +08:00
|
|
|
opacity: 0,
|
2021-07-13 22:25:24 +08:00
|
|
|
easing: "ease-out"
|
2024-01-19 01:05:44 +08:00
|
|
|
}
|
|
|
|
ScrollReveal().reveal('.l_left .slide-up', slideUp)
|
|
|
|
ScrollReveal().reveal('.l_main .slide-up', slideUp)
|
2021-02-21 17:27:48 +08:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// lazyload
|
|
|
|
if (stellar.plugins.lazyload) {
|
2022-01-21 11:24:32 +08:00
|
|
|
stellar.loadScript(stellar.plugins.lazyload.js, { defer: true })
|
2021-02-21 17:27:48 +08:00
|
|
|
// https://www.npmjs.com/package/vanilla-lazyload
|
|
|
|
// Set the options globally
|
|
|
|
// to make LazyLoad self-initialize
|
|
|
|
window.lazyLoadOptions = {
|
2021-03-04 23:38:41 +08:00
|
|
|
elements_selector: ".lazy",
|
2021-02-21 17:27:48 +08:00
|
|
|
};
|
|
|
|
// Listen to the initialization event
|
|
|
|
// and get the instance of LazyLoad
|
|
|
|
window.addEventListener(
|
|
|
|
"LazyLoad::Initialized",
|
|
|
|
function (event) {
|
|
|
|
window.lazyLoadInstance = event.detail.instance;
|
|
|
|
},
|
|
|
|
false
|
|
|
|
);
|
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
2022-11-27 21:44:34 +08:00
|
|
|
window.lazyLoadInstance?.update();
|
2021-02-19 23:33:19 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2022-10-07 02:38:51 +08:00
|
|
|
// stellar js
|
|
|
|
if (stellar.plugins.stellar) {
|
|
|
|
for (let key of Object.keys(stellar.plugins.stellar)) {
|
|
|
|
let js = stellar.plugins.stellar[key];
|
2022-10-25 22:41:56 +08:00
|
|
|
if (key == 'linkcard') {
|
|
|
|
stellar.loadScript(js, { defer: true }).then(function () {
|
2022-11-03 22:25:08 +08:00
|
|
|
setCardLink(document.querySelectorAll('a.link-card[cardlink]'));
|
2022-10-25 22:41:56 +08:00
|
|
|
});
|
|
|
|
} else {
|
|
|
|
const els = document.getElementsByClassName('stellar-' + key + '-api');
|
|
|
|
if (els != undefined && els.length > 0) {
|
|
|
|
stellar.jQuery(() => {
|
2024-01-11 23:33:41 +08:00
|
|
|
if (key == 'timeline' || 'memos' || 'marked') {
|
2023-12-30 11:47:45 +08:00
|
|
|
stellar.loadScript(stellar.plugins.marked).then(function () {
|
|
|
|
stellar.loadScript(js, { defer: true });
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
stellar.loadScript(js, { defer: true });
|
2022-10-25 22:41:56 +08:00
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
2022-10-07 02:38:51 +08:00
|
|
|
}
|
2022-10-05 17:34:16 +08:00
|
|
|
}
|
|
|
|
}
|
2021-02-20 14:56:07 +08:00
|
|
|
|
2021-02-21 17:27:48 +08:00
|
|
|
// swiper
|
|
|
|
if (stellar.plugins.swiper) {
|
|
|
|
const swiper_api = document.getElementById('swiper-api');
|
|
|
|
if (swiper_api != undefined) {
|
2021-03-13 23:31:52 +08:00
|
|
|
stellar.loadCSS(stellar.plugins.swiper.css);
|
2022-01-21 11:24:32 +08:00
|
|
|
stellar.loadScript(stellar.plugins.swiper.js, { defer: true }).then(function () {
|
2022-12-11 19:44:51 +08:00
|
|
|
const effect = swiper_api.getAttribute('effect') || '';
|
|
|
|
var swiper = new Swiper('.swiper#swiper-api', {
|
2021-02-21 17:27:48 +08:00
|
|
|
slidesPerView: 'auto',
|
|
|
|
spaceBetween: 8,
|
|
|
|
centeredSlides: true,
|
2022-12-11 19:44:51 +08:00
|
|
|
effect: effect,
|
2021-02-22 22:03:02 +08:00
|
|
|
loop: true,
|
2021-02-21 17:27:48 +08:00
|
|
|
pagination: {
|
|
|
|
el: '.swiper-pagination',
|
|
|
|
clickable: true,
|
|
|
|
},
|
|
|
|
navigation: {
|
|
|
|
nextEl: '.swiper-button-next',
|
|
|
|
prevEl: '.swiper-button-prev',
|
|
|
|
},
|
|
|
|
});
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// preload
|
|
|
|
if (stellar.plugins.preload) {
|
2024-01-21 21:46:46 +08:00
|
|
|
if (stellar.plugins.preload.service == 'flying_pages') {
|
2021-02-21 17:27:48 +08:00
|
|
|
window.FPConfig = {
|
|
|
|
delay: 0,
|
|
|
|
ignoreKeywords: [],
|
|
|
|
maxRPS: 5,
|
|
|
|
hoverDelay: 25
|
|
|
|
};
|
2022-01-21 11:24:32 +08:00
|
|
|
stellar.loadScript(stellar.plugins.preload.flying_pages, { defer: true })
|
2021-02-21 17:27:48 +08:00
|
|
|
}
|
|
|
|
}
|
2022-01-21 11:24:32 +08:00
|
|
|
|
|
|
|
// fancybox
|
|
|
|
if (stellar.plugins.fancybox) {
|
2024-01-21 21:15:12 +08:00
|
|
|
let selector = '[data-fancybox]:not(.error)';
|
2022-01-27 13:46:11 +08:00
|
|
|
if (stellar.plugins.fancybox.selector) {
|
|
|
|
selector += `, ${stellar.plugins.fancybox.selector}`
|
2022-01-21 11:24:32 +08:00
|
|
|
}
|
2023-12-14 22:07:42 +08:00
|
|
|
var needFancybox = document.querySelectorAll(selector).length !== 0;
|
|
|
|
if (!needFancybox) {
|
|
|
|
const els = document.getElementsByClassName('stellar-memos-api');
|
|
|
|
if (els != undefined && els.length > 0) {
|
|
|
|
needFancybox = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (needFancybox) {
|
2022-01-21 11:24:32 +08:00
|
|
|
stellar.loadCSS(stellar.plugins.fancybox.css);
|
|
|
|
stellar.loadScript(stellar.plugins.fancybox.js, { defer: true }).then(function () {
|
|
|
|
Fancybox.bind(selector, {
|
|
|
|
hideScrollbar: false,
|
|
|
|
Thumbs: {
|
|
|
|
autoStart: false,
|
|
|
|
},
|
2024-01-21 21:15:12 +08:00
|
|
|
caption: (fancybox, slide) => {
|
|
|
|
return slide.triggerEl.alt || null
|
2022-01-21 11:24:32 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
}
|
2022-01-27 13:46:11 +08:00
|
|
|
}
|
2022-03-02 14:50:45 +08:00
|
|
|
|
2022-11-27 17:16:38 +08:00
|
|
|
|
|
|
|
if (stellar.search.service) {
|
|
|
|
if (stellar.search.service == 'local_search') {
|
|
|
|
stellar.jQuery(() => {
|
|
|
|
stellar.loadScript('/js/search/local-search.js', { defer: true }).then(function () {
|
|
|
|
var $inputArea = $("input#search-input");
|
2022-12-15 12:59:39 +08:00
|
|
|
if ($inputArea.length == 0) {
|
|
|
|
return;
|
|
|
|
}
|
2022-11-27 17:16:38 +08:00
|
|
|
var $resultArea = document.querySelector("div#search-result");
|
|
|
|
$inputArea.focus(function() {
|
2022-11-28 23:07:50 +08:00
|
|
|
var path = stellar.search[stellar.search.service]?.path || '/search.json';
|
2023-02-13 10:03:17 +08:00
|
|
|
if (path.startsWith('/')) {
|
|
|
|
path = path.substring(1);
|
2022-11-27 21:22:18 +08:00
|
|
|
}
|
2023-02-13 10:03:17 +08:00
|
|
|
path = stellar.config.root + path;
|
2022-11-27 17:16:38 +08:00
|
|
|
const filter = $inputArea.attr('data-filter') || '';
|
2024-01-13 01:00:50 +08:00
|
|
|
searchFunc(path, filter, 'search-wrapper', 'search-input', 'search-result');
|
2022-11-27 17:16:38 +08:00
|
|
|
});
|
|
|
|
$inputArea.keydown(function(e) {
|
|
|
|
if (e.which == 13) {
|
|
|
|
e.preventDefault();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
var observer = new MutationObserver(function(mutationsList, observer) {
|
|
|
|
if (mutationsList.length == 1) {
|
|
|
|
if (mutationsList[0].addedNodes.length) {
|
|
|
|
$('.search-wrapper').removeClass('noresult');
|
|
|
|
} else if (mutationsList[0].removedNodes.length) {
|
|
|
|
$('.search-wrapper').addClass('noresult');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
observer.observe($resultArea, { childList: true });
|
|
|
|
});
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-03-02 14:50:45 +08:00
|
|
|
// heti
|
|
|
|
if (stellar.plugins.heti) {
|
|
|
|
stellar.loadCSS(stellar.plugins.heti.css);
|
|
|
|
stellar.loadScript(stellar.plugins.heti.js, { defer: true }).then(function () {
|
2022-05-15 11:44:54 +08:00
|
|
|
const heti = new Heti('.heti');
|
|
|
|
|
|
|
|
// Copied from heti.autoSpacing() without DOMContentLoaded.
|
|
|
|
// https://github.com/sivan/heti/blob/eadee6a3b748b3b7924a9e7d5b395d4bce479c9a/js/heti-addon.js
|
|
|
|
//
|
|
|
|
// We managed to minimize the code modification to ensure .autoSpacing()
|
|
|
|
// is synced with upstream; therefore, we use `.bind()` to emulate the
|
|
|
|
// behavior of .autoSpacing() so we can even modify almost no code.
|
|
|
|
void (function () {
|
|
|
|
const $$rootList = document.querySelectorAll(this.rootSelector)
|
|
|
|
|
|
|
|
for (let $$root of $$rootList) {
|
|
|
|
this.spacingElement($$root)
|
|
|
|
}
|
|
|
|
}).bind(heti)();
|
|
|
|
|
2022-03-02 14:50:45 +08:00
|
|
|
stellar.plugins.heti.enable = false;
|
|
|
|
});
|
|
|
|
}
|
2023-05-09 12:54:34 +08:00
|
|
|
|
|
|
|
if (stellar.plugins.copycode) {
|
|
|
|
stellar.loadScript(stellar.plugins.copycode.js, { defer: true })
|
|
|
|
}
|