diff --git a/source/js/min/joe.common.min.js b/source/js/min/joe.common.min.js index d930cfb..f89f364 100644 --- a/source/js/min/joe.common.min.js +++ b/source/js/min/joe.common.min.js @@ -1 +1 @@ -window.encryption=str=>window.btoa(unescape(encodeURIComponent(str))),window.decrypt=str=>decodeURIComponent(escape(window.atob(str)));const commonContext={initMode(){if("user"!==ThemeConfig.theme_mode)return;const $html=$("html"),$icon_light=$(".mode-light"),$icon_dark=$(".mode-dark");let local_theme=localStorage.getItem("data-mode");$icon_light[`${"light"===local_theme?"remove":"add"}Class`]("active"),$icon_dark[`${"light"===local_theme?"add":"remove"}Class`]("active"),$(".joe_action_item.mode").on("click",(function(){local_theme=localStorage.getItem("data-mode");let theme="";local_theme?(theme="light"===local_theme?"dark":"light",$icon_light[`${"light"===local_theme?"add":"remove"}Class`]("active"),$icon_dark[`${"light"===local_theme?"remove":"add"}Class`]("active")):(theme="dark",$icon_light.removeClass("active"),$icon_dark.addClass("active")),$html.attr("data-mode",theme),localStorage.setItem("data-mode",theme),commonContext.initCommentTheme()}))},loadingBar:{show(){ThemeConfig.enable_loading_bar&&(NProgress.configure({easing:"ease",speed:500,showSpinner:!1}),NProgress.start())},hide(){ThemeConfig.enable_loading_bar&&(NProgress.done(!0),document.querySelector("html").removeAttribute("class"))}},initNavbar(){const $nav_menus=$(".joe_header__above-nav a"),$nav_side_menus=$(".panel-side-menu .link");let activeIndex=0;const curPath=location.pathname;curPath&&"/"!==curPath&&$nav_menus.each((index,item)=>{curPath.indexOf(item.getAttribute("href"))>-1&&(activeIndex=index)}),$nav_menus.eq(activeIndex).addClass("current"),$nav_side_menus.eq(activeIndex).addClass("current")},initCommentTheme(){const comments=document.getElementsByTagName("halo-comment"),curMode=document.querySelector("html").getAttribute("data-mode");for(let i=0;i未收录,推送中...');const _timer=setTimeout((function(){$.ajax({url:ThemeConfig.BASE_URL+"/halo-api/bd/push",type:"POST",dataType:"json",data:{site:ThemeConfig.blog_url,token:ThemeConfig.baidu_token,urls:window.location.href},success(res){0===res.data.success?$("#joe_baidu_record").html('推送失败,请检查!'):$("#joe_baidu_record").html('推送成功!')}}),clearTimeout(_timer)}),1e3)}else{const url=`https://ziyuan.baidu.com/linksubmit/url?sitename=${encodeURI(window.location.href)}`;$("#joe_baidu_record").html(`未收录,提交收录`)}},error(err){console.log(err)}})},initMusic(){ThemeConfig.enable_global_music_player&&$.ajax({url:`https://api.i-meto.com/meting/api?server=netease&type=playlist&id=${ThemeConfig.music_id}`,type:"GET",dataType:"json",success(res){new APlayer({container:document.getElementById("global-aplayer"),fixed:!0,lrcType:3,theme:"#1989fa",autoplay:!0,audio:res})},error(err){console.log(err)}})},loadMouseEffect(){ThemeConfig.enable_clean_mode||Joe.isMobile||"off"===ThemeConfig.cursor_effect||$.getScript(`${ThemeConfig.BASE_RES_URL}/source/effect/cursor/${ThemeConfig.cursor_effect}.js`)},loadBackdropEffect(){ThemeConfig.enable_clean_mode||Joe.isMobile||"off"===ThemeConfig.backdrop||$.getScript(`${ThemeConfig.BASE_RES_URL}/source/effect/backdrop/${ThemeConfig.backdrop}.js`)},setFavicon(){if(!ThemeConfig.favicon)return;const favicon=new Favico,image=new Image;image.onload=function(){favicon.image(image)},image.src=ThemeConfig.favicon},searchDialog(){const $result=$(".joe_header__above-search .result");$(".joe_header__above-search .input").on("click",(function(e){e.stopPropagation(),$result.addClass("active")})),$(document).on("click",(function(){$result.removeClass("active")}))},initDropMenu(){$(".joe_dropdown").each((function(index,item){const menu=$(this).find(".joe_dropdown__menu"),trigger=$(item).attr("trigger")||"click",placement=$(item).attr("placement")||$(this).height()||0;menu.css("top",placement),"hover"===trigger?$(this).hover(()=>$(this).addClass("active"),()=>$(this).removeClass("active")):($(this).on("click",(function(e){$(this).toggleClass("active"),$(document).one("click",()=>$(this).removeClass("active")),e.stopPropagation()})),menu.on("click",e=>e.stopPropagation()))}))},back2Top(){if(!ThemeConfig.enable_back2top)return;let _debounce=null;const $el=$(".joe_action_item.back2top"),handleScroll=()=>(document.documentElement.scrollTop||document.body.scrollTop)>300?$el.addClass("active"):$el.removeClass("active");handleScroll(),$(document).on("scroll",()=>{clearTimeout(_debounce),_debounce=setTimeout(handleScroll,80)}),$el.on("click",()=>window.scrollTo({top:0,behavior:"smooth"}))},initTimeCount(){if(!$(".joe_aside__item.timelife").length)return;let timelife=[{title:"今日已经过去",endTitle:"小时",num:0,percent:"0%"},{title:"这周已经过去",endTitle:"天",num:0,percent:"0%"},{title:"本月已经过去",endTitle:"天",num:0,percent:"0%"},{title:"今年已经过去",endTitle:"个月",num:0,percent:"0%"}];{let todayPassHours=(+new Date-new Date((new Date).toLocaleDateString()).getTime())/1e3/60/60,todayPassHoursPercent=todayPassHours/24*100;timelife[0].num=parseInt(todayPassHours),timelife[0].percent=parseInt(todayPassHoursPercent)+"%"}{let weekDay={0:7,1:1,2:2,3:3,4:4,5:5,6:6}[(new Date).getDay()],weekDayPassPercent=weekDay/7*100;timelife[1].num=parseInt(weekDay),timelife[1].percent=parseInt(weekDayPassPercent)+"%"}{let year=(new Date).getFullYear(),date=(new Date).getDate(),month=(new Date).getMonth()+1,monthPassPercent=date/new Date(year,month,0).getDate()*100;timelife[2].num=date,timelife[2].percent=parseInt(monthPassPercent)+"%"}{let month=(new Date).getMonth()+1,yearPass=month/12*100;timelife[3].num=month,timelife[3].percent=parseInt(yearPass)+"%"}let htmlStr="";timelife.forEach((item,index)=>{htmlStr+=`\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t${item.title}\n\t\t\t\t\t\t\t\t${item.num}\n\t\t\t\t\t\t\t\t${item.endTitle}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
${item.percent}
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
`}),$(".joe_aside__item.timelife .joe_aside__item-contain").html(htmlStr)},initWeather(){ThemeConfig.enable_weather&&ThemeConfig.weather_key&&$("#he-plugin-simple").length&&(window.WIDGET={CONFIG:{modules:"120",background:"5",tmpColor:"FFFFFF",tmpSize:"13",cityColor:"FFFFFF",citySize:"13",aqiColor:"FFFFFF",aqiSize:"13",weatherIconSize:"13",alertIconSize:"13",padding:"5px 5px 4px 5px",shadow:"0",language:"auto",borderRadius:"4",fixed:"true",vertical:"top",horizontal:"left",key:ThemeConfig.weather_key}},$.getScript("https://widget.qweather.net/simple/static/js/he-simple-common.js?v=2.0"))},initGallery(){const $allImgs=$(".joe_detail__article img:not(img.owo_image), .joe_journal_block img");$allImgs.length&&$allImgs.each((function(){$(this).wrap($(``))}))},initExternalLink(){const $allLink=$(".page-post .joe_detail__article a[href], .joe_journal_body a[href]");$allLink.length&&$allLink.each((function(){$(this).attr({target:"_blank",rel:"noopener noreferrer nofollow"})}))},init3dTag(){if(!ThemeConfig.show_tag_cloud||!$(".tags-cloud-list").length)return;const entries=[],colors=["#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"];$(".tags-cloud-list li").each((i,item)=>{var min,max;entries.push({label:$(item).attr("data-label"),url:$(item).attr("data-url"),target:"_blank",fontColor:colors[(min=0,max=colors.length-1,min=Math.ceil(min),max=Math.floor(max),Math.floor(Math.random()*(max-min+1))+min)],fontSize:15})}),$("#tags-3d").svg3DTagCloud({entries:entries,width:250,height:250,radius:"65%",radiusMin:75,bgDraw:!1,fov:800,speed:.5,fontWeight:500}),$(".tags-cloud-list").remove(),$("#tags-3d .empty").remove()},initLive2d(){ThemeConfig.enable_live2d&&$.getScript("https://cdn.jsdelivr.net/npm/live2d-widget@3.1.4/lib/L2Dwidget.min.js",()=>{L2Dwidget.init({model:{jsonPath:Joe.LIVE2D,scale:1},mobile:{show:!1},display:{position:"right",width:160,height:200,hOffset:70,vOffset:0}})})},offscreenTip(){if(!ThemeConfig.enable_offscreen_tip)return;const OriginTitile=document.title;let timer=null;document.addEventListener("visibilitychange",(function(){location.href.indexOf(ThemeConfig.blog_url)>0||"/"!==location.pathname||(document.hidden?(document.title=ThemeConfig.offscreen_title_leave||"歪,你去哪里了?",clearTimeout(timer)):(document.title=ThemeConfig.offscreen_title_back||"(つェ⊂)咦,又回来了!",timer=setTimeout((function(){document.title=OriginTitile}),2e3)))}))},drawerMobile(){$(".joe_header__above-slideicon").on("click",(function(){$(".joe_header__searchout").removeClass("active"),$(".joe_header__slideout").hasClass("active")?($("body").css("overflow",""),$(".joe_header__mask").removeClass("active slideout"),$(".joe_header__slideout").removeClass("active")):($("body").css("overflow","hidden"),$(".joe_header__mask").addClass("active slideout"),$(".joe_header__slideout").addClass("active"))}))},searchMobile(){$(".joe_header__above-searchicon").on("click",(function(){$(".joe_header__slideout").removeClass("active"),$(".joe_header__searchout").hasClass("active")?($("body").css("overflow",""),$(".joe_header__mask").removeClass("active slideout"),$(".joe_header__searchout").removeClass("active")):($("body").css("overflow","hidden"),$(".joe_header__mask").addClass("active"),$(".joe_header__searchout").addClass("active"))}))},maskClose(){$(".joe_header__mask").on("click",(function(){$("body").css("overflow",""),$(".joe_header__mask").removeClass("active slideout"),$(".joe_header__searchout").removeClass("active"),$(".joe_header__slideout").removeClass("active")}))},sideMenuMobile(){$(".joe_header__slideout-menu .current").parents(".panel-body").show().siblings(".panel").addClass("in"),$(".joe_header__slideout-menu .panel").on("click",(function(){const panelBox=$(this).parent().parent();panelBox.find(".panel").not($(this)).removeClass("in"),panelBox.find(".panel-body").not($(this).siblings(".panel-body")).stop().hide("fast"),$(this).toggleClass("in").siblings(".panel-body").stop().toggle("fast")}))},initBirthday(){if(!ThemeConfig.enable_birthday)return;const birthDay=new Date(+$(".site_life").attr("data-birthday").replace(/,/g,"")),$day=$(".joe_run__day"),$hour=$(".joe_run__hour"),$minute=$(".joe_run__minute"),$second=$(".joe_run__second"),getRunTime=()=>{let day=(+new Date-birthDay.getTime())/864e5,dayPast=Math.floor(day),hour=24*(day-dayPast),hourPast=Math.floor(hour),minute=60*(hour-hourPast),minutePast=Math.floor(minute),second=60*(minute-minutePast),secondPast=Math.floor(second);day=String(dayPast).padStart(2,0),hour=String(hourPast).padStart(2,0),minute=String(minutePast).padStart(2,0),second=String(secondPast).padStart(2,0),$day.html(day),$hour.html(hour),$minute.html(minute),$second.html(second)};getRunTime(),setInterval(getRunTime,1e3)},initHeadScroll(){if(Joe.isMobile)return;let flag=!0;const handleHeader=diffY=>{if(window.pageYOffset>=$(".joe_header").height()&&diffY<=0){if(flag)return;$(".joe_header").addClass("active"),$(".joe_aside .joe_aside__item:last-child").css("top",$(".joe_header").height()-60+15),flag=!0}else{if(!flag)return;$(".joe_header").removeClass("active"),$(".joe_aside .joe_aside__item:last-child").css("top",$(".joe_header").height()+15),flag=!1}};let Y=window.pageYOffset;handleHeader(Y);let _last=Date.now();document.addEventListener("scroll",()=>{let _now=Date.now();_now-_last>15&&(handleHeader(Y-window.pageYOffset),Y=window.pageYOffset),_last=_now})},scrollToHash(){const scroll=new URLSearchParams(location.search).get("scroll");if(scroll){const height=$(".joe_header").height();let elementEL=null;if(elementEL=$("#"+scroll).length>0?$("#"+scroll):$("."+scroll),elementEL&&elementEL.length>0){const top=elementEL.offset().top-height-15;window.scrollTo({top:top,behavior:"smooth"})}}},cancelSpaceScroll(e){document.body.onkeydown=function(e){const elm=(e=e||window.event).target||e.srcElement;if(32===(e.keyCode||e.charCode)){if(["text","input","textarea","halo-comment"].includes(elm.tagName.toLowerCase()))return;window.event?e.returnValue=!1:e.preventDefault()}}},renderReplyEmoji(){$(".aside-reply-content").each((_index,item)=>{const markedHtml=marked(item.innerHTML).replace(/bili\//g,"bili/hd/ic_emoji_"),emoji=Utils.renderedEmojiHtml(markedHtml);item.innerHTML=Utils.return2Br(emoji)})},showLoadedTime(){if(!ThemeConfig.show_loaded_time)return;const consume_time=performance.now();consume_time&&console.log("%c页面加载耗时:"+Math.round(consume_time)+" ms","padding: 6px 8px;color:#fff;background:linear-gradient(270deg, #4edb21, #f15206);border-radius: 3px;")},clean(){$("#compatiable-checker").remove(),$("#theme-config-getter").remove(),$("#metas-getter").remove(),$("#theme-config-getter").remove(),commonContext.loadingBar.hide()}};!function(){const omits=["loadingBar","init3dTag","initLive2d","showLoadedTime","clean"];document.addEventListener("DOMContentLoaded",(function(){commonContext.loadingBar.show(),Object.keys(commonContext).forEach(c=>!omits.includes(c)&&commonContext[c]())})),window.addEventListener("load",(function(){1===omits.length?commonContext[omits[0]]():omits.forEach(c=>"loadingBar"!==c&&commonContext[c]())}))}(),window.commonContext=commonContext; \ No newline at end of file +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(self,(function(){return(()=>{window.encryption=function(e){return window.btoa(unescape(encodeURIComponent(e)))},window.decrypt=function(e){return decodeURIComponent(escape(window.atob(e)))};var e,t={initMode:function(){if("user"===ThemeConfig.theme_mode){var e=$("html"),o=$(".mode-light"),n=$(".mode-dark"),a=localStorage.getItem("data-mode");o["".concat("light"===a?"remove":"add","Class")]("active"),n["".concat("light"===a?"add":"remove","Class")]("active"),$(".joe_action_item.mode").on("click",(function(){var i="";(a=localStorage.getItem("data-mode"))?(i="light"===a?"dark":"light",o["".concat("light"===a?"add":"remove","Class")]("active"),n["".concat("light"===a?"remove":"add","Class")]("active")):(i="dark",o.removeClass("active"),n.addClass("active")),e.attr("data-mode",i),localStorage.setItem("data-mode",i),t.initCommentTheme()}))}},loadingBar:{show:function(){ThemeConfig.enable_loading_bar&&(NProgress.configure({easing:"ease",speed:500,showSpinner:!1}),NProgress.start())},hide:function(){ThemeConfig.enable_loading_bar&&(NProgress.done(!0),document.querySelector("html").removeAttribute("class"))}},initNavbar:function(){var e=$(".joe_header__above-nav a"),t=$(".panel-side-menu .link"),o=0,n=location.pathname;n&&"/"!==n&&e.each((function(e,t){n.indexOf(t.getAttribute("href"))>-1&&(o=e)})),e.eq(o).addClass("current"),t.eq(o).addClass("current")},initCommentTheme:function(){for(var e=document.getElementsByTagName("halo-comment"),t=document.querySelector("html").getAttribute("data-mode"),o=0;o未收录,推送中...');var t=setTimeout((function(){$.ajax({url:ThemeConfig.BASE_URL+"/halo-api/bd/push",type:"POST",dataType:"json",data:{site:ThemeConfig.blog_url,token:ThemeConfig.baidu_token,urls:window.location.href},success:function(e){0===e.data.success?$("#joe_baidu_record").html('推送失败,请检查!'):$("#joe_baidu_record").html('推送成功!')}}),clearTimeout(t)}),1e3)}else{var o="https://ziyuan.baidu.com/linksubmit/url?sitename=".concat(encodeURI(window.location.href));$("#joe_baidu_record").html('未收录,提交收录'))}},error:function(e){console.log(e)}})},initMusic:function(){ThemeConfig.enable_global_music_player&&$.ajax({url:"https://api.i-meto.com/meting/api?server=netease&type=playlist&id=".concat(ThemeConfig.music_id),type:"GET",dataType:"json",success:function(e){new APlayer({container:document.getElementById("global-aplayer"),fixed:!0,lrcType:3,theme:"#1989fa",autoplay:!0,audio:e})},error:function(e){console.log(e)}})},loadMouseEffect:function(){ThemeConfig.enable_clean_mode||Joe.isMobile||"off"===ThemeConfig.cursor_effect||$.getScript("".concat(ThemeConfig.BASE_RES_URL,"/source/effect/cursor/").concat(ThemeConfig.cursor_effect,".js"))},loadBackdropEffect:function(){ThemeConfig.enable_clean_mode||Joe.isMobile||"off"===ThemeConfig.backdrop||$.getScript("".concat(ThemeConfig.BASE_RES_URL,"/source/effect/backdrop/").concat(ThemeConfig.backdrop,".js"))},setFavicon:function(){if(ThemeConfig.favicon){var e=new Favico,t=new Image;t.onload=function(){e.image(t)},t.src=ThemeConfig.favicon}},searchDialog:function(){var e=$(".joe_header__above-search .result");$(".joe_header__above-search .input").on("click",(function(t){t.stopPropagation(),e.addClass("active")})),$(document).on("click",(function(){e.removeClass("active")}))},initDropMenu:function(){$(".joe_dropdown").each((function(e,t){var o=this,n=$(this).find(".joe_dropdown__menu"),a=$(t).attr("trigger")||"click",i=$(t).attr("placement")||$(this).height()||0;n.css("top",i),"hover"===a?$(this).hover((function(){return $(o).addClass("active")}),(function(){return $(o).removeClass("active")})):($(this).on("click",(function(e){var t=this;$(this).toggleClass("active"),$(document).one("click",(function(){return $(t).removeClass("active")})),e.stopPropagation()})),n.on("click",(function(e){return e.stopPropagation()})))}))},back2Top:function(){if(ThemeConfig.enable_back2top){var e=null,t=$(".joe_action_item.back2top"),o=function(){return(document.documentElement.scrollTop||document.body.scrollTop)>300?t.addClass("active"):t.removeClass("active")};o(),$(document).on("scroll",(function(){clearTimeout(e),e=setTimeout(o,80)})),t.on("click",(function(){return window.scrollTo({top:0,behavior:"smooth"})}))}},initTimeCount:function(){if($(".joe_aside__item.timelife").length){var e=[{title:"今日已经过去",endTitle:"小时",num:0,percent:"0%"},{title:"这周已经过去",endTitle:"天",num:0,percent:"0%"},{title:"本月已经过去",endTitle:"天",num:0,percent:"0%"},{title:"今年已经过去",endTitle:"个月",num:0,percent:"0%"}],t=(+new Date-new Date((new Date).toLocaleDateString()).getTime())/1e3/60/60,o=t/24*100;e[0].num=parseInt(t),e[0].percent=parseInt(o)+"%";var n={0:7,1:1,2:2,3:3,4:4,5:5,6:6}[(new Date).getDay()],a=n/7*100;e[1].num=parseInt(n),e[1].percent=parseInt(a)+"%";var i=(new Date).getFullYear(),r=(new Date).getDate(),c=(new Date).getMonth()+1,l=r/new Date(i,c,0).getDate()*100;e[2].num=r,e[2].percent=parseInt(l)+"%";var s=(new Date).getMonth()+1,d=s/12*100;e[3].num=s,e[3].percent=parseInt(d)+"%";var f="";e.forEach((function(e,t){f+='\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t'.concat(e.title,'\n\t\t\t\t\t\t\t\t').concat(e.num,"\n\t\t\t\t\t\t\t\t").concat(e.endTitle,'\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
').concat(e.percent,"
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
")})),$(".joe_aside__item.timelife .joe_aside__item-contain").html(f)}},initWeather:function(){ThemeConfig.enable_weather&&ThemeConfig.weather_key&&$("#he-plugin-simple").length&&(window.WIDGET={CONFIG:{modules:"120",background:"5",tmpColor:"FFFFFF",tmpSize:"13",cityColor:"FFFFFF",citySize:"13",aqiColor:"FFFFFF",aqiSize:"13",weatherIconSize:"13",alertIconSize:"13",padding:"5px 5px 4px 5px",shadow:"0",language:"auto",borderRadius:"4",fixed:"true",vertical:"top",horizontal:"left",key:ThemeConfig.weather_key}},$.getScript("https://widget.qweather.net/simple/static/js/he-simple-common.js?v=2.0"))},initGallery:function(){var e=$(".joe_detail__article img:not(img.owo_image), .joe_journal_block img");e.length&&e.each((function(){$(this).wrap($('')))}))},initExternalLink:function(){var e=$(".page-post .joe_detail__article a[href], .joe_journal_body a[href]");e.length&&e.each((function(){$(this).attr({target:"_blank",rel:"noopener noreferrer nofollow"})}))},init3dTag:function(){if(ThemeConfig.show_tag_cloud&&$(".tags-cloud-list").length){var e=[],t=["#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"];$(".tags-cloud-list li").each((function(o,n){var a,i;e.push({label:$(n).attr("data-label"),url:$(n).attr("data-url"),target:"_blank",fontColor:t[(a=0,i=t.length-1,a=Math.ceil(a),i=Math.floor(i),Math.floor(Math.random()*(i-a+1))+a)],fontSize:15})})),$("#tags-3d").svg3DTagCloud({entries:e,width:250,height:250,radius:"65%",radiusMin:75,bgDraw:!1,fov:800,speed:.5,fontWeight:500}),$(".tags-cloud-list").remove(),$("#tags-3d .empty").remove()}},initLive2d:function(){ThemeConfig.enable_live2d&&$.getScript("https://cdn.jsdelivr.net/npm/live2d-widget@3.1.4/lib/L2Dwidget.min.js",(function(){L2Dwidget.init({model:{jsonPath:Joe.LIVE2D,scale:1},mobile:{show:!1},display:{position:"right",width:160,height:200,hOffset:70,vOffset:0}})}))},offscreenTip:function(){if(ThemeConfig.enable_offscreen_tip){var e=document.title,t=null;document.addEventListener("visibilitychange",(function(){location.href.indexOf(ThemeConfig.blog_url)>0||"/"!==location.pathname||(document.hidden?(document.title=ThemeConfig.offscreen_title_leave||"歪,你去哪里了?",clearTimeout(t)):(document.title=ThemeConfig.offscreen_title_back||"(つェ⊂)咦,又回来了!",t=setTimeout((function(){document.title=e}),2e3)))}))}},drawerMobile:function(){$(".joe_header__above-slideicon").on("click",(function(){$(".joe_header__searchout").removeClass("active"),$(".joe_header__slideout").hasClass("active")?($("body").css("overflow",""),$(".joe_header__mask").removeClass("active slideout"),$(".joe_header__slideout").removeClass("active")):($("body").css("overflow","hidden"),$(".joe_header__mask").addClass("active slideout"),$(".joe_header__slideout").addClass("active"))}))},searchMobile:function(){$(".joe_header__above-searchicon").on("click",(function(){$(".joe_header__slideout").removeClass("active"),$(".joe_header__searchout").hasClass("active")?($("body").css("overflow",""),$(".joe_header__mask").removeClass("active slideout"),$(".joe_header__searchout").removeClass("active")):($("body").css("overflow","hidden"),$(".joe_header__mask").addClass("active"),$(".joe_header__searchout").addClass("active"))}))},maskClose:function(){$(".joe_header__mask").on("click",(function(){$("body").css("overflow",""),$(".joe_header__mask").removeClass("active slideout"),$(".joe_header__searchout").removeClass("active"),$(".joe_header__slideout").removeClass("active")}))},sideMenuMobile:function(){$(".joe_header__slideout-menu .current").parents(".panel-body").show().siblings(".panel").addClass("in"),$(".joe_header__slideout-menu .panel").on("click",(function(){var e=$(this).parent().parent();e.find(".panel").not($(this)).removeClass("in"),e.find(".panel-body").not($(this).siblings(".panel-body")).stop().hide("fast"),$(this).toggleClass("in").siblings(".panel-body").stop().toggle("fast")}))},initBirthday:function(){if(ThemeConfig.enable_birthday){var e=new Date(+$(".site_life").attr("data-birthday").replace(/,/g,"")),t=$(".joe_run__day"),o=$(".joe_run__hour"),n=$(".joe_run__minute"),a=$(".joe_run__second"),i=function(){var i=(+new Date-e.getTime())/864e5,r=Math.floor(i),c=24*(i-r),l=Math.floor(c),s=60*(c-l),d=Math.floor(s),f=60*(s-d),u=Math.floor(f);i=String(r).padStart(2,0),c=String(l).padStart(2,0),s=String(d).padStart(2,0),f=String(u).padStart(2,0),t.html(i),o.html(c),n.html(s),a.html(f)};i(),setInterval(i,1e3)}},initHeadScroll:function(){if(!Joe.isMobile){var e=!0,t=function(t){if(window.pageYOffset>=$(".joe_header").height()&&t<=0){if(e)return;$(".joe_header").addClass("active"),$(".joe_aside .joe_aside__item:last-child").css("top",$(".joe_header").height()-60+15),e=!0}else{if(!e)return;$(".joe_header").removeClass("active"),$(".joe_aside .joe_aside__item:last-child").css("top",$(".joe_header").height()+15),e=!1}},o=window.pageYOffset;t(o);var n=Date.now();document.addEventListener("scroll",(function(){var e=Date.now();e-n>15&&(t(o-window.pageYOffset),o=window.pageYOffset),n=e}))}},scrollToHash:function(){var e=new URLSearchParams(location.search).get("scroll");if(e){var t=$(".joe_header").height(),o=null;if((o=$("#"+e).length>0?$("#"+e):$("."+e))&&o.length>0){var n=o.offset().top-t-15;window.scrollTo({top:n,behavior:"smooth"})}}},cancelSpaceScroll:function(e){document.body.onkeydown=function(e){var t=(e=e||window.event).target||e.srcElement;if(32===(e.keyCode||e.charCode)){if(["text","input","textarea","halo-comment"].includes(t.tagName.toLowerCase()))return;window.event?e.returnValue=!1:e.preventDefault()}}},renderReplyEmoji:function(){$(".aside-reply-content").each((function(e,t){var o=marked(t.innerHTML).replace(/bili\//g,"bili/hd/ic_emoji_"),n=Utils.renderedEmojiHtml(o);t.innerHTML=Utils.return2Br(n)}))},showLoadedTime:function(){if(ThemeConfig.show_loaded_time){var e=performance.now();e&&console.log("%c页面加载耗时:"+Math.round(e)+" ms","padding: 6px 8px;color:#fff;background:linear-gradient(270deg, #4edb21, #f15206);border-radius: 3px;")}},clean:function(){$("#compatiable-checker").remove(),$("#theme-config-getter").remove(),$("#metas-getter").remove(),$("#theme-config-getter").remove(),t.loadingBar.hide()}};return e=["loadingBar","init3dTag","initLive2d","showLoadedTime","clean"],document.addEventListener("DOMContentLoaded",(function(){t.loadingBar.show(),Object.keys(t).forEach((function(o){return!e.includes(o)&&t[o]()}))})),window.addEventListener("load",(function(){1===e.length?t[e[0]]():e.forEach((function(e){return"loadingBar"!==e&&t[e]()}))})),window.commonContext=t,{}})()})); \ No newline at end of file diff --git a/source/js/min/joe.common.min.js.gz b/source/js/min/joe.common.min.js.gz index 2689f5d..e171089 100644 Binary files a/source/js/min/joe.common.min.js.gz and b/source/js/min/joe.common.min.js.gz differ diff --git a/source/js/min/joe.index.min.js b/source/js/min/joe.index.min.js index 3b1750c..4991cac 100644 --- a/source/js/min/joe.index.min.js +++ b/source/js/min/joe.index.min.js @@ -1 +1 @@ -const homeContext={initSwiper(){if(ThemeConfig.enable_banner&&0!==$(".joe_index__banner .swiper-container").length){const config={direction:ThemeConfig.banner_direction,loop:ThemeConfig.enable_banner_loop,keyboard:!1,mousewheel:!1,grabCursor:ThemeConfig.enable_banner_handle,allowTouchMove:ThemeConfig.enable_banner_handle,autoplay:!!ThemeConfig.enable_banner_autoplay&&{delay:ThemeConfig.banner_delay,disableOnInteraction:!1},observer:!0};ThemeConfig.enable_banner_handle&&ThemeConfig.enable_banner_switch_button&&(config.navigation={nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}),ThemeConfig.enable_banner_pagination&&(config.pagination={el:".swiper-pagination"}),new Swiper(".swiper-container",config)}},initList(){if(!ThemeConfig.enable_index_list_ajax)return;const pageSize=ThemeConfig.post_index_page_size,$el=$(".joe_index__list"),$domHeader=$(".joe_header"),$domList=$el.find(".joe_list"),$domEmpty=$el.find(".joe_empty"),$domLoad=$(".joe_load"),$domLoading=$el.find(".joe_list__loading");let queryData={page:0,size:pageSize};const getDate=()=>new Promise((reslove,reject)=>{$domLoad.attr("loading",!0).html("加载中..."),$domLoading.show(),Utils.request("/api/content/posts","GET",queryData).then(res=>{const resD=res.content;0===resD.length?($domLoad.hide(),0===queryData.page&&($domList.hide(),$domEmpty.removeClass("hide"))):(resD.forEach(itm=>$domList.append(getListNode(itm))),res.isLast&&$domLoad.hide()),$domLoading.hide(),$domLoad.removeAttr("loading").html("查看更多"),reslove(resD.length?resD.length-1:0)}).catch(err=>{0===$(".joe_list__item").length&&($domList.hide(),$domEmpty.removeClass("hide")),$domLoading.hide(),$domLoad.removeAttr("loading").html("查看更多"),reject(err)})}),getListNode=post=>{const thumbnail=post.thumbnail||ThemeConfig.post_thumbnail;return`
  • \n
    \n ${ThemeConfig.enable_post_thumbnail?`\n ${post.title}\n \n \n `:""}\n
    \n \n ${post.topped?'置顶':""}\n ${post.title}\n \n ${post.summary}\n
    \n
      \n
    • ${Utils.formatDate(post.createTime)}
    • \n
    • ${post.visits||0} 阅读
    • \n
    • ${post.commentCount||0} 评论
    • \n
    • ${post.likes||0} 点赞
    • \n
    \n ${post.categories.length>0?``:""}\n
    \n
    \n
  • `};$domLoad.on("click",(async function(){if($(this).attr("loading"))return;queryData.page++;let length=await getDate();length=$domList.find(".joe_list__item").length-length;const offset=$domList.find(`.joe_list__item:nth-child(${length}`).offset().top-$domHeader.height();window.scrollTo({top:offset-15,behavior:"smooth"})})),getDate()},initListEffect(){ThemeConfig.enable_index_list_effect&&new WOW({boxClass:"wow",animateClass:ThemeConfig.index_list_effect_class||"fadeIn",offset:0,mobile:!0,live:!0}).init()}};!function(){const omits=[];document.addEventListener("DOMContentLoaded",(function(){Object.keys(homeContext).forEach(c=>!omits.includes(c)&&homeContext[c]())}))}(); \ No newline at end of file +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(self,(function(){return(()=>{var t={757:(t,e,n)=>{t.exports=n(666)},666:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),a=new k(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return P()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=T(a,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var l=u(t,e,n);if("normal"===l.type){if(r=n.done?d:h,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=d,n.method="throw",n.arg=l.arg)}}}(t,n,a),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",g={};function m(){}function v(){}function y(){}var b={};l(b,i,(function(){return this}));var _=Object.getPrototypeOf,w=_&&_(_(O([])));w&&w!==n&&r.call(w,i)&&(b=w);var x=y.prototype=m.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(o,i,a,c){var l=u(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function T(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=u(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(l&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e,n,r,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void n(t)}c.done?e(l):Promise.resolve(l).then(r,o)}function e(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=e.apply(n,r);function c(e){t(a,o,i,c,l,"next",e)}function l(e){t(a,o,i,c,l,"throw",e)}c(void 0)}))}}n.r(r);var o,i=n(757),a=n.n(i),c={initSwiper:function(){if(ThemeConfig.enable_banner&&0!==$(".joe_index__banner .swiper-container").length){var t={direction:ThemeConfig.banner_direction,loop:ThemeConfig.enable_banner_loop,keyboard:!1,mousewheel:!1,grabCursor:ThemeConfig.enable_banner_handle,allowTouchMove:ThemeConfig.enable_banner_handle,autoplay:!!ThemeConfig.enable_banner_autoplay&&{delay:ThemeConfig.banner_delay,disableOnInteraction:!1},observer:!0};ThemeConfig.enable_banner_handle&&ThemeConfig.enable_banner_switch_button&&(t.navigation={nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}),ThemeConfig.enable_banner_pagination&&(t.pagination={el:".swiper-pagination"}),new Swiper(".swiper-container",t)}},initList:function(){if(ThemeConfig.enable_index_list_ajax){var t=ThemeConfig.post_index_page_size,n=$(".joe_index__list"),r=$(".joe_header"),o=n.find(".joe_list"),i=n.find(".joe_empty"),c=$(".joe_load"),l=n.find(".joe_list__loading"),s={page:0,size:t},u=function(){return new Promise((function(t,e){c.attr("loading",!0).html("加载中..."),l.show(),Utils.request("/api/content/posts","GET",s).then((function(e){var n=e.content;0===n.length?(c.hide(),0===s.page&&(o.hide(),i.removeClass("hide"))):(n.forEach((function(t){return o.append(f(t))})),e.isLast&&c.hide()),l.hide(),c.removeAttr("loading").html("查看更多"),t(n.length?n.length-1:0)})).catch((function(t){0===$(".joe_list__item").length&&(o.hide(),i.removeClass("hide")),l.hide(),c.removeAttr("loading").html("查看更多"),e(t)}))}))},f=function(t){var e=t.thumbnail||ThemeConfig.post_thumbnail;return'
  • \n
    \n '.concat(ThemeConfig.enable_post_thumbnail?'\n ').concat(t.title,'\n \n \n '):"",'\n
    \n \n ').concat(t.topped?'置顶':"","\n ").concat(t.title,'\n \n ').concat(t.summary,'\n
    \n
      \n
    • ').concat(Utils.formatDate(t.createTime),"
    • \n
    • ").concat(t.visits||0," 阅读
    • \n
    • ").concat(t.commentCount||0," 评论
    • \n
    • ").concat(t.likes||0," 点赞
    • \n
    \n ").concat(t.categories.length>0?'"):"","\n
    \n
    \n
  • ")};c.on("click",e(a().mark((function t(){var e,n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!$(this).attr("loading")){t.next=2;break}return t.abrupt("return");case 2:return s.page++,t.next=5,u();case 5:e=t.sent,e=o.find(".joe_list__item").length-e,n=o.find(".joe_list__item:nth-child(".concat(e)).offset().top-r.height(),window.scrollTo({top:n-15,behavior:"smooth"});case 9:case"end":return t.stop()}}),t,this)})))),u()}},initListEffect:function(){ThemeConfig.enable_index_list_effect&&new WOW({boxClass:"wow",animateClass:ThemeConfig.index_list_effect_class||"fadeIn",offset:0,mobile:!0,live:!0}).init()}};o=[],document.addEventListener("DOMContentLoaded",(function(){Object.keys(c).forEach((function(t){return!o.includes(t)&&c[t]()}))}))})(),r})()})); \ No newline at end of file diff --git a/source/js/min/joe.index.min.js.gz b/source/js/min/joe.index.min.js.gz index f9f29af..16671ff 100644 Binary files a/source/js/min/joe.index.min.js.gz and b/source/js/min/joe.index.min.js.gz differ diff --git a/source/js/min/joe.leaving.min.js b/source/js/min/joe.leaving.min.js index a068dea..6b31440 100644 --- a/source/js/min/joe.leaving.min.js +++ b/source/js/min/joe.leaving.min.js @@ -1 +1 @@ -const leavingContext={getData(){const sheetId=$(".joe_detail__title").attr("data-sheetid");Utils.request(`/api/content/sheets/${sheetId}/comments/top_view`,"GET").then(res=>{const $leavingList=$(".joe_detail__leaving-list"),$leavingNone=$(".joe_detail__leaving-none");if(res.total){const str=res.content.reduce((sum,item)=>{if(item.content.trim()){const markedHtml=marked(item.content).replace(/bili\//g,"bili/hd/ic_emoji_"),emoji=Utils.renderedEmojiHtml(markedHtml);item.content=Utils.return2Br(emoji)}return sum+`
  • \n
    \n 用户头像\n
    ${item.author}
    \n
    ${new Date(item.createTime).toLocaleDateString()}
    \n
    \n
    \n
    ${item.content}
    \n
    \n
  • `},"");$leavingList.html(str),leavingContext.randomColor(),$leavingList.show(),$leavingNone.hide()}else $leavingList.hide(),$leavingNone.show()}).catch(err=>{$leavingList.hide(),$leavingNone.show()})},randomColor(){let _index=100;const colors=["#dcc10c","#299bec","#ea5455","#7367f0","#32ccbb","#f6416c","#28c76f","#9f44d3","#f55555","#736efe","#e96d71","#de4313","#d939cd","#4c83ff","#f072b6","#c346c2","#5961f9","#fd6585","#465efb","#ffc600","#fa742b","#5151e5","#bb4e75","#e255cd","#63c549","#0ecdde","#f067b4","#f067b4","#ff9a9e","#1dd5de","#4facfe","#f093fb","#6fa3ef","#bc99c4","#46c47c","#f9bb3c","#e8583d","#f68e5f"],random=(min,max)=>Math.floor(Math.random()*(max-min+1))+min,$el=$(".joe_detail__leaving-list"),maxWidth=$el.width(),maxHeight=$el.height(),radius1=["20px 300px","20px 400px","20px 500px","30px 300px","30px 400px","30px 500px","40px 300px","40px 400px","40px 500px"],radius2=["300px 20px","400px 20px","500px 20px","300px 30px","400px 30px","500px 30px","300px 40px","400px 40px","500px 40px"];$(".joe_detail__leaving-list .item").each((index,item)=>{const zIndex=random(1,99),background=colors[random(0,colors.length-1)],width=Math.ceil($(item).width()),height=Math.ceil($(item).height()),top=random(0,maxHeight-height),left=random(0,maxWidth-width);$(item).css({display:"block",zIndex:zIndex,background:background,top:top,left:left,borderTopLeftRadius:radius2[random(0,radius2.length-1)],borderTopRightRadius:radius1[random(0,radius1.length-1)],borderBottomLeftRadius:radius1[random(0,radius1.length-1)],borderBottomRightRadius:radius1[random(0,radius1.length-1)]}),$(item).draggabilly({containment:!0}),$(item).on("dragStart",e=>{_index++,$(item).css({zIndex:_index})})})}};document.addEventListener("DOMContentLoaded",()=>{leavingContext.getData()}); \ No newline at end of file +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var a in n)("object"==typeof exports?exports:e)[a]=n[a]}}(self,(function(){return e={getData:function(){var t=$(".joe_detail__title").attr("data-sheetid");Utils.request("/api/content/sheets/".concat(t,"/comments/top_view"),"GET").then((function(t){var n=$(".joe_detail__leaving-list"),a=$(".joe_detail__leaving-none");if(t.total){var o=t.content.reduce((function(e,t){if(t.content.trim()){var n=marked(t.content).replace(/bili\//g,"bili/hd/ic_emoji_"),a=Utils.renderedEmojiHtml(n);t.content=Utils.return2Br(a)}return e+'
  • \n
    \n 用户头像\n
    ').concat(t.author,'
    \n
    ').concat(new Date(t.createTime).toLocaleDateString(),'
    \n
    \n
    \n
    ').concat(t.content,"
    \n
    \n
  • ")}),"");n.html(o),e.randomColor(),n.show(),a.hide()}else n.hide(),a.show()})).catch((function(e){$leavingList.hide(),$leavingNone.show()}))},randomColor:function(){var e=100,t=["#dcc10c","#299bec","#ea5455","#7367f0","#32ccbb","#f6416c","#28c76f","#9f44d3","#f55555","#736efe","#e96d71","#de4313","#d939cd","#4c83ff","#f072b6","#c346c2","#5961f9","#fd6585","#465efb","#ffc600","#fa742b","#5151e5","#bb4e75","#e255cd","#63c549","#0ecdde","#f067b4","#f067b4","#ff9a9e","#1dd5de","#4facfe","#f093fb","#6fa3ef","#bc99c4","#46c47c","#f9bb3c","#e8583d","#f68e5f"],n=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},a=$(".joe_detail__leaving-list"),o=a.width(),i=a.height(),c=["20px 300px","20px 400px","20px 500px","30px 300px","30px 400px","30px 500px","40px 300px","40px 400px","40px 500px"],d=["300px 20px","400px 20px","500px 20px","300px 30px","400px 30px","500px 30px","300px 40px","400px 40px","500px 40px"];$(".joe_detail__leaving-list .item").each((function(a,r){var l=n(1,99),f=t[n(0,t.length-1)],p=Math.ceil($(r).width()),s=Math.ceil($(r).height()),x=n(0,i-s),h=n(0,o-p);$(r).css({display:"block",zIndex:l,background:f,top:x,left:h,borderTopLeftRadius:d[n(0,d.length-1)],borderTopRightRadius:c[n(0,c.length-1)],borderBottomLeftRadius:c[n(0,c.length-1)],borderBottomRightRadius:c[n(0,c.length-1)]}),$(r).draggabilly({containment:!0}),$(r).on("dragStart",(function(t){e++,$(r).css({zIndex:e})}))}))}},document.addEventListener("DOMContentLoaded",(function(){e.getData()})),{};var e})); \ No newline at end of file diff --git a/source/js/min/joe.utils.min.js b/source/js/min/joe.utils.min.js index 627ec09..3fadab6 100644 --- a/source/js/min/joe.utils.min.js +++ b/source/js/min/joe.utils.min.js @@ -1 +1 @@ -class Emoji{constructor(name,description,category,style){this.name=name,this.description=description,this.category=category,this.style=style,this.extension=["tieba"].includes(category)?"gif":"png"}}const hahaEmoji=[new Emoji("kuxiao","哭笑","haha"),new Emoji("heng","哼","haha"),new Emoji("guzhang","鼓掌","haha"),new Emoji("haha","哈哈","haha"),new Emoji("aini","爱你","haha"),new Emoji("bazhang","巴掌","haha"),new Emoji("beishang","悲伤","haha"),new Emoji("han","汗","haha"),new Emoji("deyi","得意","haha"),new Emoji("ok","ok","haha"),new Emoji("touxiao","偷笑","haha"),new Emoji("wabikong","挖鼻孔","haha"),new Emoji("weiqu","委屈","haha"),new Emoji("weixiao","微笑","haha"),new Emoji("huaixiao","坏笑","haha"),new Emoji("woshou","握手","haha"),new Emoji("wulian","捂脸","haha"),new Emoji("xiaku","吓哭","haha"),new Emoji("xiaoku","笑哭","haha"),new Emoji("xixi","嘻嘻","haha"),new Emoji("qinqin","亲亲","haha"),new Emoji("qiwang","期望","haha"),new Emoji("chanzui","馋嘴","haha"),new Emoji("huaxin","花心","haha"),new Emoji("hufen","互粉","haha"),new Emoji("keai","可爱","haha"),new Emoji("kelian","可怜","haha"),new Emoji("bishi","鄙视","haha"),new Emoji("bizui","闭嘴","haha"),new Emoji("yep","耶","haha"),new Emoji("zan","赞","haha"),new Emoji("yihuo","疑惑","haha"),new Emoji("yinxiao","阴笑","haha"),new Emoji("yiwen","疑问","haha"),new Emoji("bujiandan","不简单","haha"),new Emoji("bye","拜拜","haha"),new Emoji("chigua","吃瓜","haha"),new Emoji("chijing","吃惊","haha"),new Emoji("chuitou","锤头","haha"),new Emoji("dahaqian","打哈欠","haha"),new Emoji("fahuo","发火","haha"),new Emoji("bang","棒","haha"),new Emoji("gou","狗","haha"),new Emoji("guolai","过来","haha"),new Emoji("haixiu","害羞","haha"),new Emoji("hashiiqi","哈士奇","haha"),new Emoji("heixian","黑线","haha"),new Emoji("kouzhao","口罩","haha"),new Emoji("kulou","骷髅","haha"),new Emoji("kun","困","haha"),new Emoji("landelini","懒得理你","haha"),new Emoji("mao","猫","haha"),new Emoji("outu","呕吐","haha"),new Emoji("qian","钱","haha"),new Emoji("quantou","拳头","haha"),new Emoji("shaoerbuyi","少儿不宜","haha"),new Emoji("shayan","傻眼","haha"),new Emoji("shengbing","生病","haha"),new Emoji("tushetou","吐舌头","haha"),new Emoji("shuijiao","睡觉","haha"),new Emoji("sikao","思考","haha"),new Emoji("shiwang","失望","haha"),new Emoji("taikaixin","太开心","haha"),new Emoji("tear","流泪","haha"),new Emoji("tianping","舔屏","haha"),new Emoji("xu","嘘","haha"),new Emoji("youhengheng","右哼哼","haha"),new Emoji("yun","晕","haha"),new Emoji("zhouma","咒骂","haha"),new Emoji("zhuakuang","抓狂","haha"),new Emoji("zuohengheng","左哼哼","haha"),new Emoji("zuoyi","作揖","haha")],bilibiliEmoji=[new Emoji("baiyan","白眼","bilibili",{"animation-duration":"1800ms","animation-timing-function":"steps(45)",transform:"translateY(-1408px)",height:"1440px"}),new Emoji("fadai","发呆","bilibili",{"animation-duration":"1080ms","animation-timing-function":"steps(27)",transform:"translateY(-832px)",height:"864px"}),new Emoji("koubi","抠鼻","bilibili",{"animation-duration":"1200ms","animation-timing-function":"steps(30)",transform:"translateY(-928px)",height:"960px"}),new Emoji("qinqin","亲亲","bilibili",{"animation-duration":"280ms","animation-timing-function":"steps(7)",transform:"translateY(-192px)",height:"224px"}),new Emoji("weiqu","委屈","bilibili",{"animation-duration":"800ms","animation-timing-function":"steps(20)",transform:"translateY(-608px)",height:"640px"}),new Emoji("bishi","鄙视","bilibili",{"animation-duration":"360ms","animation-timing-function":"steps(9)",transform:"translateY(-256px)",height:"288px"}),new Emoji("fanu","发怒","bilibili",{"animation-duration":"1320ms","animation-timing-function":"steps(33)",transform:"translateY(-1024px)",height:"1056px"}),new Emoji("kun","困","bilibili",{"animation-duration":"1760ms","animation-timing-function":"steps(44)",transform:"translateY(-1376px)",height:"1408px"}),new Emoji("se","色","bilibili",{"animation-duration":"400ms","animation-timing-function":"steps(10)",transform:"translateY(-288px)",height:"320px"}),new Emoji("weixiao","微笑","bilibili",{"animation-duration":"800ms","animation-timing-function":"steps(20)",transform:"translateY(-608px)",height:"640px"}),new Emoji("bizui","闭嘴","bilibili",{"animation-duration":"1240ms","animation-timing-function":"steps(31)",transform:"translateY(-960px)",height:"992px"}),new Emoji("ganga","尴尬","bilibili",{"animation-duration":"1520ms","animation-timing-function":"steps(38)",transform:"translateY(-1184px)",height:"1216px"}),new Emoji("lengmo","冷漠","bilibili",{"animation-duration":"40ms","animation-timing-function":"steps(1)",transform:"translateY(-0px)",height:"32px"}),new Emoji("shengbing","生病","bilibili",{"animation-duration":"1400ms","animation-timing-function":"steps(35)",transform:"translateY(-1088px)",height:"1120px"}),new Emoji("wunai","无奈","bilibili",{"animation-duration":"920ms","animation-timing-function":"steps(23)",transform:"translateY(-704px)",height:"736px"}),new Emoji("chan","馋","bilibili",{"animation-duration":"1600ms","animation-timing-function":"steps(40)",transform:"translateY(-1248px)",height:"1280px"}),new Emoji("guilian","鬼脸","bilibili",{"animation-duration":"40ms","animation-timing-function":"steps(1)",transform:"translateY(-0px)",height:"32px"}),new Emoji("liubixue","流鼻血","bilibili",{"animation-duration":"1400ms","animation-timing-function":"steps(35)",transform:"translateY(-1088px)",height:"1120px"}),new Emoji("shengqi","生气","bilibili",{"animation-duration":"440ms","animation-timing-function":"steps(11)",transform:"translateY(-320px)",height:"352px"}),new Emoji("xiaoku","笑哭","bilibili",{"animation-duration":"600ms","animation-timing-function":"steps(15)",transform:"translateY(-448px)",height:"480px"}),new Emoji("daku","大哭","bilibili",{"animation-duration":"320ms","animation-timing-function":"steps(8)",transform:"translateY(-224px)",height:"256px"}),new Emoji("guzhang","鼓掌","bilibili",{"animation-duration":"680ms","animation-timing-function":"steps(17)",transform:"translateY(-512px)",height:"544px"}),new Emoji("liuhan","流汗","bilibili",{"animation-duration":"1080ms","animation-timing-function":"steps(27)",transform:"translateY(-832px)",height:"864px"}),new Emoji("shuizhao","睡着","bilibili",{"animation-duration":"960ms","animation-timing-function":"steps(24)",transform:"translateY(-736px)",height:"768px"}),new Emoji("xieyanxiao","斜眼笑","bilibili",{"animation-duration":"320ms","animation-timing-function":"steps(8)",transform:"translateY(-224px)",height:"256px"}),new Emoji("dalao","大佬","bilibili",{"animation-duration":"1320ms","animation-timing-function":"steps(33)",transform:"translateY(-1024px)",height:"1056px"}),new Emoji("haixiu","害羞","bilibili",{"animation-duration":"1240ms","animation-timing-function":"steps(31)",transform:"translateY(-960px))",height:"992px"}),new Emoji("liulei","流泪","bilibili",{"animation-duration":"40ms","animation-timing-function":"steps(1)",transform:"translateY(-0px)",height:"32px"}),new Emoji("sikao","思考","bilibili",{"animation-duration":"1440ms","animation-timing-function":"steps(36)",transform:"translateY(-1120px)",height:"1152px"}),new Emoji("yiwen","疑问","bilibili",{"animation-duration":"840ms","animation-timing-function":"steps(21)",transform:"translateY(-640px)",height:"672px"}),new Emoji("dalian","打脸","bilibili",{"animation-duration":"1480ms","animation-timing-function":"steps(37)",transform:"translateY(-1152px)",height:"1184px"}),new Emoji("heirenwenhao","黑人问号","bilibili",{"animation-duration":"1040ms","animation-timing-function":"steps(26)",transform:"translateY(-800px)",height:"832px"}),new Emoji("miantian","腼腆","bilibili",{"animation-duration":"1120ms","animation-timing-function":"steps(28)",transform:"translateY(-864px)",height:"896px"}),new Emoji("tiaokan","调侃","bilibili",{"animation-duration":"40ms","animation-timing-function":"steps(1)",transform:"translateY(-0px)",height:"32px"}),new Emoji("yun","晕","bilibili",{"animation-duration":"480ms","animation-timing-function":"steps(12)",transform:"translateY(-352px)",height:"384px"}),new Emoji("dianzan","点赞","bilibili",{"animation-duration":"800ms","animation-timing-function":"steps(20)",transform:"translateY(-608px)",height:"640px"}),new Emoji("huaixiao","坏笑","bilibili",{"animation-duration":"1240ms","animation-timing-function":"steps(31)",transform:"translateY(-960px)",height:"992px"}),new Emoji("mudengkoudai","目瞪口呆","bilibili",{"animation-duration":"40ms","animation-timing-function":"steps(1)",transform:"translateY(-0px)",height:"32px"}),new Emoji("tiaopi","调皮","bilibili",{"animation-duration":"2000ms","animation-timing-function":"steps(50)",transform:"translateY(-1568px)",height:"1600px"}),new Emoji("zaijian","再见","bilibili",{"animation-duration":"960ms","animation-timing-function":"steps(24)",transform:"translateY(-736px)",height:"768px"}),new Emoji("doge","狗头","bilibili",{"animation-duration":"800ms","animation-timing-function":"steps(20)",transform:"translateY(-608px)",height:"640px"}),new Emoji("jingxia","惊吓","bilibili",{"animation-duration":"1280ms","animation-timing-function":"steps(32)",transform:"translateY(-992px)",height:"1024px"}),new Emoji("nanguo","难过","bilibili",{"animation-duration":"1120ms","animation-timing-function":"steps(28)",transform:"translateY(-864px)",height:"896px"}),new Emoji("touxiao","偷笑","bilibili",{"animation-duration":"240ms","animation-timing-function":"steps(6)",transform:"translateY(-160px)",height:"192px"}),new Emoji("zhoumei","皱眉","bilibili",{"animation-duration":"40ms","animation-timing-function":"steps(1)",transform:"translateY(-0px)",height:"32px"}),new Emoji("facai","发财","bilibili",{"animation-duration":"1200ms","animation-timing-function":"steps(30)",transform:"translateY(-928px)",height:"960px"}),new Emoji("keai","可爱","bilibili",{"animation-duration":"680ms","animation-timing-function":"steps(17)",transform:"translateY(-512px)",height:"544px"}),new Emoji("outu","呕吐","bilibili",{"animation-duration":"1680ms","animation-timing-function":"steps(42)",transform:"translateY(-1312px)",height:"1344px"}),new Emoji("tuxue","吐血","bilibili",{"animation-duration":"320ms","animation-timing-function":"steps(8)",transform:"translateY(-224px)",height:"256px"}),new Emoji("zhuakuang","抓狂","bilibili",{"animation-duration":"760ms","animation-timing-function":"steps(19)",transform:"translateY(-576px)",height:"608px"})],tiebaEmoji=[new Emoji("tongue","吐舌","tieba"),new Emoji("theblackline","尴尬","tieba"),new Emoji("tear","大哭","tieba"),new Emoji("surprised","惊哭","tieba"),new Emoji("surprised2","惊讶","tieba"),new Emoji("spray","喷","tieba"),new Emoji("spit","呕吐","tieba"),new Emoji("smilingeyes","笑眼","tieba"),new Emoji("shui","睡觉","tieba"),new Emoji("shame","羞辱","tieba"),new Emoji("se","色","tieba"),new Emoji("rmb","钱","tieba"),new Emoji("reluctantly","勉强","tieba"),new Emoji("rbq","观望","tieba"),new Emoji("niconiconi","爱你","tieba"),new Emoji("naive","天真","tieba"),new Emoji("ku","酷","tieba"),new Emoji("huaji","滑稽","tieba"),new Emoji("hu","呼","tieba"),new Emoji("han","汗","tieba"),new Emoji("haha","哈哈","tieba"),new Emoji("good","棒","tieba"),new Emoji("doubt","疑惑","tieba"),new Emoji("britan","茶","tieba"),new Emoji("bbd","棒棒哒","tieba"),new Emoji("awesome","强","tieba"),new Emoji("anger","愤怒","tieba"),new Emoji("aa","啊啊","tieba"),new Emoji("happy","高兴","tieba"),new Emoji("grievance","郁闷","tieba")],menheraEmoji=[new Emoji("(⌒▽⌒)","(⌒▽⌒)","menhera"),new Emoji("( ̄▽ ̄)","( ̄▽ ̄)","menhera"),new Emoji("(=・ω・=)","(=・ω・=)","menhera"),new Emoji("(`・ω・´)","(`・ω・´)","menhera"),new Emoji("(〜 ̄△ ̄)〜","(〜 ̄△ ̄)〜","menhera"),new Emoji("(・∀・)","(・∀・)","menhera"),new Emoji("(°∀°)ノ","(°∀°)ノ","menhera"),new Emoji("( ̄3 ̄)","( ̄3 ̄)","menhera"),new Emoji("╮( ̄▽ ̄)╭","╮( ̄▽ ̄)╭","menhera"),new Emoji("(´_ゝ`)","(´_ゝ`)","menhera"),new Emoji("←_←","←_←","menhera"),new Emoji("→_→","→_→","menhera"),new Emoji("(<_<)","(<_<)","menhera"),new Emoji("(>_>)","(>_>)","menhera"),new Emoji("(;¬_¬)","(;¬_¬)","menhera"),new Emoji("(▔□▔)/","(▔□▔)/","menhera"),new Emoji("(゚Д゚≡゚д゚)!?","(゚Д゚≡゚д゚)!?","menhera"),new Emoji("Σ(゚д゚;)","Σ(゚д゚;)","menhera"),new Emoji("Σ( ̄□ ̄||)","Σ( ̄□ ̄||)","menhera"),new Emoji("(’;ω;‘)","(’;ω;‘)","menhera"),new Emoji("(/TДT)/","(/TДT)/","menhera"),new Emoji("(^・ω・^ )","(^・ω・^ )","menhera"),new Emoji("(。・ω・。)","(。・ω・。)","menhera"),new Emoji("(● ̄(エ) ̄●)","(● ̄(エ) ̄●)","menhera"),new Emoji("ε=ε=(ノ≧∇≦)ノ","ε=ε=(ノ≧∇≦)ノ","menhera"),new Emoji("(’・_・‘)","(’・_・‘)","menhera"),new Emoji("(-_-#)","(-_-#)","menhera"),new Emoji("( ̄へ ̄)","( ̄へ ̄)","menhera"),new Emoji("( ̄ε(# ̄)Σ","( ̄ε(# ̄)Σ","menhera"),new Emoji("ヽ(‘Д’)ノ","ヽ(‘Д’)ノ","menhera"),new Emoji("(#-_-)┯━┯","(#-_-)┯━┯","menhera"),new Emoji("(╯°口°)╯(┴—┴","(╯°口°)╯(┴—┴","menhera"),new Emoji("←◡←","←◡←","menhera"),new Emoji("( ♥д♥)","( ♥д♥)","menhera"),new Emoji("_(:3」∠)_","_(:3」∠)_","menhera"),new Emoji("Σ>―(〃°ω°〃)♡→","Σ>―(〃°ω°〃)♡→","menhera"),new Emoji("⁄(⁄ ⁄•⁄ω⁄•⁄ ⁄)⁄","⁄(⁄ ⁄•⁄ω⁄•⁄ ⁄)⁄","menhera"),new Emoji("(╬゚д゚)▄︻┻┳═一","(╬゚д゚)▄︻┻┳═一","menhera"),new Emoji("・*・:≡( ε:)","・*・:≡( ε:)","menhera"),new Emoji("(笑)","(笑)","menhera"),new Emoji("(汗)","(汗)","menhera"),new Emoji("(泣)","(泣)","menhera"),new Emoji("(苦笑)","(苦笑)","menhera")],emojiData=[...hahaEmoji,...bilibiliEmoji,...tiebaEmoji,...menheraEmoji];var Utils={_version:"1.0.0",isMobile:()=>!!(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i)),timeAgo(time){if(!time)return"未知时间";time=new Date(time).getTime();var between=(new Date).getTime()-time,days=Math.floor(between/864e5);if(0===days){var leave1=between%864e5,hours=Math.floor(leave1/36e5);if(0===hours){var leave2=leave1%36e5,minutes=Math.floor(leave2/6e4);if(0===minutes){var leave3=leave2%6e4,seconds=Math.round(leave3/1e3);return seconds<1?"刚刚":seconds+" 秒前"}return minutes+" 分钟前"}return hours+" 小时前"}return days<0?"刚刚":1===days?"昨天":Utils.formatDate(time,"yyyy年MM月dd日 hh:mm")},formatDate(date,fmt="yyyy-MM-dd"){date=new Date(date),/(y+)/.test(fmt)&&(fmt=fmt.replace(RegExp.$1,(date.getFullYear()+"").substr(4-RegExp.$1.length)));let o={"M+":date.getMonth()+1,"d+":date.getDate(),"h+":date.getHours(),"m+":date.getMinutes(),"s+":date.getSeconds()};for(let k in o)if(new RegExp(`(${k})`).test(fmt)){let str=o[k]+"";fmt=fmt.replace(RegExp.$1,1===RegExp.$1.length?str:str.padStart(2,"0"))}return fmt},getNavLangSub(){var currentLang=navigator.language;return(currentLang=currentLang.substr(0,2))||(currentLang=navigator.browserLanguage),currentLang},request:(url,method="GET",data)=>new Promise((resolve,reject)=>{$.ajax({url:`${url}?_r=${Date.now()}`,type:method.toUpperCase(),headers:{"API-Authorization":ThemeConfig.access_key||"joe2.0"},dataType:"json",timeout:1e4,data:data,success(res){200===res.status&&res.data?resolve(res.data):reject(res)},error(err){const errMsg=err&&err.responseJSON?err.responseJSON.message:"出错了!";Qmsg.error(errMsg),reject(errMsg)}})}),throttle(fn,threshold=250){let timer,last;return function(){const context=this,args=[...arguments],now=Date.now();last&&last+threshold>now?(clearTimeout(timer),timer=null,timer=setTimeout(()=>{last=now,fn.apply(context,args)},threshold)):(last=now,fn.apply(context,args))}},setCookie(key,value,days){var keyVE=key+Utils._version,expires="";if(days){var date=new Date;date.setTime(date.getTime()+24*days*60*60*1e3),expires="; expires="+date.toUTCString()}document.cookie=keyVE+"="+(value||"")+expires+"; path=/"},getCookie(key){for(var keyVE=key+Utils._version+"=",ca=document.cookie.split(";"),i=0;idate?result.data:(localStorage.removeItem(keyVE),null)},removeLocalStorage(key){var keyVE=key+Utils._version;localStorage.removeItem(keyVE)},loadJS(url,callback){Utils._loadRes("script",url,callback)},loadCSS(url,callback){Utils._loadRes("link",url,callback)},_loadRes(type,url,callback){var dom,fn=callback||function(){};switch(type){case"script":(dom=document.createElement(type)).type="text/javascript",dom.src=url;break;case"link":(dom=document.createElement(type)).type="text/css",dom.type="stylesheet",dom.href=url;break;default:return void console.warn("暂不支持:"+type+" 类型")}dom.readyState?dom.onreadystatechange=function(){"loaded"!=dom.readyState&&"complete"!=dom.readyState||(dom.onreadystatechange=null,fn())}:dom.onload=function(){fn()},document.getElementsByTagName("head")[0].appendChild(dom)},getRandomColor(min=0,max=1){return min||(min=0),max||(max=0),min=isNaN(min)?0:Number(min),max=isNaN(max)?1:Number(max),min=Math.min(Math.max(Math.abs(min),0),1),max=(max=Math.min(Math.max(Math.abs(max),0),1))=list[mid]&&valuestr.replace(/((\s| )*\r?\n)+$/g,""),limitBr:str=>str.replace(/((\s| )*\r?\n){3,}/g,"\r\n\r\n"),trimHeadBr:str=>str.replace(/^((\s| )*\r?\n)+/g,""),removeNotEmoji(doc){const smilies=doc.getElementsByClassName("emoji-img");let skip=!0;for(let i=0;iemojiData.filter(item=>item.category===type&&item.name===name).length>0,return2Br:str=>(str=Utils.trimHeadBr(str),str=Utils.trimTailBr(str),(str=Utils.limitBr(str)).replace(/\r?\n/g,"
    "))};window.Utils=Utils; \ No newline at end of file +!function(n,i){if("object"==typeof exports&&"object"==typeof module)module.exports=i();else if("function"==typeof define&&define.amd)define([],i);else{var a=i();for(var e in a)("object"==typeof exports?exports:n)[e]=a[e]}}(self,(function(){return(()=>{"use strict";var n={};(n=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})})(n);var i=function n(i,a,e,t){!function(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}(this,n),this.name=i,this.description=a,this.category=e,this.style=t,this.extension=["tieba"].includes(e)?"gif":"png"},a=[new i("kuxiao","哭笑","haha"),new i("heng","哼","haha"),new i("guzhang","鼓掌","haha"),new i("haha","哈哈","haha"),new i("aini","爱你","haha"),new i("bazhang","巴掌","haha"),new i("beishang","悲伤","haha"),new i("han","汗","haha"),new i("deyi","得意","haha"),new i("ok","ok","haha"),new i("touxiao","偷笑","haha"),new i("wabikong","挖鼻孔","haha"),new i("weiqu","委屈","haha"),new i("weixiao","微笑","haha"),new i("huaixiao","坏笑","haha"),new i("woshou","握手","haha"),new i("wulian","捂脸","haha"),new i("xiaku","吓哭","haha"),new i("xiaoku","笑哭","haha"),new i("xixi","嘻嘻","haha"),new i("qinqin","亲亲","haha"),new i("qiwang","期望","haha"),new i("chanzui","馋嘴","haha"),new i("huaxin","花心","haha"),new i("hufen","互粉","haha"),new i("keai","可爱","haha"),new i("kelian","可怜","haha"),new i("bishi","鄙视","haha"),new i("bizui","闭嘴","haha"),new i("yep","耶","haha"),new i("zan","赞","haha"),new i("yihuo","疑惑","haha"),new i("yinxiao","阴笑","haha"),new i("yiwen","疑问","haha"),new i("bujiandan","不简单","haha"),new i("bye","拜拜","haha"),new i("chigua","吃瓜","haha"),new i("chijing","吃惊","haha"),new i("chuitou","锤头","haha"),new i("dahaqian","打哈欠","haha"),new i("fahuo","发火","haha"),new i("bang","棒","haha"),new i("gou","狗","haha"),new i("guolai","过来","haha"),new i("haixiu","害羞","haha"),new i("hashiiqi","哈士奇","haha"),new i("heixian","黑线","haha"),new i("kouzhao","口罩","haha"),new i("kulou","骷髅","haha"),new i("kun","困","haha"),new i("landelini","懒得理你","haha"),new i("mao","猫","haha"),new i("outu","呕吐","haha"),new i("qian","钱","haha"),new i("quantou","拳头","haha"),new i("shaoerbuyi","少儿不宜","haha"),new i("shayan","傻眼","haha"),new i("shengbing","生病","haha"),new i("tushetou","吐舌头","haha"),new i("shuijiao","睡觉","haha"),new i("sikao","思考","haha"),new i("shiwang","失望","haha"),new i("taikaixin","太开心","haha"),new i("tear","流泪","haha"),new i("tianping","舔屏","haha"),new i("xu","嘘","haha"),new i("youhengheng","右哼哼","haha"),new i("yun","晕","haha"),new i("zhouma","咒骂","haha"),new i("zhuakuang","抓狂","haha"),new i("zuohengheng","左哼哼","haha"),new i("zuoyi","作揖","haha")],e=[new i("baiyan","白眼","bilibili",{"animation-duration":"1800ms","animation-timing-function":"steps(45)",transform:"translateY(-1408px)",height:"1440px"}),new i("fadai","发呆","bilibili",{"animation-duration":"1080ms","animation-timing-function":"steps(27)",transform:"translateY(-832px)",height:"864px"}),new i("koubi","抠鼻","bilibili",{"animation-duration":"1200ms","animation-timing-function":"steps(30)",transform:"translateY(-928px)",height:"960px"}),new i("qinqin","亲亲","bilibili",{"animation-duration":"280ms","animation-timing-function":"steps(7)",transform:"translateY(-192px)",height:"224px"}),new i("weiqu","委屈","bilibili",{"animation-duration":"800ms","animation-timing-function":"steps(20)",transform:"translateY(-608px)",height:"640px"}),new i("bishi","鄙视","bilibili",{"animation-duration":"360ms","animation-timing-function":"steps(9)",transform:"translateY(-256px)",height:"288px"}),new i("fanu","发怒","bilibili",{"animation-duration":"1320ms","animation-timing-function":"steps(33)",transform:"translateY(-1024px)",height:"1056px"}),new i("kun","困","bilibili",{"animation-duration":"1760ms","animation-timing-function":"steps(44)",transform:"translateY(-1376px)",height:"1408px"}),new i("se","色","bilibili",{"animation-duration":"400ms","animation-timing-function":"steps(10)",transform:"translateY(-288px)",height:"320px"}),new i("weixiao","微笑","bilibili",{"animation-duration":"800ms","animation-timing-function":"steps(20)",transform:"translateY(-608px)",height:"640px"}),new i("bizui","闭嘴","bilibili",{"animation-duration":"1240ms","animation-timing-function":"steps(31)",transform:"translateY(-960px)",height:"992px"}),new i("ganga","尴尬","bilibili",{"animation-duration":"1520ms","animation-timing-function":"steps(38)",transform:"translateY(-1184px)",height:"1216px"}),new i("lengmo","冷漠","bilibili",{"animation-duration":"40ms","animation-timing-function":"steps(1)",transform:"translateY(-0px)",height:"32px"}),new i("shengbing","生病","bilibili",{"animation-duration":"1400ms","animation-timing-function":"steps(35)",transform:"translateY(-1088px)",height:"1120px"}),new i("wunai","无奈","bilibili",{"animation-duration":"920ms","animation-timing-function":"steps(23)",transform:"translateY(-704px)",height:"736px"}),new i("chan","馋","bilibili",{"animation-duration":"1600ms","animation-timing-function":"steps(40)",transform:"translateY(-1248px)",height:"1280px"}),new i("guilian","鬼脸","bilibili",{"animation-duration":"40ms","animation-timing-function":"steps(1)",transform:"translateY(-0px)",height:"32px"}),new i("liubixue","流鼻血","bilibili",{"animation-duration":"1400ms","animation-timing-function":"steps(35)",transform:"translateY(-1088px)",height:"1120px"}),new i("shengqi","生气","bilibili",{"animation-duration":"440ms","animation-timing-function":"steps(11)",transform:"translateY(-320px)",height:"352px"}),new i("xiaoku","笑哭","bilibili",{"animation-duration":"600ms","animation-timing-function":"steps(15)",transform:"translateY(-448px)",height:"480px"}),new i("daku","大哭","bilibili",{"animation-duration":"320ms","animation-timing-function":"steps(8)",transform:"translateY(-224px)",height:"256px"}),new i("guzhang","鼓掌","bilibili",{"animation-duration":"680ms","animation-timing-function":"steps(17)",transform:"translateY(-512px)",height:"544px"}),new i("liuhan","流汗","bilibili",{"animation-duration":"1080ms","animation-timing-function":"steps(27)",transform:"translateY(-832px)",height:"864px"}),new i("shuizhao","睡着","bilibili",{"animation-duration":"960ms","animation-timing-function":"steps(24)",transform:"translateY(-736px)",height:"768px"}),new i("xieyanxiao","斜眼笑","bilibili",{"animation-duration":"320ms","animation-timing-function":"steps(8)",transform:"translateY(-224px)",height:"256px"}),new i("dalao","大佬","bilibili",{"animation-duration":"1320ms","animation-timing-function":"steps(33)",transform:"translateY(-1024px)",height:"1056px"}),new i("haixiu","害羞","bilibili",{"animation-duration":"1240ms","animation-timing-function":"steps(31)",transform:"translateY(-960px))",height:"992px"}),new i("liulei","流泪","bilibili",{"animation-duration":"40ms","animation-timing-function":"steps(1)",transform:"translateY(-0px)",height:"32px"}),new i("sikao","思考","bilibili",{"animation-duration":"1440ms","animation-timing-function":"steps(36)",transform:"translateY(-1120px)",height:"1152px"}),new i("yiwen","疑问","bilibili",{"animation-duration":"840ms","animation-timing-function":"steps(21)",transform:"translateY(-640px)",height:"672px"}),new i("dalian","打脸","bilibili",{"animation-duration":"1480ms","animation-timing-function":"steps(37)",transform:"translateY(-1152px)",height:"1184px"}),new i("heirenwenhao","黑人问号","bilibili",{"animation-duration":"1040ms","animation-timing-function":"steps(26)",transform:"translateY(-800px)",height:"832px"}),new i("miantian","腼腆","bilibili",{"animation-duration":"1120ms","animation-timing-function":"steps(28)",transform:"translateY(-864px)",height:"896px"}),new i("tiaokan","调侃","bilibili",{"animation-duration":"40ms","animation-timing-function":"steps(1)",transform:"translateY(-0px)",height:"32px"}),new i("yun","晕","bilibili",{"animation-duration":"480ms","animation-timing-function":"steps(12)",transform:"translateY(-352px)",height:"384px"}),new i("dianzan","点赞","bilibili",{"animation-duration":"800ms","animation-timing-function":"steps(20)",transform:"translateY(-608px)",height:"640px"}),new i("huaixiao","坏笑","bilibili",{"animation-duration":"1240ms","animation-timing-function":"steps(31)",transform:"translateY(-960px)",height:"992px"}),new i("mudengkoudai","目瞪口呆","bilibili",{"animation-duration":"40ms","animation-timing-function":"steps(1)",transform:"translateY(-0px)",height:"32px"}),new i("tiaopi","调皮","bilibili",{"animation-duration":"2000ms","animation-timing-function":"steps(50)",transform:"translateY(-1568px)",height:"1600px"}),new i("zaijian","再见","bilibili",{"animation-duration":"960ms","animation-timing-function":"steps(24)",transform:"translateY(-736px)",height:"768px"}),new i("doge","狗头","bilibili",{"animation-duration":"800ms","animation-timing-function":"steps(20)",transform:"translateY(-608px)",height:"640px"}),new i("jingxia","惊吓","bilibili",{"animation-duration":"1280ms","animation-timing-function":"steps(32)",transform:"translateY(-992px)",height:"1024px"}),new i("nanguo","难过","bilibili",{"animation-duration":"1120ms","animation-timing-function":"steps(28)",transform:"translateY(-864px)",height:"896px"}),new i("touxiao","偷笑","bilibili",{"animation-duration":"240ms","animation-timing-function":"steps(6)",transform:"translateY(-160px)",height:"192px"}),new i("zhoumei","皱眉","bilibili",{"animation-duration":"40ms","animation-timing-function":"steps(1)",transform:"translateY(-0px)",height:"32px"}),new i("facai","发财","bilibili",{"animation-duration":"1200ms","animation-timing-function":"steps(30)",transform:"translateY(-928px)",height:"960px"}),new i("keai","可爱","bilibili",{"animation-duration":"680ms","animation-timing-function":"steps(17)",transform:"translateY(-512px)",height:"544px"}),new i("outu","呕吐","bilibili",{"animation-duration":"1680ms","animation-timing-function":"steps(42)",transform:"translateY(-1312px)",height:"1344px"}),new i("tuxue","吐血","bilibili",{"animation-duration":"320ms","animation-timing-function":"steps(8)",transform:"translateY(-224px)",height:"256px"}),new i("zhuakuang","抓狂","bilibili",{"animation-duration":"760ms","animation-timing-function":"steps(19)",transform:"translateY(-576px)",height:"608px"})],t=[new i("tongue","吐舌","tieba"),new i("theblackline","尴尬","tieba"),new i("tear","大哭","tieba"),new i("surprised","惊哭","tieba"),new i("surprised2","惊讶","tieba"),new i("spray","喷","tieba"),new i("spit","呕吐","tieba"),new i("smilingeyes","笑眼","tieba"),new i("shui","睡觉","tieba"),new i("shame","羞辱","tieba"),new i("se","色","tieba"),new i("rmb","钱","tieba"),new i("reluctantly","勉强","tieba"),new i("rbq","观望","tieba"),new i("niconiconi","爱你","tieba"),new i("naive","天真","tieba"),new i("ku","酷","tieba"),new i("huaji","滑稽","tieba"),new i("hu","呼","tieba"),new i("han","汗","tieba"),new i("haha","哈哈","tieba"),new i("good","棒","tieba"),new i("doubt","疑惑","tieba"),new i("britan","茶","tieba"),new i("bbd","棒棒哒","tieba"),new i("awesome","强","tieba"),new i("anger","愤怒","tieba"),new i("aa","啊啊","tieba"),new i("happy","高兴","tieba"),new i("grievance","郁闷","tieba")],o=[new i("(⌒▽⌒)","(⌒▽⌒)","menhera"),new i("( ̄▽ ̄)","( ̄▽ ̄)","menhera"),new i("(=・ω・=)","(=・ω・=)","menhera"),new i("(`・ω・´)","(`・ω・´)","menhera"),new i("(〜 ̄△ ̄)〜","(〜 ̄△ ̄)〜","menhera"),new i("(・∀・)","(・∀・)","menhera"),new i("(°∀°)ノ","(°∀°)ノ","menhera"),new i("( ̄3 ̄)","( ̄3 ̄)","menhera"),new i("╮( ̄▽ ̄)╭","╮( ̄▽ ̄)╭","menhera"),new i("(´_ゝ`)","(´_ゝ`)","menhera"),new i("←_←","←_←","menhera"),new i("→_→","→_→","menhera"),new i("(<_<)","(<_<)","menhera"),new i("(>_>)","(>_>)","menhera"),new i("(;¬_¬)","(;¬_¬)","menhera"),new i("(▔□▔)/","(▔□▔)/","menhera"),new i("(゚Д゚≡゚д゚)!?","(゚Д゚≡゚д゚)!?","menhera"),new i("Σ(゚д゚;)","Σ(゚д゚;)","menhera"),new i("Σ( ̄□ ̄||)","Σ( ̄□ ̄||)","menhera"),new i("(’;ω;‘)","(’;ω;‘)","menhera"),new i("(/TДT)/","(/TДT)/","menhera"),new i("(^・ω・^ )","(^・ω・^ )","menhera"),new i("(。・ω・。)","(。・ω・。)","menhera"),new i("(● ̄(エ) ̄●)","(● ̄(エ) ̄●)","menhera"),new i("ε=ε=(ノ≧∇≦)ノ","ε=ε=(ノ≧∇≦)ノ","menhera"),new i("(’・_・‘)","(’・_・‘)","menhera"),new i("(-_-#)","(-_-#)","menhera"),new i("( ̄へ ̄)","( ̄へ ̄)","menhera"),new i("( ̄ε(# ̄)Σ","( ̄ε(# ̄)Σ","menhera"),new i("ヽ(‘Д’)ノ","ヽ(‘Д’)ノ","menhera"),new i("(#-_-)┯━┯","(#-_-)┯━┯","menhera"),new i("(╯°口°)╯(┴—┴","(╯°口°)╯(┴—┴","menhera"),new i("←◡←","←◡←","menhera"),new i("( ♥д♥)","( ♥д♥)","menhera"),new i("_(:3」∠)_","_(:3」∠)_","menhera"),new i("Σ>―(〃°ω°〃)♡→","Σ>―(〃°ω°〃)♡→","menhera"),new i("⁄(⁄ ⁄•⁄ω⁄•⁄ ⁄)⁄","⁄(⁄ ⁄•⁄ω⁄•⁄ ⁄)⁄","menhera"),new i("(╬゚д゚)▄︻┻┳═一","(╬゚д゚)▄︻┻┳═一","menhera"),new i("・*・:≡( ε:)","・*・:≡( ε:)","menhera"),new i("(笑)","(笑)","menhera"),new i("(汗)","(汗)","menhera"),new i("(泣)","(泣)","menhera"),new i("(苦笑)","(苦笑)","menhera")],r=[].concat(a,e,t,o),s={_version:"1.0.0",isMobile:function(){return!!(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i))},timeAgo:function(n){if(!n)return"未知时间";n=new Date(n).getTime();var i=(new Date).getTime()-n,a=Math.floor(i/864e5);if(0===a){var e=i%864e5,t=Math.floor(e/36e5);if(0===t){var o=e%36e5,r=Math.floor(o/6e4);if(0===r){var h=o%6e4,m=Math.round(h/1e3);return m<1?"刚刚":m+" 秒前"}return r+" 分钟前"}return t+" 小时前"}return a<0?"刚刚":1===a?"昨天":s.formatDate(n,"yyyy年MM月dd日 hh:mm")},formatDate:function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd";n=new Date(n),/(y+)/.test(i)&&(i=i.replace(RegExp.$1,(n.getFullYear()+"").substr(4-RegExp.$1.length)));var a={"M+":n.getMonth()+1,"d+":n.getDate(),"h+":n.getHours(),"m+":n.getMinutes(),"s+":n.getSeconds()};for(var e in a)if(new RegExp("(".concat(e,")")).test(i)){var t=a[e]+"";i=i.replace(RegExp.$1,1===RegExp.$1.length?t:t.padStart(2,"0"))}return i},getNavLangSub:function(){var n=navigator.language;return(n=n.substr(0,2))||(n=navigator.browserLanguage),n},request:function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",a=arguments.length>2?arguments[2]:void 0;return new Promise((function(e,t){$.ajax({url:"".concat(n,"?_r=").concat(Date.now()),type:i.toUpperCase(),headers:{"API-Authorization":ThemeConfig.access_key||"joe2.0"},dataType:"json",timeout:1e4,data:a,success:function(n){200===n.status&&n.data?e(n.data):t(n)},error:function(n){var i=n&&n.responseJSON?n.responseJSON.message:"出错了!";Qmsg.error(i),t(i)}})}))},throttle:function(n){var i,a,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250;return function(){var t=this,o=Array.prototype.slice.call(arguments),r=Date.now();a&&a+e>r?(clearTimeout(i),i=null,i=setTimeout((function(){a=r,n.apply(t,o)}),e)):(a=r,n.apply(t,o))}},setCookie:function(n,i,a){var e=n+s._version,t="";if(a){var o=new Date;o.setTime(o.getTime()+24*a*60*60*1e3),t="; expires="+o.toUTCString()}document.cookie=e+"="+(i||"")+t+"; path=/"},getCookie:function(n){for(var i=n+s._version+"=",a=document.cookie.split(";"),e=0;e2&&void 0!==arguments[2]?arguments[2]:3600,e=n+s._version,t=new Date;try{localStorage.setItem(e,JSON.stringify({expires:t.valueOf()+1e3*a,data:i}))}catch(e){"QuotaExceededError"===e.name&&(console.log("数据已满,自动清空"),localStorage.clear(),setLocalStorage(n,i,a))}})),getLocalStorage:function(n){var i=n+s._version,a=JSON.parse(localStorage.getItem(i)),e=new Date;return a&&a.expires>e?a.data:(localStorage.removeItem(i),null)},removeLocalStorage:function(n){var i=n+s._version;localStorage.removeItem(i)},loadJS:function(n,i){s._loadRes("script",n,i)},loadCSS:function(n,i){s._loadRes("link",n,i)},_loadRes:function(n,i,a){var e,t=a||function(){};switch(n){case"script":(e=document.createElement(n)).type="text/javascript",e.src=i;break;case"link":(e=document.createElement(n)).type="text/css",e.type="stylesheet",e.href=i;break;default:return void console.warn("暂不支持:"+n+" 类型")}e.readyState?e.onreadystatechange=function(){"loaded"!=e.readyState&&"complete"!=e.readyState||(e.onreadystatechange=null,t())}:e.onload=function(){t()},document.getElementsByTagName("head")[0].appendChild(e)},getRandomColor:function(){var n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return i||(i=0),a||(a=0),i=isNaN(i)?0:Number(i),a=isNaN(a)?1:Number(a),i=Math.min(Math.max(Math.abs(i),0),1),a=(a=Math.min(Math.max(Math.abs(a),0),1))=n[t]&&i0},return2Br:function(n){return n=s.trimHeadBr(n),n=s.trimTailBr(n),(n=s.limitBr(n)).replace(/\r?\n/g,"
    ")}};return window.Utils=s,n})()})); \ No newline at end of file diff --git a/source/js/min/joe.utils.min.js.gz b/source/js/min/joe.utils.min.js.gz index 5fa23ad..c7ef8b8 100644 Binary files a/source/js/min/joe.utils.min.js.gz and b/source/js/min/joe.utils.min.js.gz differ