From 995d5bddccbe16d5d98b777e7620dc137c33b6c1 Mon Sep 17 00:00:00 2001 From: csfwff Date: Mon, 11 Dec 2023 17:01:31 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E5=8D=A1=E7=89=87=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/js/common.min.js | 2 +- src/main/resources/js/symbol-defs.min.js | 2 +- src/main/resources/scss/index.scss | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/js/common.min.js b/src/main/resources/js/common.min.js index 7dc457cb..e47bcc79 100644 --- a/src/main/resources/js/common.min.js +++ b/src/main/resources/js/common.min.js @@ -1 +1 @@ -var Util={bling:void 0,isBlinging:!1,ipAction:function(e){switch(e){case 1:$("#ipType").val("ban");break;case 2:$("#ipType").val("unban")}$("#ipListForm").submit()},insertWarnBroadcastModel:function(e){let t="";switch(e){case 1:t="摸鱼派社区即将进行升级维护,预计停服时间:5分钟
维护完成后摸鱼派将自动刷新(客户端请手动重新登录),感谢你的理解~
摸鱼这么久了,去给自己倒杯咖啡吧 ☕️";break;case 2:t="摸鱼派社区即将进行升级维护,预计停服时间:20秒
维护完成后摸鱼派将自动刷新(客户端请手动重新登录),感谢你的理解~
摸鱼这么久了,去给自己倒杯咖啡吧 ☕️"}$("[name='warnBroadcastText']").val(t)},genMetal(e,t){return"https://fishpi.cn/gen?scale=0.79&txt="+e+(t=void 0!==t&&""!==t?"&"+t:"")},genMiniMetal(e){return"https://fishpi.cn/gen?scale=0.79&txt="+(e=void 0!==e&&""!==e?"&"+e:"")},parseDom(e){var t=document.createElement("div");return t.innerHTML=e,t.childNodes},parseArray(arrStr){var tempKey="arr23"+(new Date).getTime(),arrayJsonStr='{"'+tempKey+'":'+arrStr+"}",arrayJson,arrayJson=JSON&&JSON.parse?JSON.parse(arrayJsonStr):eval("("+arrayJsonStr+")");return arrayJson[tempKey]},fadeIn(t,a){let n=0;for(let e=0;e<100;e++)setTimeout(function(){n=+(n+.01).toFixed(2),t.style.opacity=n,99===e&&setTimeout(a,200)},5*e)},fadeOut(t,a){let n=1;for(let e=0;e<100;e++)setTimeout(function(){n=+(n-.01).toFixed(2),t.style.opacity=n,99===e&&setTimeout(a,400)},5*e)},getAtUsers:function(e){var a=[];return $.ajax({url:Label.servePath+"/users/names",type:"POST",async:!1,data:JSON.stringify({name:e}),success:function(e){if(0===e.code)for(var t=0;t'+e.data[t].userName,avatar:e.data[t].userAvatarURL48,username:e.data[t].userName});else alert(e.msg)}}),a},LazyLoadImage:function(){function t(e){var t=document.createElement("img");t.src=e.getAttribute("data-src"),t.addEventListener("load",function(){$(e).attr("style")||$(e).attr("class")||$(e).attr("width")||$(e).attr("height")||1!==$(e).closest(".vditor-reset").length||t.naturalHeight>t.naturalWidth&&t.naturalWidth/t.naturalHeight<$(e).closest(".vditor-reset").width()/($(window).height()-40)&&t.naturalHeight>$(window).height()-40&&(e.style.height=$(window).height()-40+"px"),$(e).attr("class")||1!==$(e).closest(".vditor-reset").length||_processPreview($(e)),e.src=t.src,e.style.backgroundImage="none",e.style.backgroundColor="transparent"}),e.removeAttribute("data-src")}if(!("IntersectionObserver"in window))return $("img").each(function(){this.getAttribute("data-src")&&t(this)}),!1;window.imageIntersectionObserver?window.imageIntersectionObserver.disconnect():window.imageIntersectionObserver=new IntersectionObserver(function(e){e.forEach(function(e){(void 0===e.isIntersecting?0!==e.intersectionRatio:e.isIntersecting)&&e.target.getAttribute("data-src")&&t(e.target)})}),$("img").each(function(){window.imageIntersectionObserver.observe(this)})},addStyle:function(e,t){var a;document.getElementById(t)||((a=document.createElement("link")).id=t,a.setAttribute("rel","stylesheet"),a.setAttribute("type","text/css"),a.setAttribute("href",e),document.getElementsByTagName("head")[0].appendChild(a))},parseHljs:function(){Vditor.highlightRender({style:"github",enable:!Label.luteAvailable},document)},parseMarkdown:function(){Vditor.mermaidRender(document.body),Vditor.flowchartRender(document.body),Vditor.chartRender(),Vditor.mindmapRender(),Vditor.mathRender(document.body),Vditor.codeRender(document.body,Label.langLabel),Vditor.abcRender(),Vditor.graphvizRender(document.body),Vditor.plantumlRender(document.body);var e,t=!1;$(".vditor-reset").each(function(){$(this).find("a").each(function(){var e=$(this).attr("href");e&&".mov"===e.substr(e.length-4).toLowerCase()&&(t=!0)})}),t&&(e=function(){$(".vditor-reset").each(function(){$(this).find("a").each(function(){var e=$(this),t=$(this).attr("href");t&&".mov"===t.substr(t.length-4).toLowerCase()&&(this.style.height="360px",this.style.width="270px",e.removeAttr("href"),(e=LivePhotosKit.Player(this)).photoSrc=Label.staticServePath+"/images/livephoto.png",e.videoSrc=t)})})},"undefined"!=typeof LivePhotosKit?e():$.ajax({method:"GET",url:Label.staticServePath+"/js/lib/livephotoskit.js",dataType:"script",cache:!0}).done(function(){e()}))},prevKey:void 0,clipboard:function(e,t,a){e.click(function(e){t[0].select();try{document.execCommand("copy")?a():console.log("Copy command was unsuccessful")}catch(e){console.log("Oops, unable to copy")}window.getSelection().removeAllRanges()})},closeAlert:function(){$(document).mouseup(function(){$("body").css("overflow",""),$(document).off("mousemove")}).on("touchend",function(e){$("body").css("overflow",""),$(document).off("touchmove")}),$("#alertDialogPanel,.dialog-background").fadeOut(200),setTimeout(function(){$("#alertDialogPanel,.dialog-background").remove()},200)},clearAlert(){$("#alertDialogPanel,.dialog-background").remove()},alert:function(e,t=""){var o;function a(e){var t=$(o).offset();const n=(e=e.pageX?e:e.targetTouches[0]).pageX-t.left,i=e.pageY-t.top;function a(e){$("body").css("overflow","hidden");let t=(e=e.pageX?e:e.targetTouches[0]).pageX-n,a=e.pageY-i-$(window).scrollTop();t<0?t=0:t>$(document).width()-$(o).outerWidth(!0)&&(t=$(document).width()-$(o).outerWidth(!0)),a<0?a=0:a>$(document).height()-$(o).outerHeight(!0)&&(a=$(document).height()-$(o).outerHeight(!0)),$(o).css({left:t+"px",top:a+"px"})}$(document).mousemove(a).on("touchmove",a),$(document).mouseup(function(){$("body").css("overflow",""),$(document).off("mousemove")}).on("touchend",function(e){$("body").css("overflow",""),$(document).off("touchmove")})}t='
'+('
'+t+'
'+e+"
"),$("body").append(t),$("#alertDialogPanel").css({top:($(window).height()-$("#alertDialogPanel").height())/2+"px",left:($(window).width()-$("#alertDialogPanel").width())/2+"px",outline:"none"}).fadeIn(200).focus(),o="#alertDialogPanel",$(".dialog-header-bg").mousedown(a).on("touchstart",a)},makeNotificationRead:function(e,a){return $.ajax({url:Label.servePath+"/notifications/make-read/"+e,type:"GET",cache:!1,success:function(e,t){0===e.code&&(Util.setUnreadNotificationCount(!1),$(".notification li").addClass("read"),a)&&($(a).prev().remove(),$(a).remove(),0===$(".home-menu .count").length)&&$(".module-header:last > span").remove()}}),!1},_initCommonHotKey:function(){if(!Label.userKeyboardShortcutsStatus||"1"===Label.userKeyboardShortcutsStatus)return!1;function n(e){var t=$(".list > ul > li.focus"),a=0===$(".radio-btn").length?0:48;if(1===t.length){if("top"===e||"bottom"===e)return $(window).scrollTop(t.offset().top-a);($(window).height()+$(window).scrollTop()t.offset().top)&&("down"===e?$(window).scrollTop(t.offset().top-($(window).height()-t.outerHeight())):$(window).scrollTop(t.offset().top-a))}}0===$("#articleTitle").length&&$(document).bind("keydown","c",function(e){return Util.prevKey||(window.location=Label.servePath+"/post?type=0"),!1}),$(document).bind("keyup","g",function(){return Util.prevKey="g",setTimeout(function(){Util.prevKey=void 0},1e3),!1}).bind("keyup","s",function(){return $("#search").focus(),!1}).bind("keyup","t",function(){return void 0===Util.prevKey&&Util.goTop(),!1}).bind("keyup","n",function(e){return"g"===Util.prevKey&&(window.location=Label.servePath+"/notifications"),!1}).bind("keyup","h",function(e){return"g"===Util.prevKey&&(window.location=Label.servePath+"/hot"),!1}).bind("keyup","i",function(e){return"g"===Util.prevKey&&(window.location=Label.servePath),!1}).bind("keyup","r",function(e){return"g"===Util.prevKey&&(window.location=Label.servePath+"/recent"),!1}).bind("keyup","p",function(e){return"g"===Util.prevKey&&(window.location=Label.servePath+"/perfect"),!1}).bind("keyup","Shift+/",function(e){return window.open(Label.servePath+"/article/1631459254239"),!1}).bind("keyup","j",function(e){var t=".content .list:last > ul > ",a=(1===$("#comments").length&&(t="#comments .list > ul > "),$(t+"li.focus"));return 0===a.length?$(t+"li:first").addClass("focus"):1===a.next().length&&(a.next().addClass("focus"),a.removeClass("focus")),n("down"),!1}).bind("keyup","k",function(e){var t=".content .list:last > ul > ",a=(1===$("#comments").length&&(t="#comments .list > ul > "),$(t+"li.focus"));return 0===a.length?$(t+"li:last").addClass("focus"):1===a.prev().length&&(a.prev().addClass("focus"),a.removeClass("focus")),n("up"),!1}).bind("keyup","f",function(e){var t=".content .list:last > ul > ";return 1===$("#comments").length&&(t="#comments .list > ul > "),$(t+"li.focus").removeClass("focus"),$(t+"li:first").addClass("focus"),n("top"),!1}).bind("keyup","l",function(e){var t;return Util.prevKey||(t=".content .list:last > ul > ",1===$("#comments").length&&(t="#comments .list > ul > "),$(t+"li.focus").removeClass("focus"),$(t+"li:last").addClass("focus"),n("bottom")),!1}).bind("keyup","o",function(e){var t;return 1!==$("#comments").length&&(t=(t=(t=$(".content .list:last > ul > li.focus > h2 > a").attr("href"))||$(".content .list:last > ul > li.focus .fn-flex-1 > h2 > a").attr("href"))||$(".content .list:last > ul > li.focus h2.fn-flex-1 > a").attr("href"))&&(window.location=t),!1}).bind("keyup","return",function(e){var t;return 1!==$("#comments").length&&(t=(t=(t=$(".content .list:last > ul > li.focus > h2 > a").attr("href"))||$(".content .list:last > ul > li.focus .fn-flex-1 > h2 > a").attr("href"))||$(".content .list:last > ul > li.focus h2.fn-flex-1 > a").attr("href"))&&(window.location=t),!1})},notifyMsg:function(t){if(!("Notification"in window))return!1;function a(e){(e=new Notification(Label.visionLabel,{body:Label.desktopNotificationTemplateLabel.replace("${count}",e),icon:Label.staticServePath+"/images/faviconH.png"})).onclick=e.onerror=function(){window.location=Label.servePath+"/notifications"}}"granted"===Notification.permission?a(t):"denied"!==Notification.permission&&Notification.requestPermission(function(e){"granted"===e&&a(t)})},processClipBoard:function(e,n){var t,a;return""===e.getData("text/html")&&2===e.items.length?"":(t=!1,e=toMarkdown(e.getData("text/html"),{converters:[{filter:"img",replacement:function(e,t){var a;return 1===t.attributes.length?"":(a={url:t.src},$.ajax({url:Label.servePath+"/fetch-upload",type:"POST",data:JSON.stringify(a),cache:!1,success:function(e,t){var a;0===e.code&&(a=(a=n.getValue()).replace(e.originalURL,e.url),n.setValue(a))}}),"![]("+t.src+")")}},{filter:["pre","code"],replacement:function(e){return 1With ♥ from '}},[{source:function(e,a){n.search(e,{hitsPerPage:20},function(e,t){e?a([]):a(t.hits,t)})},displayKey:"name",templates:{suggestion:function(e){return e._highlightResult.articleTitle.value}}}]).on("autocomplete:selected",function(e,t,a){window.open(Label.servePath+"/article/"+t.oId)}).bind("keyup","esc",function(){$(this).blur()})},newVditor:function(e){Label.emoji||$.ajax({url:Label.servePath+"/users/emotions",type:"GET",cache:!0,async:!1,success:function(e){Label.emoji={},e.data.forEach(function(e){var t=Object.keys(e)[0];Label.emoji[t]=e[t]})}});var t={outline:e.outline||{enable:!1},after:e.after||void 0,typewriterMode:e.typewriterMode||!1,cache:{enable:e.cache||!1},input:e.input,preview:{delay:500,mode:e.preview.mode,url:Label.servePath+"/markdown",parse:function(e){"none"!==e.style.display&&Util.LazyLoadImage()},hljs:{enable:!Label.luteAvailable}},upload:{max:Label.fileMaxSize,url:Label.servePath+"/upload",filename:function(e){return e.replace(/\?|\\|\/|:|\||<|>|\*|\[|\]|\s+/g,"-")},accept:".zip,.rar,.7z,.tar,.gzip,.bz2,.jar,.jpg,.jpeg,.png,.gif,.webp,.webm,.bmp,.mp3,.mp4,.wav,.mov,.weba,.mkv"},placeholder:e.placeholder,height:e.height,counter:{enable:!!e.counter,max:e.counter},resize:{enable:e.resize.enable,position:e.resize.position},lang:Label.langLabel,hint:{parse:!1,emojiTail:'设置常用表情',emoji:Label.emoji,extend:[{key:"@",hint:function(a){var n=[];return $.ajax({url:Label.servePath+"/users/names",type:"POST",async:!1,data:JSON.stringify({name:a}),success:function(e){if(0===e.code){for(var t=0;t'+e.data[t].userName});""===a&&n.push({html:' 参与者',value:"@participants "})}else alert(e.msg)}}),n}}]},esc:e.esc,ctrlEnter:e.ctrlEnter};return $(window).width()<768?(t.toolbar=["emoji","link","upload","edit-mode",{name:"more",toolbar:["insert-after","fullscreen","preview","info","help"]}],t.resize.enable=!1):e.toolbar&&(t.toolbar=e.toolbar),new Vditor(e.id,t)},setUnreadNotificationCount:function(r){$.ajax({url:Label.servePath+"/notifications/unread/count",type:"GET",cache:!1,success:function(e,t){function a(e){var t="",a='';return 0'+Label.notificationCommentedLabel+' '+e.unreadCommentedNotificationCnt+""+a.replace("${markReadType}","commented")+""),0'+Label.notificationReplyLabel+' '+e.unreadReplyNotificationCnt+""+a.replace("${markReadType}","reply")+""),0'+Label.notificationAtLabel+' '+e.unreadAtNotificationCnt+""+a.replace("${markReadType}","at")+""),0'+Label.notificationFollowingLabel+' '+e.unreadFollowingNotificationCnt+""+a.replace("${markReadType}","following")+""),0'+Label.pointLabel+' '+e.unreadPointNotificationCnt+""),0'+Label.sameCityLabel+' '+e.unreadBroadcastNotificationCnt+""),0'+Label.systemLabel+' '+e.unreadSysAnnounceNotificationCnt+""),0'+Label.newFollowerLabel+' '+e.unreadNewFollowerNotificationCnt+""),t}var n=e.unreadNotificationCnt;if($.ua.set(navigator.userAgent),$.ua.device.type&&"mobile"===$.ua.device.type){if(0
    '+i+"
"),$("#aNotifications").click(function(){$("#notificationsPanel").slideToggle()})}else window.localStorage.hadNotificate="false",$("#aNotifications").removeClass("msg").addClass("no-msg").text(n).attr("href",Label.servePath+"/notifications");return!1}var o='  ';if(0
    '+i+"
"),$("#aNotifications").click(function(e){e=window.innerWidth-e.pageX-$("#notificationsPanel").width()/2;console.log(e),$("#notificationsPanel").css("right",e+"px"),$("#notificationsPanel").show()}),$("body").click(function(e){"aNotifications"!==e.target.id&&"notificationsPanel"!==$(e.target).closest(".module").attr("id")&&$("#notificationsPanel").hide()})}else window.localStorage.hadNotificate="false",$("#notificationsPanel").remove(),$("#aNotifications").removeClass("msg").addClass("no-msg tooltipped tooltipped-w").html(o+n).attr("href",Label.servePath+"/notifications")}})},follow:function(a,n,i,o){var e;return Label.isLoggedIn?!$(a).hasClass("disabled")&&(e={followingId:n},$(a).addClass("disabled"),void $.ajax({url:Label.servePath+"/follow/"+i,type:"POST",cache:!1,data:JSON.stringify(e),success:function(e,t){0===e.code&&($(a).removeClass("disabled"),void 0!==o?"article"===i||"tag"===i?$(a).html(' '+(o+1)).attr("onclick","Util.unfollow(this, '"+n+"', '"+i+"', "+(o+1)+")").attr("aria-label",Label.uncollectLabel).addClass("ft-red"):"article-watch"===i&&$(a).html(' '+(o+1)).attr("onclick","Util.unfollow(this, '"+n+"', '"+i+"', "+(o+1)+")").attr("aria-label",Label.unfollowLabel).addClass("ft-red"):$(a).attr("onclick","Util.unfollow(this, '"+n+"', '"+i+"')").text("article"===i?Label.uncollectLabel:Label.unfollowLabel))},complete:function(){$(a).removeClass("disabled")}})):(Util.needLogin(),!1)},unfollow:function(a,n,i,o){if($(a).hasClass("disabled"))return!1;var e={followingId:n};$(a).addClass("disabled"),$.ajax({url:Label.servePath+"/unfollow/"+i,type:"POST",cache:!1,data:JSON.stringify(e),success:function(e,t){0===e.code&&(void 0!==o?"article"===i||"tag"===i?$(a).removeClass("ft-red").html(' '+(o-1)).attr("onclick","Util.follow(this, '"+n+"', '"+i+"',"+(o-1)+")").attr("aria-label",Label.collectLabel):"article-watch"===i&&$(a).removeClass("ft-red").html(' '+(o-1)).attr("onclick","Util.follow(this, '"+n+"', '"+i+"',"+(o-1)+")").attr("aria-label",Label.followLabel):$(a).attr("onclick","Util.follow(this, '"+n+"', '"+i+"')").text("article"===i?Label.collectLabel:Label.followLabel))},complete:function(){$(a).removeClass("disabled")}})},goTop:function(){$("html, body").animate({scrollTop:0},800)},goLogin:function(){var e;-1===location.href.indexOf("/login")&&(e=location.href,0===location.search.indexOf("?goto")&&(e=location.href.replace(location.search,"")),window.location.href=Label.servePath+"/login?goto="+encodeURIComponent(e))},needLogin:function(){Util.goLogin()},goRegister:function(){var e;-1===location.href.indexOf("/register")&&(e=location.href,0===location.search.indexOf("?goto")&&(e=location.href.replace(location.search,"")),window.location.href=Label.servePath+"/register?goto="+encodeURIComponent(e))},_kill:function(){"IE"===$.ua.browser.name&&parseInt($.ua.browser.version)<10&&$.ajax({url:Label.servePath+"/kill-browser",type:"GET",cache:!1,success:function(e,t){$("body").append(e),$("#killBrowser").dialog({modal:!0,hideFooter:!0,height:345,width:600}),$("#killBrowser").dialog("open")}})},_initActivity:function(t,e){t<=0&&(t=1);let a=0,n=setInterval(()=>{++a>=t&&(a=t,clearInterval(n));var e=20-t/2+"px";$("#activityProcessor .percent-wave-before").css("top",e),$("#activityProcessor .percent-wave-after").css("top",e),$("#activityProcessor .percent").html(parseInt(a)+"%")},10)},_initBreezemoon:function(r,e,t){0!==r.length&&(e.keypress(function(e){13===e.keyCode&&r.click()}),r.click(function(){t?"disabled"!==r.attr("disabled")&&(r.attr("disabled","disabled").css("opacity","0.3"),$.ajax({url:Label.servePath+"/breezemoon",type:"POST",cache:!1,headers:{csrfToken:$(this).data("csrf")},data:JSON.stringify({breezemoonContent:e.val()}),success:function(t){if(0===t.code){var a=t.data.breezemoonAuthorName,n=t.data.breezemoonAuthorThumbnailURL48,i=t.data.breezemoonContent,o=t.data.oId;let e=r.parent().parent().find(".module-list");e.prepend('
  • \n\n\n\n'+i+"\n
  • "),r.parent().find("input").val(""),e.find("li:last").fadeOut(199,function(){e.find("li:last").remove()}),e.find("li:first").slideDown(200),Util.listenUserCard()}else Util.alert(t.msg)},complete:function(){r.css("opacity",1).removeAttr("disabled")}})):Util.goLogin()}))},init:function(e){if($.ua.set(navigator.userAgent),"mobile"!==$.ua.device.type&&($("body").append(''),Util.listenUserCard()),this._kill(),this._initNav(),1===$(".pagination select").length&&$(".pagination select").change(function(){var e=$(this).data("url")+"?p="+$(this).val();$(this).data("param")&&(e+="&"+$(this).data("param")),window.location.href=e}),$(".nav input.search").focus(function(){$(".nav .tags").css("visibility","hidden")}).blur(function(){$(".nav .tags").css("visibility","visible")}),$(window).scroll(function(){20<$(window).scrollTop()&&0===$(".radio-btn").length?$(".go-top").show():$(".go-top").hide()}),Util.parseMarkdown(),Util.parseHljs(),e&&(window.localStorage.hadNotificate||(window.localStorage.hadNotificate="false"),Util.setUnreadNotificationCount(!0)),$(window).keyup(function(e){27===e.keyCode&&Util.closeAlert()}),this._initBreezemoon($("#breezemoonPostBtn"),$("#breezemoonInput"),e),this._initCommonHotKey(),e)return!1;$("body").click(function(e){0===$(e.target).closest(".nav .form").length&&$(".nav .form").hide()})},userCardCache:new Map,listenUserCard:function(){var a=!1;$(".avatar, .avatar-small, .avatar-middle, .avatar-mid, .avatar-big, .name-at").unbind(),$(".avatar, .avatar-small, .avatar-middle, .avatar-mid, .avatar-big, .name-at").hover(function(){if(void 0!==$(this).attr("aria-label")){let t=$(this).attr("aria-label"),a;Util.userCardCache.has(t)?a=Util.userCardCache.get(t):$.ajax({url:Label.servePath+"/user/"+t,type:"GET",cache:!1,async:!1,headers:{csrfToken:Label.csrfToken},success:function(e){a=e,Util.userCardCache.set(t,a)}});a.followerCount,a.followingUserCount;var o=a.oId,r=(a.onlineMinute,a.userAvatarURL210),l=a.userCity,s=a.userIntro,c=a.userName,d=a.userNickname,u=a.userOnlineFlag,f=a.userPoint,g=(a.userURL,a.userRole),h=a.cardBg,p=a.canFollow,v=a.userNo,m=a.userAppRole,b=JSON.parse(a.sysMetal);let n='
    \n
    \n \n
    \n
    \n
    \n
    \n '+d+'\n '+c+"\n";n+="
    \n",""!==s?n+='
    \n '+s+"\n
    \n":"0"===m?n+='
    摸鱼派 '+v+" 号成员,黑客
    \n":"1"===m&&(n+='
    摸鱼派 '+v+" 号成员,画家
    \n");var w=b.list;if(void 0!==w&&0!==w.length){n+='
    ';for(let e=0;e"}n+="
    "}switch(n+='
    \n \n"+(!0===u?'在线':'离线'))+('
    \n \n 私信\n \n'),"yes"===p?n+='":"no"===p&&(n+='"),n+="
    \n
    \n
    \n
    \n
    ",$("#userCard").html(n),""!==h&&($("#userCardContent").addClass("user-card--bg"),$("#userCardContent").css("background-image","url("+h+")"),$("#userCardContent > div").attr("style","background-image: linear-gradient(90deg, rgba(214, 227, 235, 0.36), rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.76));"),$("#userCardContent > div > a > div").css("width","105px"),$("#userCardContent > div > a > div").css("height","105px"),$("#userCardContent > div > a > div").css("top","80px"));let e=$(this).offset().left,i=((e+=30)+350>$(document.body).width()&&(e-=350),$("#userCard").css("left",e),$(this).offset().top-110);i<45&&(i=$(this).offset().top+45),$("#userCard").css("top",i+"px"),$("#userCard").show()}},function(t){setTimeout(function(){var e=$(t.toElement);0!==$(e).parents("#userCard").length||a||$("#userCard").hide()},50)}),$("#userCard").unbind(),$("#userCard").hover(function(){a=!0},function(){a=!1,$("#userCard").hide()})},initUserChannel:function(e){e=new WebSocket(e);e.onopen=function(){console.log("Connected to user channel websocket.")},e.onmessage=function(e){var t,a,n=JSON.parse(e.data);switch(n.command){case"refreshNotification":"/cr"===window.location.pathname?(Util.makeNotificationRead("at"),Util.setUnreadNotificationCount(!0)):(Util.setUnreadNotificationCount(!0),0!==n.count&&Util.notice("default",3e3,"你有新的通知!点击查看"));break;case"chatUnreadCountRefresh":0===n.count&&Util.pauseBling(),$("#aChatCount").text(n.count);break;case"newIdleChatMessage":$("#aChatCount").text(parseInt($("#aChatCount").text())+1),"/chat"!==window.location.pathname?(Util.blingChat(),Util.notice("warning",3e3,"叮咚!"+n.senderUserName+" 向你发送了一条私信。点击查看")):(i=n.preview.substring(0,10),o=10.dialog-header-bg {border-radius: 4px 4px 0px 0px; background-color: rgb(151,49,210); color: rgb(255, 255, 255);}.dialog-main {height: 170px;overflow: auto;}
    \n
    \n

    摸鱼派社区紧急公告


    '+i+"

    ——紧急公告发布人:"+o+"
    \n","紧急公告"),Util.alert(i),$(".dialog-background").attr("onclick","")}},e.onclose=function(){console.log("Disconnected to user channel websocket.")},e.onerror=function(e){console.log("ERROR",e)}},blingChat:function(){$("#aChat").removeClass("no-msg").addClass("msg"),Util.isBlinging||(Util.isBlinging=!0,bling=setInterval(function(){$("#aChat").removeClass("no-msg").addClass("msg"),setTimeout(function(){$("#aChat").removeClass("msg").addClass("no-msg")},1e3)},2e3))},pauseBling:function(){$("#aChat").removeClass("msg").addClass("no-msg"),Util.isBlinging&&(Util.isBlinging=!1,clearInterval(bling))},_initNav:function(){var e=location.href;$(".user-nav > a").each(function(){0===e.indexOf($(this).attr("href"))?$(this).addClass("current"):"/register"===location.pathname?$(".user-nav a:last").addClass("current"):"/login"===location.pathname?$(".user-nav a:first").addClass("current"):0!==e.indexOf(Label.servePath+"/settings")&&0!==e.indexOf($("#aPersonListPanel").data("url"))||$("#aPersonListPanel").addClass("current")}),$(".nav .avatar-small").parent().click(function(){$("#personListPanel").show()}),$("body").click(function(e){"aPersonListPanel"!==$(e.target).closest("a").attr("id")&&"personListPanel"!==$(e.target).closest(".module").attr("id")&&$("#personListPanel").hide()})},logout:function(){window.localStorage&&(window.localStorage.clear(),window.localStorage.hadNotificate="false"),window.location.href=Label.servePath+"/logout?goto="+Label.servePath},startsWith:function(e,t){return e.match("^"+t)==t},mouseClickEffects:function(){var o=0;jQuery(document).ready(function(i){i("html").click(function(e){var t,a=18,n=(10==++o?t=i("").text("OωO"):20===o?t=i("").text("(๑•́ ∀ •̀๑)"):30===o?t=i("").text("(๑•́ ₃ •̀๑)"):40===o?t=i("").text("(๑•̀_•́๑)"):50===o?t=i("").text("( ̄へ ̄)"):60===o?t=i("").text("(╯°口°)╯(┴—┴"):70===o?t=i("").text("૮( ᵒ̌皿ᵒ̌ )ა"):80===o?t=i("").text("╮(。>口<。)╭"):90===o?t=i("").text("( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃"):100<=o&&o<=105?t=i("").text("(ꐦ°᷄д°᷅)"):(t=i(''),a=Math.round(14*Math.random()+6)),e.pageX),e=e.pageY;t.css({"z-index":9999,top:e-20,left:n,position:"absolute",color:"#E94F06","font-size":a,"-moz-user-select":"none","-webkit-user-select":"none","-ms-user-select":"none"}),i("body").append(t),t.animate({top:e-180,opacity:0},1500,function(){t.remove()})})})},notice:function(e,t,a,n){void 0!==n?$.tooltips(a,{type:e,duration:t,callback:n}):$.tooltips(a,{type:e,duration:t})}},Validate={goValidate:function(e){for(var t="
      ",a=0;a"+e.data[a].msg+"");return"
        "===t?(e.target.html(""),e.target.removeClass("error"),!0):(e.target.html(t+"
      "),e.target.addClass("error"),!1)},validate:function(e){var t=!0,a="",a="editor"===e.type?e.target.getValue():"imgSrc"===e.type?e.target.attr("src"):"imgStyle"===e.type?e.target.data("imageurl"):e.target.val().toString().replace(/(^\s*)|(\s*$)/g,"");switch(e.type){case"email":/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(e.target.val())||(t=!1);break;case"password":!(e.target.val().length<6||16=(e.min||0)}return t}},Label={},pngMagic=[137,80,78,71,13,10,26,10],jpeg_jfif=[74,70,73,70],jpeg_exif=[69,120,105,102],jpegMagic=[255,216,255,224],gifMagic0=[71,73,70,56,55,97],getGifMagic1=[71,73,70,56,57,97],wavMagic1=[82,73,70,70],wavMagic2=[87,65,86,69];function arraycopy(e,t,a,n,o){for(i=0;isuccess(): Unable to detect window audio context, cannot continue.")},function(e){console.log("getUserMedia->failure(): ERROR: Microphone access request failed!");switch(e.name){case"PermissionDeniedError":Label.recordDeniedLabel;break;case"DevicesNotFoundError":Label.recordDeviceNotFoundLabel;break;default:e.name}})):console.log("ERROR: getUserMedia not supported by browser.")},handleStartRecording:function(){Audio.recorderObj.startRecordingNewWavFile()},handleStopRecording:function(){Audio.recorderObj.stopRecording(),Audio.wavFileBlob=Audio.recorderObj.buildWavFileBlob()}};function Rotate(n){let i=!1,o=!1;this.submit=function(){if(!o){o=!0;let e=0,t,a;void 0===a&&(null!==(t=document.getElementById(n).getAttribute("style"))&&void 0!==t&&""!==t?t.endsWith(";")||(t+=";"):t="",a=setInterval(function(){360<(e+=5)&&(e=0),document.getElementById(n).setAttribute("style",t+"-webkit-transform: rotate("+e+"deg);"),0===e&&i&&(clearInterval(a),document.getElementById(n).setAttribute("style",t),o=!1)},15))}},this.stop=function(){i=!0},String.prototype.endWith=function(e){var t=this.length-e.length;return 0<=t&&this.lastIndexOf(e)===t}} \ No newline at end of file +var Util={bling:void 0,isBlinging:!1,ipAction:function(e){switch(e){case 1:$("#ipType").val("ban");break;case 2:$("#ipType").val("unban")}$("#ipListForm").submit()},insertWarnBroadcastModel:function(e){let t="";switch(e){case 1:t="摸鱼派社区即将进行升级维护,预计停服时间:5分钟
      维护完成后摸鱼派将自动刷新(客户端请手动重新登录),感谢你的理解~
      摸鱼这么久了,去给自己倒杯咖啡吧 ☕️";break;case 2:t="摸鱼派社区即将进行升级维护,预计停服时间:20秒
      维护完成后摸鱼派将自动刷新(客户端请手动重新登录),感谢你的理解~
      摸鱼这么久了,去给自己倒杯咖啡吧 ☕️"}$("[name='warnBroadcastText']").val(t)},genMetal(e,t){return"https://fishpi.cn/gen?scale=0.79&txt="+e+(t=void 0!==t&&""!==t?"&"+t:"")},genMiniMetal(e){return"https://fishpi.cn/gen?scale=0.79&txt="+(e=void 0!==e&&""!==e?"&"+e:"")},parseDom(e){var t=document.createElement("div");return t.innerHTML=e,t.childNodes},parseArray(arrStr){var tempKey="arr23"+(new Date).getTime(),arrayJsonStr='{"'+tempKey+'":'+arrStr+"}",arrayJson,arrayJson=JSON&&JSON.parse?JSON.parse(arrayJsonStr):eval("("+arrayJsonStr+")");return arrayJson[tempKey]},fadeIn(t,a){let n=0;for(let e=0;e<100;e++)setTimeout(function(){n=+(n+.01).toFixed(2),t.style.opacity=n,99===e&&setTimeout(a,200)},5*e)},fadeOut(t,a){let n=1;for(let e=0;e<100;e++)setTimeout(function(){n=+(n-.01).toFixed(2),t.style.opacity=n,99===e&&setTimeout(a,400)},5*e)},getAtUsers:function(e){var a=[];return $.ajax({url:Label.servePath+"/users/names",type:"POST",async:!1,data:JSON.stringify({name:e}),success:function(e){if(0===e.code)for(var t=0;t'+e.data[t].userName,avatar:e.data[t].userAvatarURL48,username:e.data[t].userName});else alert(e.msg)}}),a},LazyLoadImage:function(){function t(e){var t=document.createElement("img");t.src=e.getAttribute("data-src"),t.addEventListener("load",function(){$(e).attr("style")||$(e).attr("class")||$(e).attr("width")||$(e).attr("height")||1!==$(e).closest(".vditor-reset").length||t.naturalHeight>t.naturalWidth&&t.naturalWidth/t.naturalHeight<$(e).closest(".vditor-reset").width()/($(window).height()-40)&&t.naturalHeight>$(window).height()-40&&(e.style.height=$(window).height()-40+"px"),$(e).attr("class")||1!==$(e).closest(".vditor-reset").length||_processPreview($(e)),e.src=t.src,e.style.backgroundImage="none",e.style.backgroundColor="transparent"}),e.removeAttribute("data-src")}if(!("IntersectionObserver"in window))return $("img").each(function(){this.getAttribute("data-src")&&t(this)}),!1;window.imageIntersectionObserver?window.imageIntersectionObserver.disconnect():window.imageIntersectionObserver=new IntersectionObserver(function(e){e.forEach(function(e){(void 0===e.isIntersecting?0!==e.intersectionRatio:e.isIntersecting)&&e.target.getAttribute("data-src")&&t(e.target)})}),$("img").each(function(){window.imageIntersectionObserver.observe(this)})},addStyle:function(e,t){var a;document.getElementById(t)||((a=document.createElement("link")).id=t,a.setAttribute("rel","stylesheet"),a.setAttribute("type","text/css"),a.setAttribute("href",e),document.getElementsByTagName("head")[0].appendChild(a))},parseHljs:function(){Vditor.highlightRender({style:"github",enable:!Label.luteAvailable},document)},parseMarkdown:function(){Vditor.mermaidRender(document.body),Vditor.flowchartRender(document.body),Vditor.chartRender(),Vditor.mindmapRender(),Vditor.mathRender(document.body),Vditor.codeRender(document.body,Label.langLabel),Vditor.abcRender(),Vditor.graphvizRender(document.body),Vditor.plantumlRender(document.body);var e,t=!1;$(".vditor-reset").each(function(){$(this).find("a").each(function(){var e=$(this).attr("href");e&&".mov"===e.substr(e.length-4).toLowerCase()&&(t=!0)})}),t&&(e=function(){$(".vditor-reset").each(function(){$(this).find("a").each(function(){var e=$(this),t=$(this).attr("href");t&&".mov"===t.substr(t.length-4).toLowerCase()&&(this.style.height="360px",this.style.width="270px",e.removeAttr("href"),(e=LivePhotosKit.Player(this)).photoSrc=Label.staticServePath+"/images/livephoto.png",e.videoSrc=t)})})},"undefined"!=typeof LivePhotosKit?e():$.ajax({method:"GET",url:Label.staticServePath+"/js/lib/livephotoskit.js",dataType:"script",cache:!0}).done(function(){e()}))},prevKey:void 0,clipboard:function(e,t,a){e.click(function(e){t[0].select();try{document.execCommand("copy")?a():console.log("Copy command was unsuccessful")}catch(e){console.log("Oops, unable to copy")}window.getSelection().removeAllRanges()})},closeAlert:function(){$(document).mouseup(function(){$("body").css("overflow",""),$(document).off("mousemove")}).on("touchend",function(e){$("body").css("overflow",""),$(document).off("touchmove")}),$("#alertDialogPanel,.dialog-background").fadeOut(200),setTimeout(function(){$("#alertDialogPanel,.dialog-background").remove()},200)},clearAlert(){$("#alertDialogPanel,.dialog-background").remove()},alert:function(e,t=""){var o;function a(e){var t=$(o).offset();const n=(e=e.pageX?e:e.targetTouches[0]).pageX-t.left,i=e.pageY-t.top;function a(e){$("body").css("overflow","hidden");let t=(e=e.pageX?e:e.targetTouches[0]).pageX-n,a=e.pageY-i-$(window).scrollTop();t<0?t=0:t>$(document).width()-$(o).outerWidth(!0)&&(t=$(document).width()-$(o).outerWidth(!0)),a<0?a=0:a>$(document).height()-$(o).outerHeight(!0)&&(a=$(document).height()-$(o).outerHeight(!0)),$(o).css({left:t+"px",top:a+"px"})}$(document).mousemove(a).on("touchmove",a),$(document).mouseup(function(){$("body").css("overflow",""),$(document).off("mousemove")}).on("touchend",function(e){$("body").css("overflow",""),$(document).off("touchmove")})}t='
      '+('
      '+t+'
      '+e+"
      "),$("body").append(t),$("#alertDialogPanel").css({top:($(window).height()-$("#alertDialogPanel").height())/2+"px",left:($(window).width()-$("#alertDialogPanel").width())/2+"px",outline:"none"}).fadeIn(200).focus(),o="#alertDialogPanel",$(".dialog-header-bg").mousedown(a).on("touchstart",a)},makeNotificationRead:function(e,a){return $.ajax({url:Label.servePath+"/notifications/make-read/"+e,type:"GET",cache:!1,success:function(e,t){0===e.code&&(Util.setUnreadNotificationCount(!1),$(".notification li").addClass("read"),a)&&($(a).prev().remove(),$(a).remove(),0===$(".home-menu .count").length)&&$(".module-header:last > span").remove()}}),!1},_initCommonHotKey:function(){if(!Label.userKeyboardShortcutsStatus||"1"===Label.userKeyboardShortcutsStatus)return!1;function n(e){var t=$(".list > ul > li.focus"),a=0===$(".radio-btn").length?0:48;if(1===t.length){if("top"===e||"bottom"===e)return $(window).scrollTop(t.offset().top-a);($(window).height()+$(window).scrollTop()t.offset().top)&&("down"===e?$(window).scrollTop(t.offset().top-($(window).height()-t.outerHeight())):$(window).scrollTop(t.offset().top-a))}}0===$("#articleTitle").length&&$(document).bind("keydown","c",function(e){return Util.prevKey||(window.location=Label.servePath+"/post?type=0"),!1}),$(document).bind("keyup","g",function(){return Util.prevKey="g",setTimeout(function(){Util.prevKey=void 0},1e3),!1}).bind("keyup","s",function(){return $("#search").focus(),!1}).bind("keyup","t",function(){return void 0===Util.prevKey&&Util.goTop(),!1}).bind("keyup","n",function(e){return"g"===Util.prevKey&&(window.location=Label.servePath+"/notifications"),!1}).bind("keyup","h",function(e){return"g"===Util.prevKey&&(window.location=Label.servePath+"/hot"),!1}).bind("keyup","i",function(e){return"g"===Util.prevKey&&(window.location=Label.servePath),!1}).bind("keyup","r",function(e){return"g"===Util.prevKey&&(window.location=Label.servePath+"/recent"),!1}).bind("keyup","p",function(e){return"g"===Util.prevKey&&(window.location=Label.servePath+"/perfect"),!1}).bind("keyup","Shift+/",function(e){return window.open(Label.servePath+"/article/1631459254239"),!1}).bind("keyup","j",function(e){var t=".content .list:last > ul > ",a=(1===$("#comments").length&&(t="#comments .list > ul > "),$(t+"li.focus"));return 0===a.length?$(t+"li:first").addClass("focus"):1===a.next().length&&(a.next().addClass("focus"),a.removeClass("focus")),n("down"),!1}).bind("keyup","k",function(e){var t=".content .list:last > ul > ",a=(1===$("#comments").length&&(t="#comments .list > ul > "),$(t+"li.focus"));return 0===a.length?$(t+"li:last").addClass("focus"):1===a.prev().length&&(a.prev().addClass("focus"),a.removeClass("focus")),n("up"),!1}).bind("keyup","f",function(e){var t=".content .list:last > ul > ";return 1===$("#comments").length&&(t="#comments .list > ul > "),$(t+"li.focus").removeClass("focus"),$(t+"li:first").addClass("focus"),n("top"),!1}).bind("keyup","l",function(e){var t;return Util.prevKey||(t=".content .list:last > ul > ",1===$("#comments").length&&(t="#comments .list > ul > "),$(t+"li.focus").removeClass("focus"),$(t+"li:last").addClass("focus"),n("bottom")),!1}).bind("keyup","o",function(e){var t;return 1!==$("#comments").length&&(t=(t=(t=$(".content .list:last > ul > li.focus > h2 > a").attr("href"))||$(".content .list:last > ul > li.focus .fn-flex-1 > h2 > a").attr("href"))||$(".content .list:last > ul > li.focus h2.fn-flex-1 > a").attr("href"))&&(window.location=t),!1}).bind("keyup","return",function(e){var t;return 1!==$("#comments").length&&(t=(t=(t=$(".content .list:last > ul > li.focus > h2 > a").attr("href"))||$(".content .list:last > ul > li.focus .fn-flex-1 > h2 > a").attr("href"))||$(".content .list:last > ul > li.focus h2.fn-flex-1 > a").attr("href"))&&(window.location=t),!1})},notifyMsg:function(t){if(!("Notification"in window))return!1;function a(e){(e=new Notification(Label.visionLabel,{body:Label.desktopNotificationTemplateLabel.replace("${count}",e),icon:Label.staticServePath+"/images/faviconH.png"})).onclick=e.onerror=function(){window.location=Label.servePath+"/notifications"}}"granted"===Notification.permission?a(t):"denied"!==Notification.permission&&Notification.requestPermission(function(e){"granted"===e&&a(t)})},processClipBoard:function(e,n){var t,a;return""===e.getData("text/html")&&2===e.items.length?"":(t=!1,e=toMarkdown(e.getData("text/html"),{converters:[{filter:"img",replacement:function(e,t){var a;return 1===t.attributes.length?"":(a={url:t.src},$.ajax({url:Label.servePath+"/fetch-upload",type:"POST",data:JSON.stringify(a),cache:!1,success:function(e,t){var a;0===e.code&&(a=(a=n.getValue()).replace(e.originalURL,e.url),n.setValue(a))}}),"![]("+t.src+")")}},{filter:["pre","code"],replacement:function(e){return 1With ♥ from '}},[{source:function(e,a){n.search(e,{hitsPerPage:20},function(e,t){e?a([]):a(t.hits,t)})},displayKey:"name",templates:{suggestion:function(e){return e._highlightResult.articleTitle.value}}}]).on("autocomplete:selected",function(e,t,a){window.open(Label.servePath+"/article/"+t.oId)}).bind("keyup","esc",function(){$(this).blur()})},newVditor:function(e){Label.emoji||$.ajax({url:Label.servePath+"/users/emotions",type:"GET",cache:!0,async:!1,success:function(e){Label.emoji={},e.data.forEach(function(e){var t=Object.keys(e)[0];Label.emoji[t]=e[t]})}});var t={outline:e.outline||{enable:!1},after:e.after||void 0,typewriterMode:e.typewriterMode||!1,cache:{enable:e.cache||!1},input:e.input,preview:{delay:500,mode:e.preview.mode,url:Label.servePath+"/markdown",parse:function(e){"none"!==e.style.display&&Util.LazyLoadImage()},hljs:{enable:!Label.luteAvailable}},upload:{max:Label.fileMaxSize,url:Label.servePath+"/upload",filename:function(e){return e.replace(/\?|\\|\/|:|\||<|>|\*|\[|\]|\s+/g,"-")},accept:".zip,.rar,.7z,.tar,.gzip,.bz2,.jar,.jpg,.jpeg,.png,.gif,.webp,.webm,.bmp,.mp3,.mp4,.wav,.mov,.weba,.mkv"},placeholder:e.placeholder,height:e.height,counter:{enable:!!e.counter,max:e.counter},resize:{enable:e.resize.enable,position:e.resize.position},lang:Label.langLabel,hint:{parse:!1,emojiTail:'设置常用表情',emoji:Label.emoji,extend:[{key:"@",hint:function(a){var n=[];return $.ajax({url:Label.servePath+"/users/names",type:"POST",async:!1,data:JSON.stringify({name:a}),success:function(e){if(0===e.code){for(var t=0;t'+e.data[t].userName});""===a&&n.push({html:' 参与者',value:"@participants "})}else alert(e.msg)}}),n}}]},esc:e.esc,ctrlEnter:e.ctrlEnter};return $(window).width()<768?(t.toolbar=["emoji","link","upload","edit-mode",{name:"more",toolbar:["insert-after","fullscreen","preview","info","help"]}],t.resize.enable=!1):e.toolbar&&(t.toolbar=e.toolbar),new Vditor(e.id,t)},setUnreadNotificationCount:function(r){$.ajax({url:Label.servePath+"/notifications/unread/count",type:"GET",cache:!1,success:function(e,t){function a(e){var t="",a='';return 0'+Label.notificationCommentedLabel+' '+e.unreadCommentedNotificationCnt+""+a.replace("${markReadType}","commented")+""),0'+Label.notificationReplyLabel+' '+e.unreadReplyNotificationCnt+""+a.replace("${markReadType}","reply")+""),0'+Label.notificationAtLabel+' '+e.unreadAtNotificationCnt+""+a.replace("${markReadType}","at")+""),0'+Label.notificationFollowingLabel+' '+e.unreadFollowingNotificationCnt+""+a.replace("${markReadType}","following")+""),0'+Label.pointLabel+' '+e.unreadPointNotificationCnt+""),0'+Label.sameCityLabel+' '+e.unreadBroadcastNotificationCnt+""),0'+Label.systemLabel+' '+e.unreadSysAnnounceNotificationCnt+""),0'+Label.newFollowerLabel+' '+e.unreadNewFollowerNotificationCnt+""),t}var n=e.unreadNotificationCnt;if($.ua.set(navigator.userAgent),$.ua.device.type&&"mobile"===$.ua.device.type){if(0
        '+i+"
      "),$("#aNotifications").click(function(){$("#notificationsPanel").slideToggle()})}else window.localStorage.hadNotificate="false",$("#aNotifications").removeClass("msg").addClass("no-msg").text(n).attr("href",Label.servePath+"/notifications");return!1}var o='  ';if(0
        '+i+"
      "),$("#aNotifications").click(function(e){e=window.innerWidth-e.pageX-$("#notificationsPanel").width()/2;console.log(e),$("#notificationsPanel").css("right",e+"px"),$("#notificationsPanel").show()}),$("body").click(function(e){"aNotifications"!==e.target.id&&"notificationsPanel"!==$(e.target).closest(".module").attr("id")&&$("#notificationsPanel").hide()})}else window.localStorage.hadNotificate="false",$("#notificationsPanel").remove(),$("#aNotifications").removeClass("msg").addClass("no-msg tooltipped tooltipped-w").html(o+n).attr("href",Label.servePath+"/notifications")}})},follow:function(a,n,i,o){var e;return Label.isLoggedIn?!$(a).hasClass("disabled")&&(e={followingId:n},$(a).addClass("disabled"),void $.ajax({url:Label.servePath+"/follow/"+i,type:"POST",cache:!1,data:JSON.stringify(e),success:function(e,t){0===e.code&&($(a).removeClass("disabled"),void 0!==o?"article"===i||"tag"===i?$(a).html(' '+(o+1)).attr("onclick","Util.unfollow(this, '"+n+"', '"+i+"', "+(o+1)+")").attr("aria-label",Label.uncollectLabel).addClass("ft-red"):"article-watch"===i&&$(a).html(' '+(o+1)).attr("onclick","Util.unfollow(this, '"+n+"', '"+i+"', "+(o+1)+")").attr("aria-label",Label.unfollowLabel).addClass("ft-red"):$(a).attr("onclick","Util.unfollow(this, '"+n+"', '"+i+"')").text("article"===i?Label.uncollectLabel:Label.unfollowLabel))},complete:function(){$(a).removeClass("disabled")}})):(Util.needLogin(),!1)},unfollow:function(a,n,i,o){if($(a).hasClass("disabled"))return!1;var e={followingId:n};$(a).addClass("disabled"),$.ajax({url:Label.servePath+"/unfollow/"+i,type:"POST",cache:!1,data:JSON.stringify(e),success:function(e,t){0===e.code&&(void 0!==o?"article"===i||"tag"===i?$(a).removeClass("ft-red").html(' '+(o-1)).attr("onclick","Util.follow(this, '"+n+"', '"+i+"',"+(o-1)+")").attr("aria-label",Label.collectLabel):"article-watch"===i&&$(a).removeClass("ft-red").html(' '+(o-1)).attr("onclick","Util.follow(this, '"+n+"', '"+i+"',"+(o-1)+")").attr("aria-label",Label.followLabel):$(a).attr("onclick","Util.follow(this, '"+n+"', '"+i+"')").text("article"===i?Label.collectLabel:Label.followLabel))},complete:function(){$(a).removeClass("disabled")}})},goTop:function(){$("html, body").animate({scrollTop:0},800)},goLogin:function(){var e;-1===location.href.indexOf("/login")&&(e=location.href,0===location.search.indexOf("?goto")&&(e=location.href.replace(location.search,"")),window.location.href=Label.servePath+"/login?goto="+encodeURIComponent(e))},needLogin:function(){Util.goLogin()},goRegister:function(){var e;-1===location.href.indexOf("/register")&&(e=location.href,0===location.search.indexOf("?goto")&&(e=location.href.replace(location.search,"")),window.location.href=Label.servePath+"/register?goto="+encodeURIComponent(e))},_kill:function(){"IE"===$.ua.browser.name&&parseInt($.ua.browser.version)<10&&$.ajax({url:Label.servePath+"/kill-browser",type:"GET",cache:!1,success:function(e,t){$("body").append(e),$("#killBrowser").dialog({modal:!0,hideFooter:!0,height:345,width:600}),$("#killBrowser").dialog("open")}})},_initActivity:function(t,e){t<=0&&(t=1);let a=0,n=setInterval(()=>{++a>=t&&(a=t,clearInterval(n));var e=20-t/2+"px";$("#activityProcessor .percent-wave-before").css("top",e),$("#activityProcessor .percent-wave-after").css("top",e),$("#activityProcessor .percent").html(parseInt(a)+"%")},10)},_initBreezemoon:function(r,e,t){0!==r.length&&(e.keypress(function(e){13===e.keyCode&&r.click()}),r.click(function(){t?"disabled"!==r.attr("disabled")&&(r.attr("disabled","disabled").css("opacity","0.3"),$.ajax({url:Label.servePath+"/breezemoon",type:"POST",cache:!1,headers:{csrfToken:$(this).data("csrf")},data:JSON.stringify({breezemoonContent:e.val()}),success:function(t){if(0===t.code){var a=t.data.breezemoonAuthorName,n=t.data.breezemoonAuthorThumbnailURL48,i=t.data.breezemoonContent,o=t.data.oId;let e=r.parent().parent().find(".module-list");e.prepend('
    • \n\n\n\n'+i+"\n
    • "),r.parent().find("input").val(""),e.find("li:last").fadeOut(199,function(){e.find("li:last").remove()}),e.find("li:first").slideDown(200),Util.listenUserCard()}else Util.alert(t.msg)},complete:function(){r.css("opacity",1).removeAttr("disabled")}})):Util.goLogin()}))},init:function(e){if($.ua.set(navigator.userAgent),"mobile"!==$.ua.device.type&&($("body").append(''),Util.listenUserCard()),this._kill(),this._initNav(),1===$(".pagination select").length&&$(".pagination select").change(function(){var e=$(this).data("url")+"?p="+$(this).val();$(this).data("param")&&(e+="&"+$(this).data("param")),window.location.href=e}),$(".nav input.search").focus(function(){$(".nav .tags").css("visibility","hidden")}).blur(function(){$(".nav .tags").css("visibility","visible")}),$(window).scroll(function(){20<$(window).scrollTop()&&0===$(".radio-btn").length?$(".go-top").show():$(".go-top").hide()}),Util.parseMarkdown(),Util.parseHljs(),e&&(window.localStorage.hadNotificate||(window.localStorage.hadNotificate="false"),Util.setUnreadNotificationCount(!0)),$(window).keyup(function(e){27===e.keyCode&&Util.closeAlert()}),this._initBreezemoon($("#breezemoonPostBtn"),$("#breezemoonInput"),e),this._initCommonHotKey(),e)return!1;$("body").click(function(e){0===$(e.target).closest(".nav .form").length&&$(".nav .form").hide()})},userCardCache:new Map,listenUserCard:function(){var a=!1;$(".avatar, .avatar-small, .avatar-middle, .avatar-mid, .avatar-big, .name-at").unbind(),$(".avatar, .avatar-small, .avatar-middle, .avatar-mid, .avatar-big, .name-at").hover(function(){if(void 0!==$(this).attr("aria-label")){let t=$(this).attr("aria-label"),a;Util.userCardCache.has(t)?a=Util.userCardCache.get(t):$.ajax({url:Label.servePath+"/user/"+t,type:"GET",cache:!1,async:!1,headers:{csrfToken:Label.csrfToken},success:function(e){a=e,Util.userCardCache.set(t,a)}}),console.log(a);a.followerCount,a.followingUserCount;var o=a.oId,r=(a.onlineMinute,a.userAvatarURL210),l=a.userCity,s=a.userIntro,c=a.userName,d=a.userNickname,u=a.userOnlineFlag,f=a.userPoint,g=a.userURL,h=a.userRole,p=a.cardBg,v=a.canFollow,m=a.userNo,b=a.userAppRole,w=JSON.parse(a.sysMetal);let n='
      \n
      \n \n
      \n
      \n
      \n
      \n '+d+'\n '+c+"\n";n+="
      \n",""!==s?n+='
      \n '+s+"\n
      \n":"0"===b?n+='
      摸鱼派 '+m+" 号成员,黑客
      \n":"1"===b&&(n+='
      摸鱼派 '+m+" 号成员,画家
      \n");var y=w.list;if(void 0!==y&&0!==y.length){n+='
      ';for(let e=0;e"}n+="
      "}switch(n+='
      \n \n"+(!0===u?'在线':'离线'))+('
      \n \n 私信\n \n'),"yes"===v?n+='":"no"===v&&(n+='"),n+="
      \n
      \n
      \n
      \n
      ",$("#userCard").html(n),""!==p&&($("#userCardContent").addClass("user-card--bg"),$("#userCardContent").css("background-image","url("+p+")"),$("#userCardContent > div").attr("style","background-image: linear-gradient(90deg, rgba(214, 227, 235, 0.36), rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.76));"),$("#userCardContent > div > a > div").css("width","105px"),$("#userCardContent > div > a > div").css("height","105px"),$("#userCardContent > div > a > div").css("top","80px"));let e=$(this).offset().left,i=((e+=30)+350>$(document.body).width()&&(e-=350),$("#userCard").css("left",e),$(this).offset().top-110);i<45&&(i=$(this).offset().top+45),$("#userCard").css("top",i+"px"),$("#userCard").show()}},function(t){setTimeout(function(){var e=$(t.toElement);0!==$(e).parents("#userCard").length||a||$("#userCard").hide()},50)}),$("#userCard").unbind(),$("#userCard").hover(function(){a=!0},function(){a=!1,$("#userCard").hide()})},initUserChannel:function(e){e=new WebSocket(e);e.onopen=function(){console.log("Connected to user channel websocket.")},e.onmessage=function(e){var t,a,n=JSON.parse(e.data);switch(n.command){case"refreshNotification":"/cr"===window.location.pathname?(Util.makeNotificationRead("at"),Util.setUnreadNotificationCount(!0)):(Util.setUnreadNotificationCount(!0),0!==n.count&&Util.notice("default",3e3,"你有新的通知!点击查看"));break;case"chatUnreadCountRefresh":0===n.count&&Util.pauseBling(),$("#aChatCount").text(n.count);break;case"newIdleChatMessage":$("#aChatCount").text(parseInt($("#aChatCount").text())+1),"/chat"!==window.location.pathname?(Util.blingChat(),Util.notice("warning",3e3,"叮咚!"+n.senderUserName+" 向你发送了一条私信。点击查看")):(i=n.preview.substring(0,10),o=10.dialog-header-bg {border-radius: 4px 4px 0px 0px; background-color: rgb(151,49,210); color: rgb(255, 255, 255);}.dialog-main {height: 170px;overflow: auto;}
      \n
      \n

      摸鱼派社区紧急公告


      '+i+"

      ——紧急公告发布人:"+o+"
      \n","紧急公告"),Util.alert(i),$(".dialog-background").attr("onclick","")}},e.onclose=function(){console.log("Disconnected to user channel websocket.")},e.onerror=function(e){console.log("ERROR",e)}},blingChat:function(){$("#aChat").removeClass("no-msg").addClass("msg"),Util.isBlinging||(Util.isBlinging=!0,bling=setInterval(function(){$("#aChat").removeClass("no-msg").addClass("msg"),setTimeout(function(){$("#aChat").removeClass("msg").addClass("no-msg")},1e3)},2e3))},pauseBling:function(){$("#aChat").removeClass("msg").addClass("no-msg"),Util.isBlinging&&(Util.isBlinging=!1,clearInterval(bling))},_initNav:function(){var e=location.href;$(".user-nav > a").each(function(){0===e.indexOf($(this).attr("href"))?$(this).addClass("current"):"/register"===location.pathname?$(".user-nav a:last").addClass("current"):"/login"===location.pathname?$(".user-nav a:first").addClass("current"):0!==e.indexOf(Label.servePath+"/settings")&&0!==e.indexOf($("#aPersonListPanel").data("url"))||$("#aPersonListPanel").addClass("current")}),$(".nav .avatar-small").parent().click(function(){$("#personListPanel").show()}),$("body").click(function(e){"aPersonListPanel"!==$(e.target).closest("a").attr("id")&&"personListPanel"!==$(e.target).closest(".module").attr("id")&&$("#personListPanel").hide()})},logout:function(){window.localStorage&&(window.localStorage.clear(),window.localStorage.hadNotificate="false"),window.location.href=Label.servePath+"/logout?goto="+Label.servePath},startsWith:function(e,t){return e.match("^"+t)==t},mouseClickEffects:function(){var o=0;jQuery(document).ready(function(i){i("html").click(function(e){var t,a=18,n=(10==++o?t=i("").text("OωO"):20===o?t=i("").text("(๑•́ ∀ •̀๑)"):30===o?t=i("").text("(๑•́ ₃ •̀๑)"):40===o?t=i("").text("(๑•̀_•́๑)"):50===o?t=i("").text("( ̄へ ̄)"):60===o?t=i("").text("(╯°口°)╯(┴—┴"):70===o?t=i("").text("૮( ᵒ̌皿ᵒ̌ )ა"):80===o?t=i("").text("╮(。>口<。)╭"):90===o?t=i("").text("( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃"):100<=o&&o<=105?t=i("").text("(ꐦ°᷄д°᷅)"):(t=i(''),a=Math.round(14*Math.random()+6)),e.pageX),e=e.pageY;t.css({"z-index":9999,top:e-20,left:n,position:"absolute",color:"#E94F06","font-size":a,"-moz-user-select":"none","-webkit-user-select":"none","-ms-user-select":"none"}),i("body").append(t),t.animate({top:e-180,opacity:0},1500,function(){t.remove()})})})},notice:function(e,t,a,n){void 0!==n?$.tooltips(a,{type:e,duration:t,callback:n}):$.tooltips(a,{type:e,duration:t})}},Validate={goValidate:function(e){for(var t="
        ",a=0;a"+e.data[a].msg+"");return"
          "===t?(e.target.html(""),e.target.removeClass("error"),!0):(e.target.html(t+"
        "),e.target.addClass("error"),!1)},validate:function(e){var t=!0,a="",a="editor"===e.type?e.target.getValue():"imgSrc"===e.type?e.target.attr("src"):"imgStyle"===e.type?e.target.data("imageurl"):e.target.val().toString().replace(/(^\s*)|(\s*$)/g,"");switch(e.type){case"email":/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(e.target.val())||(t=!1);break;case"password":!(e.target.val().length<6||16=(e.min||0)}return t}},Label={},pngMagic=[137,80,78,71,13,10,26,10],jpeg_jfif=[74,70,73,70],jpeg_exif=[69,120,105,102],jpegMagic=[255,216,255,224],gifMagic0=[71,73,70,56,55,97],getGifMagic1=[71,73,70,56,57,97],wavMagic1=[82,73,70,70],wavMagic2=[87,65,86,69];function arraycopy(e,t,a,n,o){for(i=0;isuccess(): Unable to detect window audio context, cannot continue.")},function(e){console.log("getUserMedia->failure(): ERROR: Microphone access request failed!");switch(e.name){case"PermissionDeniedError":Label.recordDeniedLabel;break;case"DevicesNotFoundError":Label.recordDeviceNotFoundLabel;break;default:e.name}})):console.log("ERROR: getUserMedia not supported by browser.")},handleStartRecording:function(){Audio.recorderObj.startRecordingNewWavFile()},handleStopRecording:function(){Audio.recorderObj.stopRecording(),Audio.wavFileBlob=Audio.recorderObj.buildWavFileBlob()}};function Rotate(n){let i=!1,o=!1;this.submit=function(){if(!o){o=!0;let e=0,t,a;void 0===a&&(null!==(t=document.getElementById(n).getAttribute("style"))&&void 0!==t&&""!==t?t.endsWith(";")||(t+=";"):t="",a=setInterval(function(){360<(e+=5)&&(e=0),document.getElementById(n).setAttribute("style",t+"-webkit-transform: rotate("+e+"deg);"),0===e&&i&&(clearInterval(a),document.getElementById(n).setAttribute("style",t),o=!1)},15))}},this.stop=function(){i=!0},String.prototype.endWith=function(e){var t=this.length-e.length;return 0<=t&&this.lastIndexOf(e)===t}} \ No newline at end of file diff --git a/src/main/resources/js/symbol-defs.min.js b/src/main/resources/js/symbol-defs.min.js index 33134ac5..627401d8 100644 --- a/src/main/resources/js/symbol-defs.min.js +++ b/src/main/resources/js/symbol-defs.min.js @@ -1 +1 @@ -var svg='',svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg+='')+' fishpi '+' 摸鱼派-cn ')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'';document.body.insertAdjacentHTML("afterBegin",svg+""); \ No newline at end of file +var svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg=(svg='')+''+' fishpi ')+' 摸鱼派-cn '+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'')+''+'';document.body.insertAdjacentHTML("afterBegin",svg+""); \ No newline at end of file diff --git a/src/main/resources/scss/index.scss b/src/main/resources/scss/index.scss index f0a5c20d..8e431dc9 100644 --- a/src/main/resources/scss/index.scss +++ b/src/main/resources/scss/index.scss @@ -2150,7 +2150,7 @@ code .dec { animation-name: scale-in; -webkit-animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5); animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5); - width: 360px; + width: 400px; box-shadow: 0 3px 12px rgba(27, 31, 35, 0.15); background-color: var(--layer-background-color); min-height: 50px;