PageSourceSearch

https://disue.com/themes/theme-Joe3/assets/js/min/post.min.js?v=1.4.0

js disue.com collected 2026-10-06 13:15:10 UTC 7,549 bytes, 1 lines download raw bytes

1!function(){"use strict";const e={limited:!1,initCopy(){if("false"===PageAttrs.metas_enable_copy||!ThemeConfig.enable_copy)return;const e=location.href,t=$(".joe_detail").attr("data-author"),o=$(".joe_detail .joe_detail__title").text(),i=$("html head meta[name=description]").attr("content");$(".joe_detail__article").on("copy",(function(a){const n=window.getSelection(),l=n.toString().replace(/<已自动折叠>/g,""),s=(ThemeConfig.enable_copy_right_text?ThemeConfig.copy_right_text||`\r\n\r\n====================================\r\n文章作者: ${t}\r\n文章来源: ${ThemeConfig.blog_title}(${ThemeConfig.blog_url})\r\n文章标题: ${o}\r\n文章链接: ${e}\r\n版权声明: 内容遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。`:"").replace(/{postUrl}/g,e).replace(/{postTitle}/g,o).replace(/{postAuthor}/g,t).replace(/{BlogTitle}/g,ThemeConfig.blog_title).replace(/{BlogUrl}/g,ThemeConfig.blog_url).replace(/{postDescription}/g,i);if(window.clipboardData){const e=l+s;return window.clipboardData.setData("Text",e),!1}{const e=document.body,t=l+s,o=document.createElement("pre");o.style.position="absolute",o.style.left="-99999px",e.appendChild(o),o.innerText=t,n.selectAllChildren(o),setTimeout((function(){e.removeChild(o)}),0)}}))},initShare(){"false"!==PageAttrs.metas_enable_share&&ThemeConfig.enable_share&&(ThemeConfig.enable_share_link&&$(".icon-share-link").length&&$(".icon-share-link").each(((e,t)=>{const o=$(t)[0],i=o.dataset.postTitle,a=o.dataset.postDescription,n=o.dataset.postAuthor,l=o.dataset.template;let s=window.location.href;l&&(s=l.replace(/{postUrl}/g,location.href).replace(/{postTitle}/g,i).replace(/{postAuthor}/g,n).replace(/{postDescription}/g,a).replace(/{BlogTitle}/g,ThemeConfig.blog_title).replace(/{BlogUrl}/g,ThemeConfig.blog_url),/{postUrl}/.test(l)||(s+=` ,文章链接: ${location.href}`)),new ClipboardJS(o,{text:()=>s}).on("success",(()=>Qmsg.success("文章链接已复制")))})),ThemeConfig.enable_share_weixin&&$(".qrcode_wx").length&&$(".qrcode_wx").qrcode({width:140,height:140,render:"canvas",typeNumber:-1,correctLevel:0,background:"#ffffff",foreground:"#000000",text:location.href}))},initLike(){if("false"===PageAttrs.metas_enable_like||!ThemeConfig.enable_like||!$(".joe_detail__agree").length)return;const e=$(".joe_detail").attr("data-cid"),t=+($(".joe_detail").attr("data-clikes")||0);let o=localStorage.getItem(encryption("agree"))?JSON.parse(decrypt(localStorage.getItem(encryption("agree")))):[],i=o.includes(e);const a=$(".joe_detail__agree, .post-operate-like"),n=a.find(".icon-like"),l=a.find(".icon-unlike"),s=a.find(".nums");i?l.addClass("active"):n.addClass("active"),s.html(t);let r=!1;n.on("click",(function(c){c.stopPropagation(),r||(r=!0,o=localStorage.getItem(encryption("agree"))?JSON.parse(decrypt(localStorage.getItem(encryption("agree")))):[],i=o.includes(e),$.ajax({url:"/apis/api.halo.run/v1alpha1/trackers/upvote",type:"post",contentType:"application/json; charset=utf-8",data:JSON.stringify({group:"content.halo.run",plural:"posts",name:e})}).then((r=>{let c=t;if(i){c--;const t=o.findIndex((t=>t===e));o.splice(t,1),l.removeClass("active"),n.addClass("active"),a.removeClass("active")}else c++,o.push(e),n.removeClass("active"),l.addClass("active"),a.addClass("active");const d=encryption("agree"),h=encryption(JSON.stringify(o));localStorage.setItem(d,h),s.html(c).show()})).catch((e=>{r=!1})))}))},initToc(t){if("false"===PageAttrs.metas_enable_toc||!ThemeConfig.enable_toc||!$(".toc-container").length)return;if("true"===PageAttrs.metas_use_raw_content)return $("#js-toc").html('<div class="toc-nodata">暂不支持解析原始内容目录</div>'),void $(".toc-container").show();if("true"===PageAttrs.metas_enable_read_limit&&!t&&e.limited)return $("#js-toc").html('<div class="toc-nodata">文章内容不完整,目录仅评论后可见</div>'),void $(".toc-container").show();const o=$("html"),i=$(".joe_header__mask"),a=$(".joe_action .toc"),n=$(".joe_header__toc"),l=$("#js-toc"),s=$("#js-toc-mobile");tocbot.init({tocSelector:Joe.isMobile?"#js-toc-mobile":"#js-toc",contentSelector:".joe_detail__article",ignoreSelector:".js-toc-ignore",headingSelector:"h1,h2,h3,h4,h5,h6",collapseDepth:+(PageAttrs.metas_toc_depth||ThemeConfig.toc_depth||0),scrollSmooth:!0,includeTitleTags:!0,hasInnerContainers:!1,headingsOffset:80,scrollSmoothOffset:-80,positionFixedSelector:".toc-container",positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",onClick:function(e){Joe.isMobile&&(o.removeClass("disable-scroll"),n.removeClass("active"),i.removeClass("active slideout")),window.tocPhase=!0},scrollEndCallback:function(e){window.tocPhase=null}}),Joe.isMobile?!s.children().length&&s.html('<div class="toc-nodata"><em></em>暂无目录</div>'):!l.children().length&&l.html('<div class="toc-nodata">暂无目录</div>'),Joe.isMobile&&(a.show(),a.on("click",(()=>{window.sessionStorage.setItem("lastScroll",o.scrollTop()),o.addClass("disable-scroll"),i.addClass("active slideout"),n.addClass("active")}))),$(".toc-container").show()},initAsideOperate(){if($(".post-operate-comment").on("click",(function(e){const t=document.querySelector(".joe_comment"),o=document.querySelector(".joe_header");if(!t||!o)return;if(e.stopPropagation(),!Boolean(document.querySelector('[id*="comment-"]'))&&!Boolean(document.querySelector("#waline")))return void Qmsg.warning("评论功能不可用!");const i=t.offsetTop-o.offsetHeight-15;window.scrollTo({top:i})})),Joe.isMobile)return;const e=$(".aside_operations"),t=$(".joe_detail__agree,.joe_detail__operate-share,.joe_detail__operate .joe_donate"),o=o=>{$(".joe_post")[0].getBoundingClientRect().left<75?(e.hide(),t.show()):(e.show(),t.hide())};o(),window.addEventListener("resize",Utils.throttle(o),500)},initProgress(){if(!ThemeConfig.enable_progress_bar)return;$(window).off("scroll");const e=$(".joe_progress_bar");let t,o,i;$(window).on("scroll",(function(a){a.stopPropagation(),t=$(window).height(),o=$("body").height(),i=o-t,window.requestAnimationFrame((function(){const t=Math.max(0,Math.min(1,$(window).scrollTop()/i));var o;o=t,e.css("width",100*o+"%")}))}
1))},initVideo(){if($(".joe_detail__article-video").length){const e=$(".joe_detail__article-video .play iframe").attr("data-player");$(".joe_detail__article-video .episodes .item").on("click",(function(t){t.stopPropagation(),$(this).addClass("active").siblings().removeClass("active");const o=$(this).attr("data-src");$(".joe_detail__article-video .play iframe").attr({src:e+o})})),$(".joe_detail__article-video .episodes .item").first().click()}},async jumpToComment(){if(ThemeConfig.enable_clean_mode||!ThemeConfig.enable_comment||"false"===PageAttrs.metas_enable_comment)return;const{cid:e="",p:t=""}=Utils.getUrlParams();if(e){await Utils.sleep(1e3);try{const o=document.getElementsByTagName("halo-comment");if(!o)return;const i=$(o[0].shadowRoot.getElementById("halo-comment")).find("#comment-"+e);if(!i)return;const a=i.offset().top-50;window.scrollTo({top:a});const n=i.find(".markdown-content").eq(0);n.addClass("blink"),await Utils.sleep(2e3),n.removeClass("blink"),window.history.replaceState(null,null,t?`?p=${t}`:location.origin+location.pathname),tocbot.refresh()}catch(e){console.info(e)}}}};!function(){const t=["jumpToComment"];document.addEventListener("DOMContentLoaded",(function(){Object.keys(e).forEach((o=>!t.includes(o)&&"function"==typeof e[o]&&e[o]()))})),window.addEventListener("load",(function(){1===t.length?e[t[0]]():t.forEach((t=>"loadingBar"!==t&&e[t]&&e[t]()))}))}()}();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.