Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switched to coffeescript, fixed RSS feed
- Loading branch information
Showing
10 changed files
with
239 additions
and
239 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,31 +1,25 @@ | ||
(function () { | ||
(function() { | ||
|
||
var className = document.body.className, | ||
index = /^page-(coding|learning)-index/.test( className ), | ||
comments_enabled = !index && /^page-(coding|learning)/.test( className ), | ||
comment_container; | ||
(function() { | ||
var className, comment_container, comments_enabled, dsqLoad, index; | ||
className = document.body.className; | ||
index = /^page-(coding|learning)-index/.test(className); | ||
comments_enabled = !index && /^page-(coding|learning)/.test(className); | ||
window.disqus_developer = 0; | ||
window.disqus_shortname = 'dougneiner'; | ||
if (!index) { | ||
comment_container = document.getElementById("disqus_thread"); | ||
if (!comment_container) return; | ||
dsqLoad = function() { | ||
var dsq; | ||
dsq = document.createElement('script'); | ||
dsq.type = 'text/javascript'; | ||
dsq.async = true; | ||
dsq.src = "http://" + window.disqus_shortname + ".disqus.com/embed.js"; | ||
return (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); | ||
}; | ||
return dsqLoad(); | ||
} | ||
})(); | ||
|
||
// Set global config for Disqus | ||
window.disqus_developer = 0; | ||
window.disqus_shortname = 'dougneiner'; | ||
|
||
if ( index ) { | ||
// Show comment count | ||
} else { | ||
// Enable comments | ||
comment_container = document.getElementById( "disqus_thread" ); | ||
|
||
if ( !comment_container ) { | ||
return; | ||
} | ||
|
||
// Load Disqus | ||
(function() { | ||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; | ||
dsq.src = 'http://' + window.disqus_shortname + '.disqus.com/embed.js'; | ||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); | ||
})(); | ||
} | ||
|
||
|
||
}()); | ||
}).call(this); |
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
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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
(() -> | ||
className = document.body.className | ||
index = /^page-(coding|learning)-index/.test className | ||
comments_enabled = !index and /^page-(coding|learning)/.test className | ||
|
||
# Set global config for Disqus | ||
window.disqus_developer = 0 | ||
window.disqus_shortname = 'dougneiner' | ||
|
||
unless index | ||
# Enable comments | ||
comment_container = document.getElementById( "disqus_thread" ) | ||
return unless comment_container | ||
|
||
# Load Disqus | ||
dsqLoad = () -> | ||
dsq = document.createElement('script') | ||
dsq.type = 'text/javascript' | ||
dsq.async = true | ||
dsq.src = "http://#{window.disqus_shortname}.disqus.com/embed.js" | ||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq) | ||
|
||
dsqLoad() | ||
)() |
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 was deleted.
Oops, something went wrong.