-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathapp-min.js
1 lines (1 loc) · 2.27 KB
/
app-min.js
1
!function(e,t){function o(){$("a.tag").mouseenter(a).mouseleave(n),d(),e._hmt=e._hmt||[]}function a(){i($("a[data-toggle=feedback]"),"007"),p=!0;var e=$(this),t=e.data("des"),o=e.data("index"),a=(e.height(),e.position().top);clearTimeout(s),c&&c.get(0)!=e.get(0)&&i(c,o),c=e;var n=a-$(document.body).scrollTop()-l>0?"top":"bottom";console.log(n),e.popover({placement:n,title:"详情",html:!0,container:document.body,content:'<p style="width:400px">'+t+'</p><div id="temp'+o+'" style="width:400px;height:400px;">loading...</div>',trigger:"manual"});var d=e.data("popover").tip();d.one("mouseenter",function(){clearTimeout(s)}).one("mouseleave",function(){i(e,o)}),e.popover("show"),$("#temp"+o).replaceWith(r(o))}function n(){var e=$(this);clearTimeout(s),s=setTimeout(function(){var t=e.data("index");i(e,t)},250)}function i(e,t){clearTimeout(s);try{var o=e.data("popover").tip(),a=$("iframe",o);$(document.body).append(a),a.hide(),e.popover("hide")}catch(n){}}function d(){var e=$("a[data-toggle=feedback]");e.popover({placement:"bottom",title:"反馈",html:!0,content:'<div id="temp007">loading...</div>',trigger:"click"}),e.on("click",function(){p?$("#temp007").replaceWith(r("007")):i(e,"007"),p=!p})}function r(e){var t=$("#iframe"+e);if(0!=t.length)return t.show(),t.get(0);t=document.createElement("IFRAME");var o=["<head></head>","<body>","<style>body{overflow:auto}</style>",'<div class="ds-thread" data-url="http://123.jser.us" data-thread-key="{id}"></div>','<script type="text/javascript">',' var duoshuoQuery = {short_name:"123jser"};'," (function() {",' var ds = document.createElement("script");',' ds.type = "text/javascript";ds.async = true;',' ds.src = "http://static.duoshuo.com/embed.js";',' ds.charset = "UTF-8";',' (document.getElementsByTagName("head")[0] ',' || document.getElementsByTagName("body")[0]).appendChild(ds);'," })();","</script>","</body>"].join("");return t.id="iframe"+e,t.style.display="none",t.frameborder=0,t.marginwidth=0,t.allowTransparency=!0,t.marginheight=0,t.style.border=0,t.style.width="400px",t.style.height="400px",document.body.appendChild(t),$(t).on("load",function(){var a=t.contentDocument||t.contentWindow.document;a.write(o.replace(/\{id\}/g,e)),$(this).show()}),t}var c,s,p=!0,l=450;$(function(){o()})}(window);