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

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

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