File tree Expand file tree Collapse file tree 1 file changed +32
-2
lines changed
Expand file tree Collapse file tree 1 file changed +32
-2
lines changed Original file line number Diff line number Diff line change 11{% assign disqus = site.disqus | default:site.disqus_shortname %}
22{% if disqus %}
3+
4+ <!-- Fixing the Disqus iframe transparency issue on some browsers -->
5+ < style >
6+ : root {
7+ color-scheme : light dark;
8+ }
9+ /* make sure Disqus iframe uses light mode */
10+ iframe {
11+ color-scheme : light;
12+ }
13+ </ style >
14+
315< div id ="disqus_thread "> </ div >
416< noscript > Please enable JavaScript to view the < a href ="https://disqus.com/?ref_noscript " rel ="nofollow "> comments powered by Disqus.</ a > </ noscript >
517< script > ! function ( w , d ) {
1022 config ( ) {
1123 this . page . url = w . location . href ;
1224 this . page . title = d . title ;
25+ this . page . identifier = w . location . pathname ;
1326 } ,
1427 } ) ;
1528 } else {
1629 w . disqus_config = function disqusConfig ( ) {
1730 this . page . url = w . location . href ;
1831 this . page . title = d . title ;
32+ this . page . identifier = w . location . pathname ;
1933 } ;
20- w . loadJSDeferred ( d . getElementById ( "_hrefDisqus" ) . href + '/ embed.js' ) ;
34+ w . loadJSDeferred ( d . getElementById ( "_hrefDisqus" ) . href + 'embed.js' ) ;
2135 }
2236 }
37+
38+ d . addEventListener ( 'hydejack-dark-mode-toggle' , ( e ) => {
39+ setTimeout ( ( ) => {
40+ if ( w . DISQUS ) {
41+ w . DISQUS . reset ( {
42+ reload : true ,
43+ config : function ( ) {
44+ this . page . url = w . location . href ;
45+ this . page . title = d . title ;
46+ this . page . identifier = w . location . pathname ;
47+ }
48+ } ) ;
49+ }
50+ } , 500 ) ;
51+ } ) ;
52+
2353} ( window , document ) ; </ script >
24- {% endif %}
54+ {% endif %}
You can’t perform that action at this time.
0 commit comments