mirror of
https://dl.bcrjl.com/ghg/HaoOuBa/Joe.git
synced 2026-02-17 13:10:05 +08:00
更新
This commit is contained in:
@@ -44,7 +44,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
/* 动态背景 */
|
||||
{
|
||||
if (!Joe.IS_MOBILE && Joe.DYNAMIC_BACKGROUND !== 'off' && Joe.DYNAMIC_BACKGROUND && !Joe.WALLPAPER_BACKGROUND_PC) {
|
||||
$.getScript(`/usr/themes/Joe/assets/backdrop/${Joe.DYNAMIC_BACKGROUND}`);
|
||||
$.getScript(window.Joe.THEME_URL + `assets/backdrop/${Joe.DYNAMIC_BACKGROUND}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -500,16 +500,17 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
{
|
||||
if ($('.joe_owo__contain').length > 0 && $('.joe_owo__target').length > 0) {
|
||||
$.ajax({
|
||||
url: '/usr/themes/Joe/assets/json/joe.owo.json',
|
||||
url: window.Joe.THEME_URL + 'assets/json/joe.owo.json',
|
||||
dataType: 'json',
|
||||
success(res) {
|
||||
let barStr = '';
|
||||
let scrollStr = '';
|
||||
for (let key in res) {
|
||||
barStr += `<div class="item" data-index="${res[key].index}">${key}</div>`;
|
||||
const item = res[key];
|
||||
barStr += `<div class="item" data-type="${key}">${key}</div>`;
|
||||
scrollStr += `
|
||||
<ul class="scroll" data-index="${res[key].index}">
|
||||
${res[key].container.map(_ => `<li class="item" data-text="${_.data}">${_.icon}</li>`).join('')}
|
||||
<ul class="scroll" data-type="${key}">
|
||||
${item.map(_ => `<li class="item" data-text="${_.data}">${key === '颜文字' ? `${_.icon}` : `<img src="${window.Joe.THEME_URL + _.icon}" alt="${_.data}"/>`}</li>`).join('')}
|
||||
</ul>
|
||||
`;
|
||||
}
|
||||
@@ -530,15 +531,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
$('.joe_owo__contain .box .bar .item').on('click', function (e) {
|
||||
e.stopPropagation();
|
||||
$(this).addClass('active').siblings().removeClass('active');
|
||||
const scrollIndx = '.joe_owo__contain .box .scroll[data-index="' + $(this).attr('data-index') + '"]';
|
||||
const scrollIndx = '.joe_owo__contain .box .scroll[data-type="' + $(this).attr('data-type') + '"]';
|
||||
$(scrollIndx).show().siblings('.scroll').hide();
|
||||
});
|
||||
/* 点击表情,向文本框插入内容 */
|
||||
$('.joe_owo__contain .scroll .item').on('click', function () {
|
||||
const text = $(this).attr('data-text');
|
||||
$('.joe_owo__target').insertContent(text);
|
||||
});
|
||||
/* 默认激活第一个 */
|
||||
$('.joe_owo__contain .box .bar .item').first().click();
|
||||
}
|
||||
});
|
||||
|
||||
2
assets/js/joe.global.min.js
vendored
2
assets/js/joe.global.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,60 +1,60 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const p = new URLSearchParams(window.location.search);
|
||||
if (!p.get('profileRoom')) initLiveList();
|
||||
function initLiveList() {
|
||||
let queryData = {
|
||||
page: 1,
|
||||
gameId: '',
|
||||
index: 0,
|
||||
isLoading: false,
|
||||
totalPage: 0
|
||||
};
|
||||
$('.joe_live__type-title .icon').on('click', function () {
|
||||
if (queryData.isLoading) return;
|
||||
if (queryData.index === 3) queryData.index = 0;
|
||||
queryData.index++;
|
||||
renderLiveType();
|
||||
});
|
||||
$('.joe_live__type-list').on('click', '.item', function () {
|
||||
if (queryData.isLoading) return;
|
||||
$(this).addClass('active').siblings().removeClass('active');
|
||||
queryData.page = 1;
|
||||
queryData.gameId = $(this).attr('data-gameId');
|
||||
renderLiveList();
|
||||
});
|
||||
renderLiveType();
|
||||
function renderLiveType() {
|
||||
$.ajax({
|
||||
url: '/usr/themes/Joe/assets/json/joe.live.json',
|
||||
dataType: 'json',
|
||||
success(res) {
|
||||
const item = res[queryData.index];
|
||||
$('.joe_live__type-title .text').html(item.name);
|
||||
let htmlStr = '<li class="item animated swing" data-gameId="">全部</li>';
|
||||
item.list.forEach(_ => (htmlStr += `<li class="item animated swing" data-gameId="${_.gameId}">${_.name}</li>`));
|
||||
$('.joe_live__type-list').html(htmlStr);
|
||||
$('.joe_live__type-list .item').first().click();
|
||||
}
|
||||
});
|
||||
}
|
||||
function renderLiveList() {
|
||||
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||
queryData.isLoading = true;
|
||||
$('.joe_live__list').html('');
|
||||
$.ajax({
|
||||
url: Joe.BASE_API,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
routeType: 'huya_list',
|
||||
page: queryData.page,
|
||||
gameId: queryData.gameId
|
||||
},
|
||||
success(res) {
|
||||
if (res.code !== 1) return;
|
||||
let htmlStr = '';
|
||||
res.data.datas.forEach(_ => {
|
||||
htmlStr += `
|
||||
const p = new URLSearchParams(window.location.search);
|
||||
if (!p.get('profileRoom')) initLiveList();
|
||||
function initLiveList() {
|
||||
let queryData = {
|
||||
page: 1,
|
||||
gameId: '',
|
||||
index: 0,
|
||||
isLoading: false,
|
||||
totalPage: 0
|
||||
};
|
||||
$('.joe_live__type-title .icon').on('click', function () {
|
||||
if (queryData.isLoading) return;
|
||||
if (queryData.index === 3) queryData.index = 0;
|
||||
queryData.index++;
|
||||
renderLiveType();
|
||||
});
|
||||
$('.joe_live__type-list').on('click', '.item', function () {
|
||||
if (queryData.isLoading) return;
|
||||
$(this).addClass('active').siblings().removeClass('active');
|
||||
queryData.page = 1;
|
||||
queryData.gameId = $(this).attr('data-gameId');
|
||||
renderLiveList();
|
||||
});
|
||||
renderLiveType();
|
||||
function renderLiveType() {
|
||||
$.ajax({
|
||||
url: window.Joe.THEME_URL + 'assets/json/joe.live.json',
|
||||
dataType: 'json',
|
||||
success(res) {
|
||||
const item = res[queryData.index];
|
||||
$('.joe_live__type-title .text').html(item.name);
|
||||
let htmlStr = '<li class="item animated swing" data-gameId="">全部</li>';
|
||||
item.list.forEach(_ => (htmlStr += `<li class="item animated swing" data-gameId="${_.gameId}">${_.name}</li>`));
|
||||
$('.joe_live__type-list').html(htmlStr);
|
||||
$('.joe_live__type-list .item').first().click();
|
||||
}
|
||||
});
|
||||
}
|
||||
function renderLiveList() {
|
||||
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||
queryData.isLoading = true;
|
||||
$('.joe_live__list').html('');
|
||||
$.ajax({
|
||||
url: Joe.BASE_API,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
routeType: 'huya_list',
|
||||
page: queryData.page,
|
||||
gameId: queryData.gameId
|
||||
},
|
||||
success(res) {
|
||||
if (res.code !== 1) return;
|
||||
let htmlStr = '';
|
||||
res.data.datas.forEach(_ => {
|
||||
htmlStr += `
|
||||
<a target="_blank" rel="noopener noreferrer nofollow" class="joe_live__list-item animated bounceIn" href="${window.location.href + '?profileRoom=' + _.profileRoom + '&title=' + _.nick}">
|
||||
<div class="thumb">
|
||||
<i class="recommendTagName" style="display: ${_.recommendTagName ? '' : 'none'}">${_.recommendTagName}</i>
|
||||
@@ -75,46 +75,46 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
</div>
|
||||
</a>
|
||||
`;
|
||||
});
|
||||
$('.joe_live__list').html(htmlStr);
|
||||
queryData.totalPage = res.data.totalPage;
|
||||
initPagination();
|
||||
},
|
||||
complete: () => (queryData.isLoading = false)
|
||||
});
|
||||
}
|
||||
function initPagination() {
|
||||
let htmlStr = '';
|
||||
if (queryData.page != 1) {
|
||||
htmlStr += `
|
||||
});
|
||||
$('.joe_live__list').html(htmlStr);
|
||||
queryData.totalPage = res.data.totalPage;
|
||||
initPagination();
|
||||
},
|
||||
complete: () => (queryData.isLoading = false)
|
||||
});
|
||||
}
|
||||
function initPagination() {
|
||||
let htmlStr = '';
|
||||
if (queryData.page != 1) {
|
||||
htmlStr += `
|
||||
<li class="joe_live__pagination-item" data-page="1">首页</li>
|
||||
<li class="joe_live__pagination-item" data-page="${queryData.page - 1}">
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="12" height="12"><path d="M822.272 146.944l-396.8 396.8c-19.456 19.456-51.2 19.456-70.656 0-18.944-19.456-18.944-51.2 0-70.656l396.8-396.8c19.456-19.456 51.2-19.456 70.656 0 18.944 19.456 18.944 45.056 0 70.656z"/><path d="M745.472 940.544l-396.8-396.8c-19.456-19.456-19.456-51.2 0-70.656 19.456-19.456 51.2-19.456 70.656 0l403.456 390.144c19.456 25.6 19.456 51.2 0 76.8-26.112 19.968-51.712 19.968-77.312.512zm-564.224-63.488c0-3.584 0-7.68.512-11.264h-.512v-714.24h.512c-.512-3.584-.512-7.168-.512-11.264 0-43.008 21.504-78.336 48.128-78.336s48.128 34.816 48.128 78.336c0 3.584 0 7.68-.512 11.264h.512v714.24h-.512c.512 3.584.512 7.168.512 11.264 0 43.008-21.504 78.336-48.128 78.336s-48.128-35.328-48.128-78.336z"/></svg>
|
||||
</li>
|
||||
<li class="joe_live__pagination-item" data-page="${queryData.page - 1}">${queryData.page - 1}</li>
|
||||
`;
|
||||
}
|
||||
htmlStr += `<li class="joe_live__pagination-item active">${queryData.page}</li>`;
|
||||
if (queryData.page != queryData.totalPage) {
|
||||
htmlStr += `
|
||||
}
|
||||
htmlStr += `<li class="joe_live__pagination-item active">${queryData.page}</li>`;
|
||||
if (queryData.page != queryData.totalPage) {
|
||||
htmlStr += `
|
||||
<li class="joe_live__pagination-item" data-page="${queryData.page + 1}">${queryData.page + 1}</li>
|
||||
<li class="joe_live__pagination-item" data-page="${queryData.page + 1}">
|
||||
<svg class="next" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="12" height="12"><path d="M822.272 146.944l-396.8 396.8c-19.456 19.456-51.2 19.456-70.656 0-18.944-19.456-18.944-51.2 0-70.656l396.8-396.8c19.456-19.456 51.2-19.456 70.656 0 18.944 19.456 18.944 45.056 0 70.656z"/><path d="M745.472 940.544l-396.8-396.8c-19.456-19.456-19.456-51.2 0-70.656 19.456-19.456 51.2-19.456 70.656 0l403.456 390.144c19.456 25.6 19.456 51.2 0 76.8-26.112 19.968-51.712 19.968-77.312.512zm-564.224-63.488c0-3.584 0-7.68.512-11.264h-.512v-714.24h.512c-.512-3.584-.512-7.168-.512-11.264 0-43.008 21.504-78.336 48.128-78.336s48.128 34.816 48.128 78.336c0 3.584 0 7.68-.512 11.264h.512v714.24h-.512c.512 3.584.512 7.168.512 11.264 0 43.008-21.504 78.336-48.128 78.336s-48.128-35.328-48.128-78.336z"/></svg>
|
||||
</li>
|
||||
`;
|
||||
}
|
||||
if (queryData.page < queryData.totalPage) htmlStr += `<li class="joe_live__pagination-item" data-page="${queryData.totalPage}">末页</li>`;
|
||||
$('.joe_live__pagination').html(htmlStr);
|
||||
}
|
||||
$('.joe_live__pagination').on('click', '.joe_live__pagination-item', function () {
|
||||
const page = $(this).attr('data-page');
|
||||
if (!page || queryData.isLoading) return;
|
||||
queryData.page = Number(page);
|
||||
renderLiveList();
|
||||
});
|
||||
function parseNum(num = 0) {
|
||||
if (num >= 10000) return Math.round(num / 1000) / 10 + '万';
|
||||
return num;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (queryData.page < queryData.totalPage) htmlStr += `<li class="joe_live__pagination-item" data-page="${queryData.totalPage}">末页</li>`;
|
||||
$('.joe_live__pagination').html(htmlStr);
|
||||
}
|
||||
$('.joe_live__pagination').on('click', '.joe_live__pagination-item', function () {
|
||||
const page = $(this).attr('data-page');
|
||||
if (!page || queryData.isLoading) return;
|
||||
queryData.page = Number(page);
|
||||
renderLiveList();
|
||||
});
|
||||
function parseNum(num = 0) {
|
||||
if (num >= 10000) return Math.round(num / 1000) / 10 + '万';
|
||||
return num;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
2
assets/js/joe.live.min.js
vendored
2
assets/js/joe.live.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -63,7 +63,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
/* 激活图片预览功能 */
|
||||
{
|
||||
$('.joe_detail__article img:not(img.owo_image)').each(function () {
|
||||
$(this).wrap($(`<span data-fancybox="Joe" href="${$(this).attr('src')}"></span>`));
|
||||
$(this).wrap($(`<span style="display: block;" data-fancybox="Joe" href="${$(this).attr('src')}"></span>`));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
2
assets/js/joe.post_page.min.js
vendored
2
assets/js/joe.post_page.min.js
vendored
@@ -1 +1 @@
|
||||
document.addEventListener("DOMContentLoaded",()=>{const e=e=>window.btoa(unescape(encodeURIComponent(e))),t=e=>decodeURIComponent(escape(window.atob(e))),a=$(".joe_detail").attr("data-cid");$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"baidu_record",site:window.location.href},success(e){if(e.data&&"已收录"===e.data)$("#Joe_Baidu_Record").css("color","#67C23A"),$("#Joe_Baidu_Record").html("已收录");else if(Joe.BAIDU_PUSH){$("#Joe_Baidu_Record").html('<span style="color: #E6A23C">未收录,推送中...</span>');const e=setTimeout(function(){$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"baidu_push",domain:window.location.protocol+"//"+window.location.hostname,url:encodeURI(window.location.href)},success(e){e.data.error?$("#Joe_Baidu_Record").html('<span style="color: #F56C6C">推送失败,请检查!</span>'):$("#Joe_Baidu_Record").html('<span style="color: #67C23A">推送成功!</span>')}}),clearTimeout(e)},1e3)}else{const e=`https://ziyuan.baidu.com/linksubmit/url?sitename=${encodeURI(window.location.href)}`;$("#Joe_Baidu_Record").html(`<a target="_blank" href="${e}" rel="noopener noreferrer nofollow" style="color: #F56C6C">未收录,提交收录</a>`)}}}),Prism.highlightAll(),$("pre[class*='language-']").each(function(e,t){let a=$(t).find("code[class*='language-']").text(),o=$('<span class="copy"><i class="fa fa-clone"></i></span>');new ClipboardJS(o[0],{text:()=>a}).on("success",()=>Qmsg.success("复制成功!")),$(t).append(o)}),$(".joe_detail__article img:not(img.owo_image)").each(function(){$(this).wrap($(`<span data-fancybox="Joe" href="${$(this).attr("src")}"></span>`))}),$(".joe_detail__article a:not(.joe_detail__article-anote)").each(function(){$(this).attr({target:"_blank",rel:"noopener noreferrer nofollow"})});{let o=localStorage.getItem(e("views"))?JSON.parse(t(localStorage.getItem(e("views")))):[];const i=o.includes(a);i||$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"handle_views",cid:a},success(t){if(1!==t.code)return;$("#Joe_Article_Views").html(`${t.data.views} 阅读`),o.push(a);const i=e("views"),s=e(JSON.stringify(o));localStorage.setItem(i,s)}})}{let o=localStorage.getItem(e("agree"))?JSON.parse(t(localStorage.getItem(e("agree")))):[];o.includes(a)?$(".joe_detail__agree .icon-1").addClass("active"):$(".joe_detail__agree .icon-2").addClass("active");let i=!1;$(".joe_detail__agree .icon").on("click",function(){if(i)return;i=!0,o=localStorage.getItem(e("agree"))?JSON.parse(t(localStorage.getItem(e("agree")))):[];let s=o.includes(a);$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"handle_agree",cid:a,type:s?"disagree":"agree"},success(t){if(1!==t.code)return;if($(".joe_detail__agree .text").html(t.data.agree),s){const e=o.findIndex(e=>e===a);o.splice(e,1),$(".joe_detail__agree .icon-1").removeClass("active"),$(".joe_detail__agree .icon-2").addClass("active"),$(".joe_detail__agree .icon").removeClass("active")}else o.push(a),$(".joe_detail__agree .icon-2").removeClass("active"),$(".joe_detail__agree .icon-1").addClass("active"),$(".joe_detail__agree .icon").addClass("active");const i=e("agree"),n=e(JSON.stringify(o));localStorage.setItem(i,n)},complete(){i=!1}})})}$(".joe_comment .joe_pagination a").each((e,t)=>{const a=$(t).attr("href");a&&a.includes("#")&&$(t).attr("href",a.replace("#comments","?scroll=joe_comment"))});{let e=!1;$(".joe_detail__article-protected").on("submit",function(t){t.preventDefault();const o=$(this).attr("action")+"&time="+ +new Date,i=$(this).find('input[type="password"]').val();if(""===i.trim())return Qmsg.info("请输入访问密码!");e||(e=!0,$.ajax({url:o,type:"POST",data:{cid:a,protectPassword:i},dataType:"text",success(t){let a=[],o="";a=$(t).contents(),Array.from(a).forEach(e=>{"container"===e.parentNode.className&&(o=e)}),/Joe/.test(t)?location.reload():(Qmsg.warning(o.textContent.trim()||""),e=!1,$(".joe_comment__respond-form .foot .submit button").html("发表评论"))}}))})}if($(".joe_detail__article-video").length>0){const e=$(".joe_detail__article-video .play iframe").attr("data-player");$(".joe_detail__article-video .episodes .item").on("click",function(){$(this).addClass("active").siblings().removeClass("active");const t=$(this).attr("data-src");$(".joe_detail__article-video .play iframe").attr({src:e+t})}),$(".joe_detail__article-video .episodes .item").first().click()}}),window.addEventListener("load",function(){{const e=new URLSearchParams(location.search).get("scroll");if(e){const t=$(".joe_header").height();let a=null;if(a=$("#"+e).length>0?$("#"+e):$("."+e),a&&a.length>0){const e=a.offset().top-t-15;window.scrollTo({top:e,behavior:"smooth"})}}}});
|
||||
document.addEventListener("DOMContentLoaded",()=>{const e=e=>window.btoa(unescape(encodeURIComponent(e))),t=e=>decodeURIComponent(escape(window.atob(e))),a=$(".joe_detail").attr("data-cid");$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"baidu_record",site:window.location.href},success(e){if(e.data&&"已收录"===e.data)$("#Joe_Baidu_Record").css("color","#67C23A"),$("#Joe_Baidu_Record").html("已收录");else if(Joe.BAIDU_PUSH){$("#Joe_Baidu_Record").html('<span style="color: #E6A23C">未收录,推送中...</span>');const e=setTimeout(function(){$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"baidu_push",domain:window.location.protocol+"//"+window.location.hostname,url:encodeURI(window.location.href)},success(e){e.data.error?$("#Joe_Baidu_Record").html('<span style="color: #F56C6C">推送失败,请检查!</span>'):$("#Joe_Baidu_Record").html('<span style="color: #67C23A">推送成功!</span>')}}),clearTimeout(e)},1e3)}else{const e=`https://ziyuan.baidu.com/linksubmit/url?sitename=${encodeURI(window.location.href)}`;$("#Joe_Baidu_Record").html(`<a target="_blank" href="${e}" rel="noopener noreferrer nofollow" style="color: #F56C6C">未收录,提交收录</a>`)}}}),Prism.highlightAll(),$("pre[class*='language-']").each(function(e,t){let a=$(t).find("code[class*='language-']").text(),o=$('<span class="copy"><i class="fa fa-clone"></i></span>');new ClipboardJS(o[0],{text:()=>a}).on("success",()=>Qmsg.success("复制成功!")),$(t).append(o)}),$(".joe_detail__article img:not(img.owo_image)").each(function(){$(this).wrap($(`<span style="display: block;" data-fancybox="Joe" href="${$(this).attr("src")}"></span>`))}),$(".joe_detail__article a:not(.joe_detail__article-anote)").each(function(){$(this).attr({target:"_blank",rel:"noopener noreferrer nofollow"})});{let o=localStorage.getItem(e("views"))?JSON.parse(t(localStorage.getItem(e("views")))):[];const i=o.includes(a);i||$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"handle_views",cid:a},success(t){if(1!==t.code)return;$("#Joe_Article_Views").html(`${t.data.views} 阅读`),o.push(a);const i=e("views"),s=e(JSON.stringify(o));localStorage.setItem(i,s)}})}{let o=localStorage.getItem(e("agree"))?JSON.parse(t(localStorage.getItem(e("agree")))):[];o.includes(a)?$(".joe_detail__agree .icon-1").addClass("active"):$(".joe_detail__agree .icon-2").addClass("active");let i=!1;$(".joe_detail__agree .icon").on("click",function(){if(i)return;i=!0,o=localStorage.getItem(e("agree"))?JSON.parse(t(localStorage.getItem(e("agree")))):[];let s=o.includes(a);$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"handle_agree",cid:a,type:s?"disagree":"agree"},success(t){if(1!==t.code)return;if($(".joe_detail__agree .text").html(t.data.agree),s){const e=o.findIndex(e=>e===a);o.splice(e,1),$(".joe_detail__agree .icon-1").removeClass("active"),$(".joe_detail__agree .icon-2").addClass("active"),$(".joe_detail__agree .icon").removeClass("active")}else o.push(a),$(".joe_detail__agree .icon-2").removeClass("active"),$(".joe_detail__agree .icon-1").addClass("active"),$(".joe_detail__agree .icon").addClass("active");const i=e("agree"),n=e(JSON.stringify(o));localStorage.setItem(i,n)},complete(){i=!1}})})}$(".joe_comment .joe_pagination a").each((e,t)=>{const a=$(t).attr("href");a&&a.includes("#")&&$(t).attr("href",a.replace("#comments","?scroll=joe_comment"))});{let e=!1;$(".joe_detail__article-protected").on("submit",function(t){t.preventDefault();const o=$(this).attr("action")+"&time="+ +new Date,i=$(this).find('input[type="password"]').val();if(""===i.trim())return Qmsg.info("请输入访问密码!");e||(e=!0,$.ajax({url:o,type:"POST",data:{cid:a,protectPassword:i},dataType:"text",success(t){let a=[],o="";a=$(t).contents(),Array.from(a).forEach(e=>{"container"===e.parentNode.className&&(o=e)}),/Joe/.test(t)?location.reload():(Qmsg.warning(o.textContent.trim()||""),e=!1,$(".joe_comment__respond-form .foot .submit button").html("发表评论"))}}))})}if($(".joe_detail__article-video").length>0){const e=$(".joe_detail__article-video .play iframe").attr("data-player");$(".joe_detail__article-video .episodes .item").on("click",function(){$(this).addClass("active").siblings().removeClass("active");const t=$(this).attr("data-src");$(".joe_detail__article-video .play iframe").attr({src:e+t})}),$(".joe_detail__article-video .episodes .item").first().click()}}),window.addEventListener("load",function(){{const e=new URLSearchParams(location.search).get("scroll");if(e){const t=$(".joe_header").height();let a=null;if(a=$("#"+e).length>0?$("#"+e):$("."+e),a&&a.length>0){const e=a.offset().top-t-15;window.scrollTo({top:e,behavior:"smooth"})}}}});
|
||||
Reference in New Issue
Block a user