-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
14 changed files
with
152 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{% if theme.application_insights %} | ||
<script> | ||
var appInsights=window.appInsights||function(config){ | ||
function i(config){t[config]=function(){var i=arguments;t.queue.push(function(){t[config].apply(t,i)})}}var t={config:config},u=document,e=window,o="script",s="AuthenticatedUserContext",h="start",c="stop",l="Track",a=l+"Event",v=l+"Page",y=u.createElement(o),r,f;y.src=config.url||"https://az416426.vo.msecnd.net/scripts/a/ai.0.js";u.getElementsByTagName(o)[0].parentNode.appendChild(y);try{t.cookie=u.cookie}catch(p){}for(t.queue=[],t.version="1.0",r=["Event","Exception","Metric","PageView","Trace","Dependency"];r.length;)i("track"+r.pop());return i("set"+s),i("clear"+s),i(h+a),i(c+a),i(h+v),i(c+v),i("flush"),config.disableExceptionTracking||(r="onerror",i("_"+r),f=e[r],e[r]=function(config,i,u,e,o){var s=f&&f(config,i,u,e,o);return s!==!0&&t["_"+r](config,i,u,e,o),s}),t | ||
<script> | ||
var appInsights=window.appInsights||function(config){ | ||
function i(config){t[config]=function(){var i=arguments;t.queue.push(function(){t[config].apply(t,i)})}}var t={config:config},u=document,e=window,o="script",s="AuthenticatedUserContext",h="start",c="stop",l="Track",a=l+"Event",v=l+"Page",y=u.createElement(o),r,f;y.src=config.url||"https://az416426.vo.msecnd.net/scripts/a/ai.0.js";u.getElementsByTagName(o)[0].parentNode.appendChild(y);try{t.cookie=u.cookie}catch(p){}for(t.queue=[],t.version="1.0",r=["Event","Exception","Metric","PageView","Trace","Dependency"];r.length;)i("track"+r.pop());return i("set"+s),i("clear"+s),i(h+a),i(c+a),i(h+v),i(c+v),i("flush"),config.disableExceptionTracking||(r="onerror",i("_"+r),f=e[r],e[r]=function(config,i,u,e,o){var s=f&&f(config,i,u,e,o);return s!==!0&&t["_"+r](config,i,u,e,o),s}),t | ||
}({ | ||
instrumentationKey:"{{ theme.application_insights }}" | ||
instrumentationKey:"{{ theme.application_insights }}" | ||
}); | ||
window.appInsights=appInsights; | ||
appInsights.trackPageView(); | ||
</script> | ||
</script> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
{% if theme.cnzz_siteid %} | ||
|
||
<div style="display: none;"> | ||
<script src="//s95.cnzz.com/z_stat.php?id={{ theme.cnzz_siteid }}&web_id={{ theme.cnzz_siteid }}" language="JavaScript"></script> | ||
<script src="//s95.cnzz.com/z_stat.php?id={{ theme.cnzz_siteid }}&web_id={{ theme.cnzz_siteid }}"></script> | ||
</div> | ||
|
||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
{% if theme.facebook_sdk.enable %} | ||
<script> | ||
window.fbAsyncInit = function() { | ||
FB.init({ | ||
appId : '{{ theme.facebook_sdk.app_id }}', | ||
xfbml : true, | ||
version : 'v2.10' | ||
}); | ||
}; | ||
|
||
(function(d, s, id){ | ||
var js, fjs = d.getElementsByTagName(s)[0]; | ||
if (d.getElementById(id)) {return;} | ||
js = d.createElement(s); js.id = id; | ||
js.src = "//connect.facebook.net/{{ config.language|replace('-', '_') }}/sdk.js"; | ||
fjs.parentNode.insertBefore(js, fjs); | ||
}(document, 'script', 'facebook-jssdk')); | ||
</script> | ||
<script> | ||
window.fbAsyncInit = function() { | ||
FB.init({ | ||
appId : '{{ theme.facebook_sdk.app_id }}', | ||
xfbml : true, | ||
version: 'v2.10' | ||
}); | ||
}; | ||
(function(d, s, id) { | ||
var js, fjs = d.getElementsByTagName(s)[0]; | ||
if (d.getElementById(id)) {return;} | ||
js = d.createElement(s); js.id = id; | ||
js.src = "//connect.facebook.net/{{ config.language|replace('-', '_') }}/sdk.js"; | ||
fjs.parentNode.insertBefore(js, fjs); | ||
}(document, 'script', 'facebook-jssdk')); | ||
</script> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
{% if theme.google_analytics %} | ||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ theme.google_analytics }}"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
|
||
gtag('config', '{{ theme.google_analytics }}'); | ||
</script> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ theme.google_analytics }}"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
gtag('config', '{{ theme.google_analytics }}'); | ||
</script> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{% if theme.growingio_analytics %} | ||
<script type='text/javascript'> | ||
!function(e,t,n,g,i){e[i]=e[i]||function(){(e[i].q=e[i].q||[]).push(arguments)},n=t.createElement("script"),tag=t.getElementsByTagName("script")[0],n.async=1,n.src=('https:'==document.location.protocol?'https://':'http://')+g,tag.parentNode.insertBefore(n,tag)}(window,document,"script","assets.growingio.com/2.1/gio.js","gio"); | ||
!function(e,t,n,g,i){e[i]=e[i]||function(){(e[i].q=e[i].q||[]).push(arguments)},n=t.createElement("script"),tag=t.getElementsByTagName("script")[0],n.async=1,n.src=('https:'==document.location.protocol?'https://':'http://')+g,tag.parentNode.insertBefore(n,tag)}(window,document,"script","assets.growingio.com/2.1/gio.js","gio"); | ||
gio('init','{{theme.growingio_analytics}}', {}); | ||
gio('send'); | ||
gio('send'); | ||
</script> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
{% if theme.tencent_mta %} | ||
<script> | ||
var _mtac = {}; | ||
(function() { | ||
var mta = document.createElement("script"); | ||
mta.src = "https://pingjs.qq.com/h5/stats.js?v2.0.4"; | ||
mta.setAttribute("name", "MTAH5"); | ||
mta.setAttribute("sid", "{{theme.tencent_mta}}"); | ||
|
||
var s = document.getElementsByTagName("script")[0]; | ||
s.parentNode.insertBefore(mta, s); | ||
})(); | ||
</script> | ||
<script> | ||
var _mtac = {}; | ||
(function() { | ||
var mta = document.createElement("script"); | ||
mta.src = "https://pingjs.qq.com/h5/stats.js?v2.0.4"; | ||
mta.setAttribute("name", "MTAH5"); | ||
mta.setAttribute("sid", "{{theme.tencent_mta}}"); | ||
var s = document.getElementsByTagName("script")[0]; | ||
s.parentNode.insertBefore(mta, s); | ||
})(); | ||
</script> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,25 @@ | ||
{% if theme.vkontakte_api.enable %} | ||
<div id="vk_api_transport"></div> | ||
<script> | ||
window.vkAsyncInit = function() { | ||
VK.init({ | ||
apiId: {{ theme.vkontakte_api.app_id }} | ||
}); | ||
|
||
<div id="vk_api_transport"></div> | ||
<script> | ||
window.vkAsyncInit = function() { | ||
VK.init({ | ||
apiId: {{ theme.vkontakte_api.app_id }} | ||
}); | ||
|
||
{% if not is_home() and (is_post() and theme.vkontakte_api.like) %} | ||
VK.Widgets.Like("vk_like", {type: "mini", height: 20}); | ||
{% endif %} | ||
|
||
{% if page.comments and theme.vkontakte_api.comments %} | ||
VK.Widgets.Comments("vk_comments", {limit: {{ theme.vkontakte_api.num_of_posts }}, attach: "*"}); | ||
{% endif %} | ||
}; | ||
setTimeout(function() { | ||
var el = document.createElement("script"); | ||
el.type = "text/javascript"; | ||
el.src = "//vk.com/js/api/openapi.js"; | ||
el.async = true; | ||
document.getElementById("vk_api_transport").appendChild(el); | ||
}, 0); | ||
</script> | ||
{% if not is_home() and (is_post() and theme.vkontakte_api.like) %} | ||
VK.Widgets.Like("vk_like", {type: "mini", height: 20}); | ||
{% endif %} | ||
|
||
{% if page.comments and theme.vkontakte_api.comments %} | ||
VK.Widgets.Comments("vk_comments", {limit: {{ theme.vkontakte_api.num_of_posts }}, attach: "*"}); | ||
{% endif %} | ||
}; | ||
setTimeout(function() { | ||
var el = document.createElement("script"); | ||
el.type = "text/javascript"; | ||
el.src = "//vk.com/js/api/openapi.js"; | ||
el.async = true; | ||
document.getElementById("vk_api_transport").appendChild(el); | ||
}, 0); | ||
</script> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,31 @@ | ||
{% if theme.valine.enable and theme.valine.appid and theme.valine.appkey %} | ||
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script> | ||
{% set leancloud_uri = '//cdn1.lncld.net/static/js/3.11.1/av-min.js' %} | ||
{% set valine_uri = '//unpkg.com/valine/dist/Valine.min.js' %} | ||
{% if theme.vendors.leancloud %} | ||
{% set leancloud_uri = theme.vendors.leancloud %} | ||
{% endif %} | ||
{% if theme.vendors.valine %} | ||
{% set valine_uri = theme.vendors.valine %} | ||
{% endif %} | ||
<script src="{{ leancloud_uri }}"></script> | ||
<script src="{{ valine_uri }}"></script> | ||
|
||
<script> | ||
var GUEST = ['nick','mail','link']; | ||
var guest = '{{ theme.valine.guest_info }}'; | ||
guest = guest.split(',').filter(function (item) { | ||
return GUEST.indexOf(item)>-1; | ||
return GUEST.indexOf(item) > -1; | ||
}); | ||
new Valine({ | ||
el: '#comments' , | ||
verify: {{ theme.valine.verify }}, | ||
notify: {{ theme.valine.notify }}, | ||
appId: '{{ theme.valine.appid }}', | ||
appKey: '{{ theme.valine.appkey }}', | ||
placeholder: '{{ theme.valine.placeholder }}', | ||
avatar:'{{ theme.valine.avatar }}', | ||
meta:guest, | ||
pageSize:'{{ theme.valine.pageSize }}' || 10, | ||
visitor: {{ theme.valine.visitor }} | ||
el: '#comments' , | ||
verify: {{ theme.valine.verify }}, | ||
notify: {{ theme.valine.notify }}, | ||
appId: '{{ theme.valine.appid }}', | ||
appKey: '{{ theme.valine.appkey }}', | ||
placeholder: '{{ theme.valine.placeholder }}', | ||
avatar: '{{ theme.valine.avatar }}', | ||
meta:guest, | ||
pageSize: '{{ theme.valine.pageSize }}' || 10, | ||
visitor: {{ theme.valine.visitor }} | ||
}); | ||
</script> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
<script type="text/x-mathjax-config"> | ||
MathJax.Hub.Config({ | ||
tex2jax: { | ||
inlineMath: [ ['$','$'], ["\\(","\\)"] ], | ||
processEscapes: true, | ||
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'] | ||
}, | ||
TeX: {equationNumbers: { autoNumber: "AMS" }} | ||
}); | ||
MathJax.Hub.Config({ | ||
tex2jax: { | ||
inlineMath: [ ['$','$'], ["\\(","\\)"] ], | ||
processEscapes: true, | ||
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'] | ||
}, | ||
TeX: {equationNumbers: { autoNumber: "AMS" }} | ||
}); | ||
</script> | ||
|
||
<script type="text/x-mathjax-config"> | ||
MathJax.Hub.Queue(function() { | ||
var all = MathJax.Hub.getAllJax(), i; | ||
for (i=0; i < all.length; i += 1) { | ||
all[i].SourceElement().parentNode.className += ' has-jax'; | ||
} | ||
}); | ||
MathJax.Hub.Queue(function() { | ||
var all = MathJax.Hub.getAllJax(), i; | ||
for (i=0; i < all.length; i += 1) { | ||
all[i].SourceElement().parentNode.className += ' has-jax'; | ||
} | ||
}); | ||
</script> | ||
<script src="{{ theme.math.mathjax.cdn }}"></script> | ||
|
||
<style> | ||
.MathJax_Display { | ||
overflow: auto hidden; | ||
overflow: auto hidden; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
{% if theme.rating.enable and (not is_home() and is_post()) %} | ||
<script> | ||
wpac_init = window.wpac_init || []; | ||
wpac_init.push({widget: 'Rating', id: {{ theme.rating.id }}, | ||
el: 'wpac-rating', | ||
color: '{{ theme.rating.color }}' | ||
}); | ||
(function() { | ||
if ('WIDGETPACK_LOADED' in window) return; | ||
WIDGETPACK_LOADED = true; | ||
var mc = document.createElement('script'); | ||
mc.type = 'text/javascript'; | ||
mc.async = true; | ||
mc.src = '//embed.widgetpack.com/widget.js'; | ||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(mc, s.nextSibling); | ||
})(); | ||
wpac_init = window.wpac_init || []; | ||
wpac_init.push({ | ||
widget: 'Rating', | ||
id: {{ theme.rating.id }}, | ||
el: 'wpac-rating', | ||
color: '{{ theme.rating.color }}' | ||
}); | ||
(function() { | ||
if ('WIDGETPACK_LOADED' in window) return; | ||
WIDGETPACK_LOADED = true; | ||
var mc = document.createElement('script'); | ||
mc.type = 'text/javascript'; | ||
mc.async = true; | ||
mc.src = '//embed.widgetpack.com/widget.js'; | ||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(mc, s.nextSibling); | ||
})(); | ||
</script> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
{% if theme.baidu_push %} | ||
<script> | ||
(function(){ | ||
var bp = document.createElement('script'); | ||
var curProtocol = window.location.protocol.split(':')[0]; | ||
if (curProtocol === 'https') { | ||
<script> | ||
(function(){ | ||
var bp = document.createElement('script'); | ||
var curProtocol = window.location.protocol.split(':')[0]; | ||
if (curProtocol === 'https') { | ||
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; | ||
} | ||
else { | ||
} | ||
else { | ||
bp.src = 'http://push.zhanzhang.baidu.com/push.js'; | ||
} | ||
var s = document.getElementsByTagName("script")[0]; | ||
s.parentNode.insertBefore(bp, s); | ||
})(); | ||
</script> | ||
} | ||
var s = document.getElementsByTagName("script")[0]; | ||
s.parentNode.insertBefore(bp, s); | ||
})(); | ||
</script> | ||
{% endif %} |
Oops, something went wrong.