File tree Expand file tree Collapse file tree 8 files changed +106
-85
lines changed Expand file tree Collapse file tree 8 files changed +106
-85
lines changed Original file line number Diff line number Diff line change 1
- {{ template "partials /disqus.html" . }}
1
+ {{ template "_internal /disqus.html" . }}
2
2
3
3
< footer class ="footer ">
4
4
< div class ="footer-row ">
Original file line number Diff line number Diff line change @@ -117,22 +117,25 @@ <h2>Tags</h2>
117
117
</ div >
118
118
</ main >
119
119
< div id ="disqus_thread "> </ div >
120
- < script type ="text /javascript ">
121
-
122
- ( function ( ) {
120
+ < script type ="application /javascript ">
121
+ window . disqus_config = function ( ) {
122
+
123
123
124
124
125
- if ( window . location . hostname == "localhost" )
126
- return ;
127
-
128
- var dsq = document . createElement ( 'script' ) ; dsq . type = 'text/javascript' ; dsq . async = true ;
129
- var disqus_shortname = 'singhcoder' ;
130
- dsq . src = '//' + disqus_shortname + '.disqus.com/embed.js' ;
131
- ( document . getElementsByTagName ( 'head' ) [ 0 ] || document . getElementsByTagName ( 'body' ) [ 0 ] ) . appendChild ( dsq ) ;
132
- } ) ( ) ;
125
+ } ;
126
+ ( function ( ) {
127
+ if ( [ "localhost" , "127.0.0.1" ] . indexOf ( window . location . hostname ) != - 1 ) {
128
+ document . getElementById ( 'disqus_thread' ) . innerHTML = 'Disqus comments not available by default when the website is previewed locally.' ;
129
+ return ;
130
+ }
131
+ var d = document , s = d . createElement ( 'script' ) ; s . async = true ;
132
+ s . src = '//' + "singhcoder" + '.disqus.com/embed.js' ;
133
+ s . setAttribute ( 'data-timestamp' , + new Date ( ) ) ;
134
+ ( d . head || d . body ) . appendChild ( s ) ;
135
+ } ) ( ) ;
133
136
</ script >
134
137
< noscript > Please enable JavaScript to view the < a href ="https://disqus.com/?ref_noscript "> comments powered by Disqus.</ a > </ noscript >
135
- < a href ="https://disqus.com/ " class ="dsq-brlink "> comments powered by < span class ="logo-disqus "> Disqus</ span > </ a >
138
+ < a href ="https://disqus.com " class ="dsq-brlink "> comments powered by < span class ="logo-disqus "> Disqus</ span > </ a >
136
139
137
140
< footer class ="footer ">
138
141
< div class ="footer-row ">
Original file line number Diff line number Diff line change @@ -197,22 +197,25 @@ <h2>Tags</h2>
197
197
</ div >
198
198
</ main >
199
199
< div id ="disqus_thread "> </ div >
200
- < script type ="text /javascript ">
201
-
202
- ( function ( ) {
200
+ < script type ="application /javascript ">
201
+ window . disqus_config = function ( ) {
202
+
203
203
204
204
205
- if ( window . location . hostname == "localhost" )
206
- return ;
207
-
208
- var dsq = document . createElement ( 'script' ) ; dsq . type = 'text/javascript' ; dsq . async = true ;
209
- var disqus_shortname = 'singhcoder' ;
210
- dsq . src = '//' + disqus_shortname + '.disqus.com/embed.js' ;
211
- ( document . getElementsByTagName ( 'head' ) [ 0 ] || document . getElementsByTagName ( 'body' ) [ 0 ] ) . appendChild ( dsq ) ;
212
- } ) ( ) ;
205
+ } ;
206
+ ( function ( ) {
207
+ if ( [ "localhost" , "127.0.0.1" ] . indexOf ( window . location . hostname ) != - 1 ) {
208
+ document . getElementById ( 'disqus_thread' ) . innerHTML = 'Disqus comments not available by default when the website is previewed locally.' ;
209
+ return ;
210
+ }
211
+ var d = document , s = d . createElement ( 'script' ) ; s . async = true ;
212
+ s . src = '//' + "singhcoder" + '.disqus.com/embed.js' ;
213
+ s . setAttribute ( 'data-timestamp' , + new Date ( ) ) ;
214
+ ( d . head || d . body ) . appendChild ( s ) ;
215
+ } ) ( ) ;
213
216
</ script >
214
217
< noscript > Please enable JavaScript to view the < a href ="https://disqus.com/?ref_noscript "> comments powered by Disqus.</ a > </ noscript >
215
- < a href ="https://disqus.com/ " class ="dsq-brlink "> comments powered by < span class ="logo-disqus "> Disqus</ span > </ a >
218
+ < a href ="https://disqus.com " class ="dsq-brlink "> comments powered by < span class ="logo-disqus "> Disqus</ span > </ a >
216
219
217
220
< footer class ="footer ">
218
221
< div class ="footer-row ">
Original file line number Diff line number Diff line change @@ -187,22 +187,25 @@ <h2>Tags</h2>
187
187
</ div >
188
188
</ main >
189
189
< div id ="disqus_thread "> </ div >
190
- < script type ="text /javascript ">
191
-
192
- ( function ( ) {
190
+ < script type ="application /javascript ">
191
+ window . disqus_config = function ( ) {
192
+
193
193
194
194
195
- if ( window . location . hostname == "localhost" )
196
- return ;
197
-
198
- var dsq = document . createElement ( 'script' ) ; dsq . type = 'text/javascript' ; dsq . async = true ;
199
- var disqus_shortname = 'singhcoder' ;
200
- dsq . src = '//' + disqus_shortname + '.disqus.com/embed.js' ;
201
- ( document . getElementsByTagName ( 'head' ) [ 0 ] || document . getElementsByTagName ( 'body' ) [ 0 ] ) . appendChild ( dsq ) ;
202
- } ) ( ) ;
195
+ } ;
196
+ ( function ( ) {
197
+ if ( [ "localhost" , "127.0.0.1" ] . indexOf ( window . location . hostname ) != - 1 ) {
198
+ document . getElementById ( 'disqus_thread' ) . innerHTML = 'Disqus comments not available by default when the website is previewed locally.' ;
199
+ return ;
200
+ }
201
+ var d = document , s = d . createElement ( 'script' ) ; s . async = true ;
202
+ s . src = '//' + "singhcoder" + '.disqus.com/embed.js' ;
203
+ s . setAttribute ( 'data-timestamp' , + new Date ( ) ) ;
204
+ ( d . head || d . body ) . appendChild ( s ) ;
205
+ } ) ( ) ;
203
206
</ script >
204
207
< noscript > Please enable JavaScript to view the < a href ="https://disqus.com/?ref_noscript "> comments powered by Disqus.</ a > </ noscript >
205
- < a href ="https://disqus.com/ " class ="dsq-brlink "> comments powered by < span class ="logo-disqus "> Disqus</ span > </ a >
208
+ < a href ="https://disqus.com " class ="dsq-brlink "> comments powered by < span class ="logo-disqus "> Disqus</ span > </ a >
206
209
207
210
< footer class ="footer ">
208
211
< div class ="footer-row ">
Original file line number Diff line number Diff line change @@ -160,22 +160,25 @@ <h2>Tags</h2>
160
160
</ div >
161
161
</ main >
162
162
< div id ="disqus_thread "> </ div >
163
- < script type ="text /javascript ">
164
-
165
- ( function ( ) {
163
+ < script type ="application /javascript ">
164
+ window . disqus_config = function ( ) {
165
+
166
166
167
167
168
- if ( window . location . hostname == "localhost" )
169
- return ;
170
-
171
- var dsq = document . createElement ( 'script' ) ; dsq . type = 'text/javascript' ; dsq . async = true ;
172
- var disqus_shortname = 'singhcoder' ;
173
- dsq . src = '//' + disqus_shortname + '.disqus.com/embed.js' ;
174
- ( document . getElementsByTagName ( 'head' ) [ 0 ] || document . getElementsByTagName ( 'body' ) [ 0 ] ) . appendChild ( dsq ) ;
175
- } ) ( ) ;
168
+ } ;
169
+ ( function ( ) {
170
+ if ( [ "localhost" , "127.0.0.1" ] . indexOf ( window . location . hostname ) != - 1 ) {
171
+ document . getElementById ( 'disqus_thread' ) . innerHTML = 'Disqus comments not available by default when the website is previewed locally.' ;
172
+ return ;
173
+ }
174
+ var d = document , s = d . createElement ( 'script' ) ; s . async = true ;
175
+ s . src = '//' + "singhcoder" + '.disqus.com/embed.js' ;
176
+ s . setAttribute ( 'data-timestamp' , + new Date ( ) ) ;
177
+ ( d . head || d . body ) . appendChild ( s ) ;
178
+ } ) ( ) ;
176
179
</ script >
177
180
< noscript > Please enable JavaScript to view the < a href ="https://disqus.com/?ref_noscript "> comments powered by Disqus.</ a > </ noscript >
178
- < a href ="https://disqus.com/ " class ="dsq-brlink "> comments powered by < span class ="logo-disqus "> Disqus</ span > </ a >
181
+ < a href ="https://disqus.com " class ="dsq-brlink "> comments powered by < span class ="logo-disqus "> Disqus</ span > </ a >
179
182
180
183
< footer class ="footer ">
181
184
< div class ="footer-row ">
Original file line number Diff line number Diff line change @@ -153,22 +153,25 @@ <h2>Tags</h2>
153
153
</ div >
154
154
</ main >
155
155
< div id ="disqus_thread "> </ div >
156
- < script type ="text /javascript ">
157
-
158
- ( function ( ) {
156
+ < script type ="application /javascript ">
157
+ window . disqus_config = function ( ) {
158
+
159
159
160
160
161
- if ( window . location . hostname == "localhost" )
162
- return ;
163
-
164
- var dsq = document . createElement ( 'script' ) ; dsq . type = 'text/javascript' ; dsq . async = true ;
165
- var disqus_shortname = 'singhcoder' ;
166
- dsq . src = '//' + disqus_shortname + '.disqus.com/embed.js' ;
167
- ( document . getElementsByTagName ( 'head' ) [ 0 ] || document . getElementsByTagName ( 'body' ) [ 0 ] ) . appendChild ( dsq ) ;
168
- } ) ( ) ;
161
+ } ;
162
+ ( function ( ) {
163
+ if ( [ "localhost" , "127.0.0.1" ] . indexOf ( window . location . hostname ) != - 1 ) {
164
+ document . getElementById ( 'disqus_thread' ) . innerHTML = 'Disqus comments not available by default when the website is previewed locally.' ;
165
+ return ;
166
+ }
167
+ var d = document , s = d . createElement ( 'script' ) ; s . async = true ;
168
+ s . src = '//' + "singhcoder" + '.disqus.com/embed.js' ;
169
+ s . setAttribute ( 'data-timestamp' , + new Date ( ) ) ;
170
+ ( d . head || d . body ) . appendChild ( s ) ;
171
+ } ) ( ) ;
169
172
</ script >
170
173
< noscript > Please enable JavaScript to view the < a href ="https://disqus.com/?ref_noscript "> comments powered by Disqus.</ a > </ noscript >
171
- < a href ="https://disqus.com/ " class ="dsq-brlink "> comments powered by < span class ="logo-disqus "> Disqus</ span > </ a >
174
+ < a href ="https://disqus.com " class ="dsq-brlink "> comments powered by < span class ="logo-disqus "> Disqus</ span > </ a >
172
175
173
176
< footer class ="footer ">
174
177
< div class ="footer-row ">
Original file line number Diff line number Diff line change @@ -148,22 +148,25 @@ <h2>Tags</h2>
148
148
</ div >
149
149
</ main >
150
150
< div id ="disqus_thread "> </ div >
151
- < script type ="text /javascript ">
152
-
153
- ( function ( ) {
151
+ < script type ="application /javascript ">
152
+ window . disqus_config = function ( ) {
153
+
154
154
155
155
156
- if ( window . location . hostname == "localhost" )
157
- return ;
158
-
159
- var dsq = document . createElement ( 'script' ) ; dsq . type = 'text/javascript' ; dsq . async = true ;
160
- var disqus_shortname = 'singhcoder' ;
161
- dsq . src = '//' + disqus_shortname + '.disqus.com/embed.js' ;
162
- ( document . getElementsByTagName ( 'head' ) [ 0 ] || document . getElementsByTagName ( 'body' ) [ 0 ] ) . appendChild ( dsq ) ;
163
- } ) ( ) ;
156
+ } ;
157
+ ( function ( ) {
158
+ if ( [ "localhost" , "127.0.0.1" ] . indexOf ( window . location . hostname ) != - 1 ) {
159
+ document . getElementById ( 'disqus_thread' ) . innerHTML = 'Disqus comments not available by default when the website is previewed locally.' ;
160
+ return ;
161
+ }
162
+ var d = document , s = d . createElement ( 'script' ) ; s . async = true ;
163
+ s . src = '//' + "singhcoder" + '.disqus.com/embed.js' ;
164
+ s . setAttribute ( 'data-timestamp' , + new Date ( ) ) ;
165
+ ( d . head || d . body ) . appendChild ( s ) ;
166
+ } ) ( ) ;
164
167
</ script >
165
168
< noscript > Please enable JavaScript to view the < a href ="https://disqus.com/?ref_noscript "> comments powered by Disqus.</ a > </ noscript >
166
- < a href ="https://disqus.com/ " class ="dsq-brlink "> comments powered by < span class ="logo-disqus "> Disqus</ span > </ a >
169
+ < a href ="https://disqus.com " class ="dsq-brlink "> comments powered by < span class ="logo-disqus "> Disqus</ span > </ a >
167
170
168
171
< footer class ="footer ">
169
172
< div class ="footer-row ">
Original file line number Diff line number Diff line change @@ -125,22 +125,25 @@ <h2>Tags</h2>
125
125
</ div >
126
126
</ main >
127
127
< div id ="disqus_thread "> </ div >
128
- < script type ="text /javascript ">
129
-
130
- ( function ( ) {
128
+ < script type ="application /javascript ">
129
+ window . disqus_config = function ( ) {
130
+
131
131
132
132
133
- if ( window . location . hostname == "localhost" )
134
- return ;
135
-
136
- var dsq = document . createElement ( 'script' ) ; dsq . type = 'text/javascript' ; dsq . async = true ;
137
- var disqus_shortname = 'singhcoder' ;
138
- dsq . src = '//' + disqus_shortname + '.disqus.com/embed.js' ;
139
- ( document . getElementsByTagName ( 'head' ) [ 0 ] || document . getElementsByTagName ( 'body' ) [ 0 ] ) . appendChild ( dsq ) ;
140
- } ) ( ) ;
133
+ } ;
134
+ ( function ( ) {
135
+ if ( [ "localhost" , "127.0.0.1" ] . indexOf ( window . location . hostname ) != - 1 ) {
136
+ document . getElementById ( 'disqus_thread' ) . innerHTML = 'Disqus comments not available by default when the website is previewed locally.' ;
137
+ return ;
138
+ }
139
+ var d = document , s = d . createElement ( 'script' ) ; s . async = true ;
140
+ s . src = '//' + "singhcoder" + '.disqus.com/embed.js' ;
141
+ s . setAttribute ( 'data-timestamp' , + new Date ( ) ) ;
142
+ ( d . head || d . body ) . appendChild ( s ) ;
143
+ } ) ( ) ;
141
144
</ script >
142
145
< noscript > Please enable JavaScript to view the < a href ="https://disqus.com/?ref_noscript "> comments powered by Disqus.</ a > </ noscript >
143
- < a href ="https://disqus.com/ " class ="dsq-brlink "> comments powered by < span class ="logo-disqus "> Disqus</ span > </ a >
146
+ < a href ="https://disqus.com " class ="dsq-brlink "> comments powered by < span class ="logo-disqus "> Disqus</ span > </ a >
144
147
145
148
< footer class ="footer ">
146
149
< div class ="footer-row ">
You can’t perform that action at this time.
0 commit comments