更新
This commit is contained in:
parent
05a76e265f
commit
93bfd92d7a
@ -170,6 +170,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: Joe.BASE_API,
|
url: Joe.BASE_API,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
data: { routeType: 'aside_ranking' },
|
data: { routeType: 'aside_ranking' },
|
||||||
success(res) {
|
success(res) {
|
||||||
$('.joe_aside__item.ranking .joe_aside__item-title .text').html(res.title);
|
$('.joe_aside__item.ranking .joe_aside__item-title .text').html(res.title);
|
||||||
@ -322,7 +323,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
url,
|
url,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: { author, mail, text, parent },
|
data: { author, mail, text, parent },
|
||||||
datatype: 'text',
|
dataType: 'text',
|
||||||
success(res) {
|
success(res) {
|
||||||
let arr = [],
|
let arr = [],
|
||||||
str = '';
|
str = '';
|
||||||
@ -449,6 +450,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
if ($('.joe_owo__contain').length > 0 && $('.joe_owo__target').length > 0) {
|
if ($('.joe_owo__contain').length > 0 && $('.joe_owo__target').length > 0) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/usr/themes/Joe/assets/json/joe.owo.json',
|
url: '/usr/themes/Joe/assets/json/joe.owo.json',
|
||||||
|
dataType: 'json',
|
||||||
success(res) {
|
success(res) {
|
||||||
let barStr = '';
|
let barStr = '';
|
||||||
let scrollStr = '';
|
let scrollStr = '';
|
||||||
|
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
@ -158,6 +158,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: Joe.BASE_API,
|
url: Joe.BASE_API,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
data: { routeType: 'publish_list', page: queryData.page, pageSize: queryData.pageSize, type: queryData.type },
|
data: { routeType: 'publish_list', page: queryData.page, pageSize: queryData.pageSize, type: queryData.type },
|
||||||
success(res) {
|
success(res) {
|
||||||
if (res.data.length === 0) {
|
if (res.data.length === 0) {
|
||||||
|
2
assets/js/joe.index.min.js
vendored
2
assets/js/joe.index.min.js
vendored
File diff suppressed because one or more lines are too long
@ -10,6 +10,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: Joe.BASE_API,
|
url: Joe.BASE_API,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
data: { routeType: 'baidu_record', site: window.location.href },
|
data: { routeType: 'baidu_record', site: window.location.href },
|
||||||
success(res) {
|
success(res) {
|
||||||
if (res.data && res.data === '已收录') {
|
if (res.data && res.data === '已收录') {
|
||||||
@ -23,6 +24,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: Joe.BASE_API,
|
url: Joe.BASE_API,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
routeType: 'baidu_push',
|
routeType: 'baidu_push',
|
||||||
domain: encodeURI(window.location.hostname),
|
domain: encodeURI(window.location.hostname),
|
||||||
@ -55,6 +57,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: Joe.BASE_API,
|
url: Joe.BASE_API,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
data: { routeType: 'handle_views', cid },
|
data: { routeType: 'handle_views', cid },
|
||||||
success(res) {
|
success(res) {
|
||||||
if (res.code !== 1) return;
|
if (res.code !== 1) return;
|
||||||
|
2
assets/js/joe.leaving.min.js
vendored
2
assets/js/joe.leaving.min.js
vendored
@ -1 +1 @@
|
|||||||
document.addEventListener("DOMContentLoaded",()=>{const e=e=>window.btoa(unescape(encodeURIComponent(e))),o=e=>decodeURIComponent(escape(window.atob(e))),t=$(".joe_detail").attr("data-cid");$.ajax({url:Joe.BASE_API,type:"POST",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",data:{routeType:"baidu_push",domain:encodeURI(window.location.hostname),url:encodeURI(window.location.href)},success(e){e.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>`)}}});{let a=localStorage.getItem(e("views"))?JSON.parse(o(localStorage.getItem(e("views")))):[];const n=a.includes(t);n||$.ajax({url:Joe.BASE_API,type:"POST",data:{routeType:"handle_views",cid:t},success(o){if(1!==o.code)return;$("#Joe_Article_Views").html(`${o.data.views} 阅读`),a.push(t);const n=e("views"),i=e(JSON.stringify(a));localStorage.setItem(n,i)}})}{let e=100;const o=["#F8D800","#0396FF","#EA5455","#7367F0","#32CCBC","#F6416C","#28C76F","#9F44D3","#F55555","#736EFE","#E96D71","#DE4313","#D939CD","#4C83FF","#F072B6","#C346C2","#5961F9","#FD6585","#465EFB","#FFC600","#FA742B","#5151E5","#BB4E75","#FF52E5","#49C628","#00EAFF","#F067B4","#F067B4","#ff9a9e","#00f2fe","#4facfe","#f093fb","#6fa3ef","#bc99c4","#46c47c","#f9bb3c","#e8583d","#f68e5f"],t=(e,o)=>Math.floor(Math.random()*(o-e+1))+e,a=$(".joe_detail__leaving-list").width(),n=$(".joe_detail__leaving-list").height(),i=["20px 300px","20px 400px","20px 500px","30px 300px","30px 400px","30px 500px","40px 300px","40px 400px","40px 500px"],l=["300px 20px","400px 20px","500px 20px","300px 30px","400px 30px","500px 30px","300px 40px","400px 40px","500px 40px"];$(".joe_detail__leaving-list .item").each((c,s)=>{const d=t(1,99),r=o[t(0,o.length-1)],p=Math.ceil($(s).width()),h=Math.ceil($(s).height()),x=t(0,n-h),u=t(0,a-p);$(s).css({display:"block",zIndex:d,background:r,top:x,left:u,borderTopLeftRadius:l[t(0,l.length-1)],borderTopRightRadius:i[t(0,i.length-1)],borderBottomLeftRadius:i[t(0,i.length-1)],borderBottomRightRadius:i[t(0,i.length-1)]}),$(s).draggabilly({containment:!0}),$(s).on("dragStart",o=>{e++,$(s).css({zIndex:e})})})}$(".joe_comment .joe_pagination a").each((e,o)=>{const t=$(o).attr("href");t&&t.includes("#")&&$(o).attr("href",t.replace("#comments","?scroll=joe_comment"))})}),window.addEventListener("load",function(){{const e=new URLSearchParams(location.search).get("scroll");if(e){const o=$(".joe_header").height();let t=null;if(t=$("#"+e).length>0?$("#"+e):$("."+e),t&&t.length>0){const e=t.offset().top-o-15;window.scrollTo({top:e,behavior:"smooth"})}}}});
|
document.addEventListener("DOMContentLoaded",()=>{const e=e=>window.btoa(unescape(encodeURIComponent(e))),o=e=>decodeURIComponent(escape(window.atob(e))),t=$(".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:encodeURI(window.location.hostname),url:encodeURI(window.location.href)},success(e){e.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>`)}}});{let a=localStorage.getItem(e("views"))?JSON.parse(o(localStorage.getItem(e("views")))):[];const n=a.includes(t);n||$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"handle_views",cid:t},success(o){if(1!==o.code)return;$("#Joe_Article_Views").html(`${o.data.views} 阅读`),a.push(t);const n=e("views"),i=e(JSON.stringify(a));localStorage.setItem(n,i)}})}{let e=100;const o=["#F8D800","#0396FF","#EA5455","#7367F0","#32CCBC","#F6416C","#28C76F","#9F44D3","#F55555","#736EFE","#E96D71","#DE4313","#D939CD","#4C83FF","#F072B6","#C346C2","#5961F9","#FD6585","#465EFB","#FFC600","#FA742B","#5151E5","#BB4E75","#FF52E5","#49C628","#00EAFF","#F067B4","#F067B4","#ff9a9e","#00f2fe","#4facfe","#f093fb","#6fa3ef","#bc99c4","#46c47c","#f9bb3c","#e8583d","#f68e5f"],t=(e,o)=>Math.floor(Math.random()*(o-e+1))+e,a=$(".joe_detail__leaving-list").width(),n=$(".joe_detail__leaving-list").height(),i=["20px 300px","20px 400px","20px 500px","30px 300px","30px 400px","30px 500px","40px 300px","40px 400px","40px 500px"],l=["300px 20px","400px 20px","500px 20px","300px 30px","400px 30px","500px 30px","300px 40px","400px 40px","500px 40px"];$(".joe_detail__leaving-list .item").each((c,s)=>{const d=t(1,99),r=o[t(0,o.length-1)],p=Math.ceil($(s).width()),h=Math.ceil($(s).height()),x=t(0,n-h),u=t(0,a-p);$(s).css({display:"block",zIndex:d,background:r,top:x,left:u,borderTopLeftRadius:l[t(0,l.length-1)],borderTopRightRadius:i[t(0,i.length-1)],borderBottomLeftRadius:i[t(0,i.length-1)],borderBottomRightRadius:i[t(0,i.length-1)]}),$(s).draggabilly({containment:!0}),$(s).on("dragStart",o=>{e++,$(s).css({zIndex:e})})})}$(".joe_comment .joe_pagination a").each((e,o)=>{const t=$(o).attr("href");t&&t.includes("#")&&$(o).attr("href",t.replace("#comments","?scroll=joe_comment"))})}),window.addEventListener("load",function(){{const e=new URLSearchParams(location.search).get("scroll");if(e){const o=$(".joe_header").height();let t=null;if(t=$("#"+e).length>0?$("#"+e):$("."+e),t&&t.length>0){const e=t.offset().top-o-15;window.scrollTo({top:e,behavior:"smooth"})}}}});
|
@ -26,6 +26,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
function renderLiveType() {
|
function renderLiveType() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/usr/themes/Joe/assets/json/joe.live.json',
|
url: '/usr/themes/Joe/assets/json/joe.live.json',
|
||||||
|
dataType: 'json',
|
||||||
success(res) {
|
success(res) {
|
||||||
const item = res[queryData.index];
|
const item = res[queryData.index];
|
||||||
$('.joe_live__type-title .text').html(item.name);
|
$('.joe_live__type-title .text').html(item.name);
|
||||||
@ -43,6 +44,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: Joe.BASE_API,
|
url: Joe.BASE_API,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
routeType: 'huya_list',
|
routeType: 'huya_list',
|
||||||
page: queryData.page,
|
page: queryData.page,
|
||||||
|
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
@ -10,6 +10,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: Joe.BASE_API,
|
url: Joe.BASE_API,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
data: { routeType: 'baidu_record', site: window.location.href },
|
data: { routeType: 'baidu_record', site: window.location.href },
|
||||||
success(res) {
|
success(res) {
|
||||||
if (res.data && res.data === '已收录') {
|
if (res.data && res.data === '已收录') {
|
||||||
@ -23,6 +24,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: Joe.BASE_API,
|
url: Joe.BASE_API,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
routeType: 'baidu_push',
|
routeType: 'baidu_push',
|
||||||
domain: encodeURI(window.location.hostname),
|
domain: encodeURI(window.location.hostname),
|
||||||
@ -80,6 +82,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: Joe.BASE_API,
|
url: Joe.BASE_API,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
data: { routeType: 'handle_views', cid },
|
data: { routeType: 'handle_views', cid },
|
||||||
success(res) {
|
success(res) {
|
||||||
if (res.code !== 1) return;
|
if (res.code !== 1) return;
|
||||||
@ -107,6 +110,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: Joe.BASE_API,
|
url: Joe.BASE_API,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
data: { routeType: 'handle_agree', cid, type: flag ? 'disagree' : 'agree' },
|
data: { routeType: 'handle_agree', cid, type: flag ? 'disagree' : 'agree' },
|
||||||
success(res) {
|
success(res) {
|
||||||
if (res.code !== 1) return;
|
if (res.code !== 1) return;
|
||||||
@ -161,7 +165,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
cid,
|
cid,
|
||||||
protectPassword
|
protectPassword
|
||||||
},
|
},
|
||||||
datatype: 'text',
|
dataType: 'text',
|
||||||
success(res) {
|
success(res) {
|
||||||
let arr = [],
|
let arr = [],
|
||||||
str = '';
|
str = '';
|
||||||
|
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",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",data:{routeType:"baidu_push",domain:encodeURI(window.location.hostname),url:encodeURI(window.location.href)},success(e){e.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",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",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"),c=e(JSON.stringify(o));localStorage.setItem(i,c)},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:encodeURI(window.location.hostname),url:encodeURI(window.location.href)},success(e){e.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"})}}}});
|
@ -1,13 +1,42 @@
|
|||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
/*
|
/* 网易云音乐 - 单首 - 已测试 √ */
|
||||||
*
|
class JoeMusic extends HTMLElement {
|
||||||
*
|
constructor() {
|
||||||
* *
|
super();
|
||||||
* 开放类组件
|
this.options = {
|
||||||
* *
|
id: this.getAttribute('id'),
|
||||||
*
|
width: this.getAttribute('width') || '100%',
|
||||||
*
|
height: this.getAttribute('height') || '86px',
|
||||||
*/
|
autoplay: this.getAttribute('autoplay') ? 1 : 0
|
||||||
|
};
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
get template() {
|
||||||
|
return `
|
||||||
|
<style>
|
||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.container iframe {
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
border: none;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="container">
|
||||||
|
<iframe src="//music.163.com/outchain/player?type=2&id=${this.options.id}&auto=${this.options.autoplay}&height=66" width="${this.options.width}" height="${this.options.height}"></iframe>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
render() {
|
||||||
|
this.innerHTML = '';
|
||||||
|
this._shadowRoot = this.attachShadow({ mode: 'closed' });
|
||||||
|
if (this.options.id) this._shadowRoot.innerHTML = this.template;
|
||||||
|
else this._shadowRoot.innerHTML = '网易云歌曲ID未填写!';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
window.customElements.define('joe-music', JoeMusic);
|
||||||
|
|
||||||
/* 便条按钮 */
|
/* 便条按钮 */
|
||||||
class JoeAnote extends HTMLElement {
|
class JoeAnote extends HTMLElement {
|
||||||
@ -205,9 +234,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
}
|
}
|
||||||
window.customElements.define('joe-show', JoeShow);
|
window.customElements.define('joe-show', JoeShow);
|
||||||
/* 时间轴 */
|
/* 时间轴 */
|
||||||
class JoeTimeline extends HTMLElement {
|
class JoeTimeline extends HTMLElement {}
|
||||||
|
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@ -218,44 +245,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* 网易云音乐 - 单首 */
|
|
||||||
class JoeMusic extends HTMLElement {
|
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
this.options = {
|
|
||||||
id: this.getAttribute('id'),
|
|
||||||
width: this.getAttribute('width') || '100%',
|
|
||||||
height: this.getAttribute('height') || '86px',
|
|
||||||
autoplay: this.getAttribute('autoplay') ? 1 : 0
|
|
||||||
};
|
|
||||||
this.render();
|
|
||||||
}
|
|
||||||
get template() {
|
|
||||||
return `
|
|
||||||
<style>
|
|
||||||
.container {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.container iframe {
|
|
||||||
display: block;
|
|
||||||
margin: 0 auto;
|
|
||||||
border: none;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<div class="container">
|
|
||||||
<iframe src="//music.163.com/outchain/player?type=2&id=${this.options.id}&auto=${this.options.autoplay}&height=66" width="${this.options.width}" height="${this.options.height}"></iframe>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
render() {
|
|
||||||
this.innerHTML = '';
|
|
||||||
this._shadowRoot = this.attachShadow({ mode: 'closed' });
|
|
||||||
if (this.options.id) this._shadowRoot.innerHTML = this.template;
|
|
||||||
else this._shadowRoot.innerHTML = '网易云歌曲ID未填写!';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
window.customElements.define('joe-music', JoeMusic);
|
|
||||||
/* 网易云音乐 - 歌单 */
|
/* 网易云音乐 - 歌单 */
|
||||||
class JoeMlist extends HTMLElement {
|
class JoeMlist extends HTMLElement {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
2
assets/js/joe.short.min.js
vendored
2
assets/js/joe.short.min.js
vendored
File diff suppressed because one or more lines are too long
@ -15,6 +15,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: Joe.BASE_API,
|
url: Joe.BASE_API,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
data: { routeType: 'maccms_list' },
|
data: { routeType: 'maccms_list' },
|
||||||
success(res) {
|
success(res) {
|
||||||
if (res.code !== 1) return $('.joe_video__type-list').html(`<li class="error">${res.data}</li>`);
|
if (res.code !== 1) return $('.joe_video__type-list').html(`<li class="error">${res.data}</li>`);
|
||||||
@ -42,6 +43,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: Joe.BASE_API,
|
url: Joe.BASE_API,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
data: { routeType: 'maccms_list', ac: 'videolist', t: queryData.t, pg: queryData.pg, wd: queryData.wd },
|
data: { routeType: 'maccms_list', ac: 'videolist', t: queryData.t, pg: queryData.pg, wd: queryData.wd },
|
||||||
success(res) {
|
success(res) {
|
||||||
if (res.code !== 1) return $('.joe_video__list-item').css('display', 'block').html('<p class="error">数据加载失败!请检查!</p>');
|
if (res.code !== 1) return $('.joe_video__list-item').css('display', 'block').html('<p class="error">数据加载失败!请检查!</p>');
|
||||||
@ -115,6 +117,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: Joe.BASE_API,
|
url: Joe.BASE_API,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
routeType: 'maccms_list',
|
routeType: 'maccms_list',
|
||||||
ac: 'detail',
|
ac: 'detail',
|
||||||
|
2
assets/js/joe.video.min.js
vendored
2
assets/js/joe.video.min.js
vendored
File diff suppressed because one or more lines are too long
@ -5,6 +5,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: Joe.BASE_API,
|
url: Joe.BASE_API,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
data: { routeType: 'wallpaper_type' },
|
data: { routeType: 'wallpaper_type' },
|
||||||
success(res) {
|
success(res) {
|
||||||
if (res.code !== 1) return $('.joe_wallpaper__type-list').html('<li class="error">壁纸抓取失败!请联系作者!</li>');
|
if (res.code !== 1) return $('.joe_wallpaper__type-list').html('<li class="error">壁纸抓取失败!请联系作者!</li>');
|
||||||
@ -30,6 +31,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: Joe.BASE_API,
|
url: Joe.BASE_API,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
routeType: 'wallpaper_list',
|
routeType: 'wallpaper_list',
|
||||||
cid: queryData.cid,
|
cid: queryData.cid,
|
||||||
|
2
assets/js/joe.wallpaper.min.js
vendored
2
assets/js/joe.wallpaper.min.js
vendored
@ -1 +1 @@
|
|||||||
document.addEventListener("DOMContentLoaded",()=>{function t(){window.scrollTo({top:0,behavior:"smooth"}),$(".joe_wallpaper__list").html(""),l=!0,$.ajax({url:Joe.BASE_API,type:"POST",data:{routeType:"wallpaper_list",cid:e.cid,start:e.start,count:e.count},success(t){if(1!==t.code)return l=!1;l=!1;let e="";t.data.forEach(t=>{e+=`\n <a class="item animated bounceIn" data-fancybox="gallery" href="${t.url}">\n <img width="100%" height="100%" class="lazyload" src="${Joe.LAZY_LOAD}" data-src="${t.img_1024_768||t.url}" onerror="javascript: this.src = '${Joe.LAZY_LOAD}'" alt="壁纸">\n </a>`}),$(".joe_wallpaper__list").html(e),i=t.total,a()}})}function a(){let t="";e.start/e.count!=0&&(t+=`\n <li class="joe_wallpaper__pagination-item" data-start="0">首页</li>\n <li class="joe_wallpaper__pagination-item" data-start="${e.start-e.count}">\n <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>\n </li>\n <li class="joe_wallpaper__pagination-item" data-start="${e.start-e.count}">${Math.ceil(e.start/e.count)}</li>\n `),t+=`<li class="joe_wallpaper__pagination-item active">${Math.ceil(e.start/e.count)+1}</li>`,e.start!=i-e.count&&(t+=`\n <li class="joe_wallpaper__pagination-item" data-start="${e.start+e.count}">${Math.ceil(e.start/e.count)+2}</li>\n <li class="joe_wallpaper__pagination-item" data-start="${e.start+e.count}">\n <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>\n </li>\n `),e.start<i-e.count&&(t+=`<li class="joe_wallpaper__pagination-item" data-start="${i-e.count}">末页</li>`),$(".joe_wallpaper__pagination").html(t)}let l=!1,e={cid:-999,start:-999,count:48},i=-999;$.ajax({url:Joe.BASE_API,type:"POST",data:{routeType:"wallpaper_type"},success(t){if(1!==t.code)return $(".joe_wallpaper__type-list").html('<li class="error">壁纸抓取失败!请联系作者!</li>');if(!t.data.length)return $(".joe_wallpaper__type-list").html('<li class="error">暂无数据!</li>');let a="";t.data.forEach(t=>a+=`<li class="item animated swing" data-cid="${t.id}">${t.name}</li>`),$(".joe_wallpaper__type-list").html(a),$(".joe_wallpaper__type-list .item").first().click()}}),$(".joe_wallpaper__type-list").on("click",".item",function(){const a=$(this).attr("data-cid");l||($(this).addClass("active").siblings().removeClass("active"),e.cid=a,e.start=0,t())}),$(".joe_wallpaper__pagination").on("click",".joe_wallpaper__pagination-item",function(){const a=$(this).attr("data-start");a&&!l&&(e.start=Number(a),t())})});
|
document.addEventListener("DOMContentLoaded",()=>{function t(){window.scrollTo({top:0,behavior:"smooth"}),$(".joe_wallpaper__list").html(""),l=!0,$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"wallpaper_list",cid:e.cid,start:e.start,count:e.count},success(t){if(1!==t.code)return l=!1;l=!1;let e="";t.data.forEach(t=>{e+=`\n <a class="item animated bounceIn" data-fancybox="gallery" href="${t.url}">\n <img width="100%" height="100%" class="lazyload" src="${Joe.LAZY_LOAD}" data-src="${t.img_1024_768||t.url}" onerror="javascript: this.src = '${Joe.LAZY_LOAD}'" alt="壁纸">\n </a>`}),$(".joe_wallpaper__list").html(e),i=t.total,a()}})}function a(){let t="";e.start/e.count!=0&&(t+=`\n <li class="joe_wallpaper__pagination-item" data-start="0">首页</li>\n <li class="joe_wallpaper__pagination-item" data-start="${e.start-e.count}">\n <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>\n </li>\n <li class="joe_wallpaper__pagination-item" data-start="${e.start-e.count}">${Math.ceil(e.start/e.count)}</li>\n `),t+=`<li class="joe_wallpaper__pagination-item active">${Math.ceil(e.start/e.count)+1}</li>`,e.start!=i-e.count&&(t+=`\n <li class="joe_wallpaper__pagination-item" data-start="${e.start+e.count}">${Math.ceil(e.start/e.count)+2}</li>\n <li class="joe_wallpaper__pagination-item" data-start="${e.start+e.count}">\n <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>\n </li>\n `),e.start<i-e.count&&(t+=`<li class="joe_wallpaper__pagination-item" data-start="${i-e.count}">末页</li>`),$(".joe_wallpaper__pagination").html(t)}let l=!1,e={cid:-999,start:-999,count:48},i=-999;$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"wallpaper_type"},success(t){if(1!==t.code)return $(".joe_wallpaper__type-list").html('<li class="error">壁纸抓取失败!请联系作者!</li>');if(!t.data.length)return $(".joe_wallpaper__type-list").html('<li class="error">暂无数据!</li>');let a="";t.data.forEach(t=>a+=`<li class="item animated swing" data-cid="${t.id}">${t.name}</li>`),$(".joe_wallpaper__type-list").html(a),$(".joe_wallpaper__type-list .item").first().click()}}),$(".joe_wallpaper__type-list").on("click",".item",function(){const a=$(this).attr("data-cid");l||($(this).addClass("active").siblings().removeClass("active"),e.cid=a,e.start=0,t())}),$(".joe_wallpaper__pagination").on("click",".joe_wallpaper__pagination-item",function(){const a=$(this).attr("data-start");a&&!l&&(e.start=Number(a),t())})});
|
@ -2,7 +2,7 @@
|
|||||||
/* 获取主题当前版本号 */
|
/* 获取主题当前版本号 */
|
||||||
function _getVersion()
|
function _getVersion()
|
||||||
{
|
{
|
||||||
return "6.1.1";
|
return "6.1.2";
|
||||||
};
|
};
|
||||||
|
|
||||||
/* 判断是否是手机 */
|
/* 判断是否是手机 */
|
||||||
|
@ -2,10 +2,31 @@
|
|||||||
|
|
||||||
function _parseContent($post, $login)
|
function _parseContent($post, $login)
|
||||||
{
|
{
|
||||||
/* 优先判断文章内是否有回复可见的内容 */
|
|
||||||
$content = $post->content;
|
$content = $post->content;
|
||||||
/* 过滤表情 */
|
|
||||||
$content = _parseReply($content);
|
$content = _parseReply($content);
|
||||||
|
|
||||||
|
/* 已测试 √ */
|
||||||
|
if (strpos($content, '{x}') !== false || strpos($content, '{ }') !== false) {
|
||||||
|
$content = strtr($content, array(
|
||||||
|
"{x}" => '<input type="checkbox" class="joe_detail__article-checkbox" checked disabled></input>',
|
||||||
|
"{ }" => '<input type="checkbox" class="joe_detail__article-checkbox" disabled></input>'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* 过滤网易云音乐 - */
|
||||||
|
if (strpos($content, '{music') !== false) {
|
||||||
|
$content = preg_replace('/{music-list(.*)\/}/SU', '<joe-mlist $1></joe-mlist>', $content);
|
||||||
|
$content = preg_replace('/{music(.*)\/}/SU', '<joe-music $1></joe-music>', $content);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* 过滤默认卡片 */
|
/* 过滤默认卡片 */
|
||||||
if (strpos($content, '{card-default') !== false) {
|
if (strpos($content, '{card-default') !== false) {
|
||||||
$content = preg_replace('/{card-default(.*)}/SU', '<joe-card $1>', $content);
|
$content = preg_replace('/{card-default(.*)}/SU', '<joe-card $1>', $content);
|
||||||
@ -21,18 +42,8 @@ function _parseContent($post, $login)
|
|||||||
$content = strtr($content, array("{hide}" => "<joe-hide>", "{/hide}" => "</joe-hide>"));
|
$content = strtr($content, array("{hide}" => "<joe-hide>", "{/hide}" => "</joe-hide>"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* 过滤网易云音乐 */
|
|
||||||
if (strpos($content, '{music') !== false) {
|
|
||||||
$content = preg_replace('/{music-list(.*)\/}/SU', '<joe-mlist $1></joe-mlist>', $content);
|
|
||||||
$content = preg_replace('/{music(.*)\/}/SU', '<joe-music $1></joe-music>', $content);
|
|
||||||
}
|
|
||||||
/* 过滤完成任务勾选 */
|
|
||||||
if (strpos($content, '{x}') !== false || strpos($content, '{ }') !== false) {
|
|
||||||
$content = strtr($content, array(
|
|
||||||
"{x}" => '<input type="checkbox" class="joe_detail__article-checkbox" checked disabled></input>',
|
|
||||||
"{ }" => '<input type="checkbox" class="joe_detail__article-checkbox" disabled></input>'
|
|
||||||
));
|
|
||||||
}
|
|
||||||
/* 过滤dplayer播放器 */
|
/* 过滤dplayer播放器 */
|
||||||
if (strpos($content, '{dplayer') !== false) {
|
if (strpos($content, '{dplayer') !== false) {
|
||||||
$player = Helper::options()->JCustomPlayer ? Helper::options()->JCustomPlayer : '/usr/themes/Joe/library/player.php?url=';
|
$player = Helper::options()->JCustomPlayer ? Helper::options()->JCustomPlayer : '/usr/themes/Joe/library/player.php?url=';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "typecho-joe-next",
|
"name": "typecho-joe-next",
|
||||||
"version": "6.1.1",
|
"version": "6.1.2",
|
||||||
"description": "A Theme Of Typecho",
|
"description": "A Theme Of Typecho",
|
||||||
"main": "index.php",
|
"main": "index.php",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -13516,7 +13516,7 @@
|
|||||||
if (selection === '') this._setCursor(cm, cursor + str.length + 1);
|
if (selection === '') this._setCursor(cm, cursor + str.length + 1);
|
||||||
cm.focus();
|
cm.focus();
|
||||||
}
|
}
|
||||||
handleFullScreen(cm, el) {
|
handleFullScreen(el) {
|
||||||
el.toggleClass('active');
|
el.toggleClass('active');
|
||||||
$('body').toggleClass('fullscreen');
|
$('body').toggleClass('fullscreen');
|
||||||
$('.cm-container').toggleClass('fullscreen');
|
$('.cm-container').toggleClass('fullscreen');
|
||||||
@ -13943,6 +13943,7 @@
|
|||||||
data: formData,
|
data: formData,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
processData: false,
|
processData: false,
|
||||||
|
dataType: 'json',
|
||||||
xhr: () => {
|
xhr: () => {
|
||||||
const xhr = $.ajaxSettings.xhr();
|
const xhr = $.ajaxSettings.xhr();
|
||||||
if (!xhr.upload) return;
|
if (!xhr.upload) return;
|
||||||
@ -14038,7 +14039,7 @@
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
case 'fullScreen':
|
case 'fullScreen':
|
||||||
super.handleFullScreen(this.cm, el);
|
super.handleFullScreen(el);
|
||||||
break;
|
break;
|
||||||
case 'publish':
|
case 'publish':
|
||||||
super.handlePublish();
|
super.handlePublish();
|
||||||
|
@ -51,7 +51,7 @@ class JoeAction {
|
|||||||
if (selection === '') this._setCursor(cm, cursor + str.length + 1);
|
if (selection === '') this._setCursor(cm, cursor + str.length + 1);
|
||||||
cm.focus();
|
cm.focus();
|
||||||
}
|
}
|
||||||
handleFullScreen(cm, el) {
|
handleFullScreen(el) {
|
||||||
el.toggleClass('active');
|
el.toggleClass('active');
|
||||||
$('body').toggleClass('fullscreen');
|
$('body').toggleClass('fullscreen');
|
||||||
$('.cm-container').toggleClass('fullscreen');
|
$('.cm-container').toggleClass('fullscreen');
|
||||||
@ -478,6 +478,7 @@ class Joe extends JoeAction {
|
|||||||
data: formData,
|
data: formData,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
processData: false,
|
processData: false,
|
||||||
|
dataType: 'json',
|
||||||
xhr: () => {
|
xhr: () => {
|
||||||
const xhr = $.ajaxSettings.xhr();
|
const xhr = $.ajaxSettings.xhr();
|
||||||
if (!xhr.upload) return;
|
if (!xhr.upload) return;
|
||||||
@ -573,7 +574,7 @@ class Joe extends JoeAction {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
case 'fullScreen':
|
case 'fullScreen':
|
||||||
super.handleFullScreen(this.cm, el);
|
super.handleFullScreen(el);
|
||||||
break;
|
break;
|
||||||
case 'publish':
|
case 'publish':
|
||||||
super.handlePublish();
|
super.handlePublish();
|
||||||
|
Loading…
Reference in New Issue
Block a user