提交 7ac2ef36 编写于 作者: L love109

Site updated: 2019-01-24 01:27:26

上级 37959186
......@@ -334,8 +334,8 @@
<script src="https://cdn.jsdelivr.net/vue/latest/vue.min.js"></script>
<script src="https://unpkg.com/botui/build/botui.min.js"></script>
<script>
(function(){
var botui = new BotUI('hello-mashiro');
function bot_ui_ini() {
var botui = new BotUI("hello-mashiro");
botui.message.add({
delay: 800,
content: "来啦老弟?我是小屋的管家,等你好久了~👋"
......@@ -351,7 +351,7 @@
botui.action.button({
delay: 1600,
action: [{
text: "然后嘞? 😃",
text: "然后呢? 😃",
value: "sure"
}, {
text: "少废话! 🙄",
......@@ -407,7 +407,7 @@
delay: 1100,
action: [{
text: "网站为什么叫“纪实小屋”呢? 🤔",
value: "why-jishi"
value: "why-mashiro"
}]
}).then(function (a) {
thirdpart()
......@@ -428,7 +428,7 @@
delay: 1500,
action: [{
text: "域名有什么含义吗? 🤔",
value: "why-love109"
value: "why-cat"
}]
}).then(function (a) {
fourthpart()
......@@ -438,7 +438,7 @@
fourthpart = function () {
botui.message.add({
delay: 1E3,
content: "域名对于主人们来说有着重要的含义 "
content: "域名对于主人们来说有着重要的含义"
}).then(function () {
botui.message.add({
delay: 1100,
......@@ -467,7 +467,8 @@
})
})
}
})
}
bot_ui_ini()
</script>
<!-- .entry-content -->
......
......@@ -509,7 +509,7 @@ function code_highlight_style() {
'autocapitalize': 'off',
'spellcheck': 'false',
'contenteditable': 'false',
'design': 'by Mashiro'
'design': 'by hojun'
}
var ele_name = $('pre:eq(' + i + ')')[0].children[0].className;
var lang = ele_name.substr(0, ele_name.indexOf(" ")).replace('language-', '');
......@@ -526,20 +526,18 @@ function code_highlight_style() {
$('pre code').each(function (i, block) {
hljs.highlightBlock(block);
});
for (var i = 0; i < $('pre').length; i++) {
for (var i = 0; i < $('article pre').length; i++) {
gen_top_bar(i);
}
hljs.initLineNumbersOnLoad();
$('pre').on('click', function (e) {
if (e.target !== this) return;
$(this).toggleClass('code-block-fullscreen');
$('html').toggleClass('code-block-fullscreen-html-scroll');
});
hljs.initLineNumbersOnLoad();
}
try {
code_highlight_style();
} catch (e) {}
function attach_image() {
$('#upload-img-file').change(function () {
if (this.files.length > 10) {
......@@ -960,9 +958,9 @@ var pjaxInit = function () {
if ($("div").hasClass("aplayer")) {
reloadHermit();
}
if ($("div").hasClass("popcontainer")) {
loadBotui();
}
// if ($("div").hasClass("popcontainer")) {
// loadBotui();
// }
try {
reload_show_date_time();
} catch (e) {}
......@@ -1097,12 +1095,12 @@ function grin(tag, type, before, after) {
myField.focus();
}
}
if ($("div").hasClass("popcontainer")) {
loadBotui();
}
$("bot-ui").click(function () {
loadBotui();
});
// if ($("div").hasClass("popcontainer")) {
// loadBotui();
// }
// $("bot-ui").click(function () {
// loadBotui();
// });
function add_copyright() {
document.body.addEventListener("copy", function (e) {
......@@ -1276,18 +1274,18 @@ function get_poem(poem_ele, info_ele) {
xhr.send();
}
function loadBotui() {
if ($('div').hasClass('popcontainer')) {
if (mashiro_global.variables.has_bot_ui) {
bot_ui_ini();
} else {
$.getScript('https://cdn.jsdelivr.net/gh/moezx/cdn@latest/js/botui/botui.js', function () {
bot_ui_ini();
mashiro_global.variables.has_bot_ui = true;
});
}
}
}
// function loadBotui() {
// if ($('div').hasClass('popcontainer')) {
// if (mashiro_global.variables.has_bot_ui) {
// bot_ui_ini();
// } else {
// $.getScript('https://cdn.jsdelivr.net/gh/moezx/cdn@latest/js/botui/botui.js', function () {
// bot_ui_ini();
// mashiro_global.variables.has_bot_ui = true;
// });
// }
// }
// }
function mail_me() {
var mail = "mailto:" + mashiro_option.email_name + "@" + mashiro_option.email_domain;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册