From 6c769aee690215318b9aa2f75e7386fff8b426d6 Mon Sep 17 00:00:00 2001 From: eshengsky Date: Thu, 20 Jun 2019 12:10:35 +0800 Subject: [PATCH] gulp minify --- public/dist/js/index.js | 2 +- public/dist/js/prehandler.js | 1 + public/dist/js/sw.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 public/dist/js/prehandler.js create mode 100644 public/dist/js/sw.js diff --git a/public/dist/js/index.js b/public/dist/js/index.js index 0621059..05bf9f2 100644 --- a/public/dist/js/index.js +++ b/public/dist/js/index.js @@ -1 +1 @@ -"use strict";var pageCount,home_loading_timeout=2e3,isLoading=!1,timeout=1e3,contentTimeout=1500,begin=new Date,contentBegin=new Date,tooltip_timeout=1500;function requestData(){$.ajax({url:$("#filterForm")[0].action,type:$("#filterForm")[0].method,data:$("#filterForm").serialize(),success:function(t){var e=new Date,a=t.posts;(pageCount=t.pageCount,timeout'+e.text+"")}),$(".post-modal .modal-body").mCustomScrollbar("scrollTo","top",{scrollInertia:0}),$(".post-content div").fadeIn(),$(".post-content pre").each(function(t,e){a.ContentType||$(e).html($("").html($(e).html())),hljs.highlightBlock($(e).children("code")[0])})}function closeModal(){$(".post-modal").css("right","-1200px"),$(".post-cover").fadeOut(),$("body").removeClass("modal-open")}function resetModal(){$(".post-modal .modal-header h4").empty(),$(".post-content div").empty(),$("#label-foot").empty()}$(function(){$(".my-nav-pills li:eq(0)").addClass("active").siblings().removeClass("active"),$("#load-list").show(),$("#PageIndex").val(1),requestData(),$(".category-list").mCustomScrollbar({axis:"y",theme:"dark-3"}),$(window).scroll(function(){$("[data-toggle='tooltip']").tooltip("hide")}),$("[data-toggle='tooltip']").tooltip({container:"body"}),$(document).on({click:function(){$(this).remove(),begin=new Date,$("#load-list").show(),isLoading=!0,$("#PageIndex").val(parseInt($("#PageIndex").val())+1),requestData()}},"#btn-load"),$(document).on({click:function(){var t=$(this).attr("page"),e=$("#page"+t);$("html,body").animate({scrollTop:$(e).offset().top-90},1e3)}},"#page-nav a"),$(document).on({click:function(){var a=$(this);$(".bd_weixin_popup").hide(),$(".bd_weixin_popup_bg").hide(),$(".post-cover").fadeIn(),$("body").addClass("modal-open"),$(".post-modal").css("right",0);var t=$(this).parent().attr("uid");if($("body").data("preview")!==t){resetModal();var e=$(this).siblings("h4").children("a").html();$(".post-modal .modal-header h4").html(e),$("#btnFullMode").attr("href",$(this).next("h4").children("a").attr("href")),$(".post-content div").hide();var o=a.data("preview-data");o?appendContent(o):($(".sk-cube-grid").show(),contentBegin=new Date,$.ajax({url:"/blog/getPreviewContent",type:"Post",data:{alias:t},success:function(t){var e=new Date;(a.data("preview-data",t),contentTimeout'),$.each(t,function(t,e){var a;a="1"==e.Source?'

'+e.Title+'

'+e.CateName+' '+e.PublishDate+'

'+encodeHtml(e.Summary)+'

':'

'+e.Title+'

'+e.CateName+' '+e.PublishDate+'

'+encodeHtml(e.Summary)+'

',$("#page"+o).append(a)}),$("body").append('