diff options
author | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2017-09-10 22:24:26 +0800 |
---|---|---|
committer | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2017-09-10 22:24:26 +0800 |
commit | 9347a9d2f4c5225dc486f0c64fdf702725fba227 (patch) | |
tree | a4b667f0ab6e59ee1718327667a112cdb3c0e440 | |
parent | d60bfcc49a4f29c506852317cfb44f3fca6bbaf8 (diff) |
fix: changyan was blocked in https
mixed content: change 'http' to 'https'
Fixes #2
-rw-r--r-- | layouts/partials/comments.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index fea1a33..8728c17 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -28,7 +28,7 @@ var appid = '{{ .Site.Params.changyanAppid }}'; var conf = '{{ .Site.Params.changyanAppkey }}'; var width = window.innerWidth || document.documentElement.clientWidth; - if (width < 960) {window.document.write('<script async id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="http://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>'); } else { var loadJs=function(d,a){var c=document.getElementsByTagName("head")[0]||document.head||document.documentElement;var b=document.createElement("script");b.async = true;b.setAttribute("type","text/javascript");b.setAttribute("charset","UTF-8");b.setAttribute("src",d);if(typeof a==="function"){if(window.attachEvent){b.onreadystatechange=function(){var e=b.readyState;if(e==="loaded"||e==="complete"){b.onreadystatechange=null;a()}}}else{b.onload=a}}c.appendChild(b)};loadJs("http://changyan.sohu.com/upload/changyan.js",function(){window.changyan.api.config({appid:appid,conf:conf})}); } + if (width < 960) {window.document.write('<script id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="https://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>'); } else { var loadJs=function(d,a){var c=document.getElementsByTagName("head")[0]||document.head||document.documentElement;var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("charset","UTF-8");b.setAttribute("src",d);if(typeof a==="function"){if(window.attachEvent){b.onreadystatechange=function(){var e=b.readyState;if(e==="loaded"||e==="complete"){b.onreadystatechange=null;a()}}}else{b.onload=a}}c.appendChild(b)};loadJs("https://changyan.sohu.com/upload/changyan.js",function(){window.changyan.api.config({appid:appid,conf:conf})}); } })(); </script> {{- end }} |