mirror of
https://dl.bcrjl.com/ghg/HaoOuBa/Joe.git
synced 2026-02-17 13:10:05 +08:00
更新
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -210,6 +210,31 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
$(window).on('scroll', () => calcProgress());
|
||||
}
|
||||
|
||||
/* 评论框点击切换画图模式和文本模式 */
|
||||
{
|
||||
$('.joe_comment__respond-type .item').on('click', function () {
|
||||
$(this).addClass('active').siblings().removeClass('active');
|
||||
if ($(this).attr('data-type') === 'draw') {
|
||||
$('.joe_comment__respond-form .body .draw').show().siblings().hide();
|
||||
$('#joe_comment_draw').prop('width', $('.joe_comment__respond-form .body').width());
|
||||
} else {
|
||||
$('.joe_comment__respond-form .body .text').show().siblings().hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* 激活画图功能 */
|
||||
{
|
||||
if ($('#joe_comment_draw').length !== 0) {
|
||||
window.sketchpad = new Sketchpad({
|
||||
element: '#joe_comment_draw',
|
||||
height: 300,
|
||||
penSize: 5,
|
||||
color: '303133'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* 懒加载 */
|
||||
new LazyLoad('.lazyload');
|
||||
|
||||
|
||||
@@ -33,7 +33,9 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
/* 设置文章内的链接为新窗口打开 */
|
||||
{
|
||||
$('.joe_detail__article a').each(() => $(this).attr({ target: '_blank', rel: 'noopener noreferrer nofollow' }));
|
||||
$('.joe_detail__article a').each(function () {
|
||||
$(this).attr({ target: '_blank', rel: 'noopener noreferrer nofollow' });
|
||||
});
|
||||
}
|
||||
|
||||
/* 当前页的CID */
|
||||
|
||||
1
assets/js/joe.sketchpad.js
Normal file
1
assets/js/joe.sketchpad.js
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user