2 lines
1.1 KiB
JavaScript
2 lines
1.1 KiB
JavaScript
|
if(location.pathname&&location.pathname.indexOf(".shtml")>-1){let i=function(){for(var o=localStorage.comStyle.split(".")||[],t=0,c=0,a=0,e=o.length;a<e;a++){var n=o[a];n.indexOf("head")>-1&&(t=parseInt(n.split("height:")[1])),n.indexOf("foot")>-1&&(c=parseInt(n.split("height:")[1]))}var s=setInterval(function(){var l=$(".head"),r=$(".foot");if(l&&r&&clearInterval(s),l&&localStorage.comHead){l.css("opacity",1);var h=localStorage.comHead;l.height(t),l.html(h)}if(r&&localStorage.comFoot){var g=localStorage.comFoot;r.height(c),r.html(g)}},10)};var renderCommonContent=i;$("#secoundStyle").html(".content>.head{opacity: 0;}"),window.secondShareHtml=!0,localStorage.comHead&&localStorage.comFoot&&localStorage.comStyle?i():$.ajax({type:"get",url:"/api/disk/getUsingDesign?clientType=1",contentType:"application/json",dataType:"json",success:function(o){if(o.success&&o.data&&o.data.setting){var t=o.data,c=JSON.parse(t.setting),a=c.cssText.replace(/\<style\>/,"");a=a.replace(/\<\/style\>/,"");var e=window.localStorage;e.comStyle=a,e.comHead=t.head,e.comFoot=t.foot,i()}},error:function(o){console.log(o.message)}})}
|