Skip to content

Commit

Permalink
Merge pull request #13 from yizeng/hotfix/#12/fix-disqus-protocols
Browse files Browse the repository at this point in the history
Fix Disqus scripts protocols
  • Loading branch information
yizeng authored Sep 29, 2017
2 parents dc115df + 1d73636 commit a191234
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
8 changes: 4 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ blog:
footer_content: A gem-based responsive simple texture styled <a href="http://jekyllrb.com/">Jekyll</a> theme.

disqus:
shortname:
public_key:
google_analytics:
addthis_public_id: # AddThis sharing plugin. See http://www.addthis.com/
shortname: # e.g. yizeng
public_key: # e.g. ULZ0b9TFefCUJHKQd4JCKv2v3u27YoG7YG8zXPewkWrT333Z0Se9YnxLzoV6VM8W
google_analytics: # e.g. 'UA-42456515-5'
addthis_public_id: # AddThis sharing plugin. See http://www.addthis.com/. E.g. ra-53329e27694534j5

paths:
home: /
Expand Down
8 changes: 6 additions & 2 deletions _includes/blog/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
});

$('footer .back-to-top, .gotop').on('click', function (event) {
sendGaEvent('Blog', 'Back to Top', event.currentTarget);
event.preventDefault();
$('html, body').animate({
scrollTop: 0
Expand All @@ -35,7 +34,6 @@
});

$('.show-hidden').on('click', function () {
sendGaEvent('Post', 'Show Hidden', event.currentTarget);
$(this).parent().next().toggleClass("hidden");
$(this).toggleClass("hidden");
});
Expand All @@ -45,6 +43,12 @@
<!-- Google Analytics Event tracking -->
{% if site.google_analytics %}
<script>
$(document).on('click', 'footer .back-to-top, .gotop', function (event) {
sendGaEvent('Blog', 'Back to Top', event.currentTarget);
});
$(document).on('click', '.show-hidden', function (event) {
sendGaEvent('Post', 'Show Hidden', event.currentTarget);
});
$(document).on('click', 'a.internal', function(event) {
sendGaEvent('Blog', 'Navigate', event.currentTarget);
});
Expand Down
4 changes: 2 additions & 2 deletions _includes/common/disqus.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

$.ajax({
type: 'GET',
url: 'https://disqus.com/api/3.0/threads/set.jsonp',
url: '//disqus.com/api/3.0/threads/set.jsonp',
data: {
api_key: disqusPublicKey,
forum: disqusShortname,
Expand All @@ -24,7 +24,7 @@

$('.comments .show-hidden').on('click', function () {
$.ajaxSetup({cache: true});
$.getScript('http://' + disqusShortname + '.disqus.com/embed.js');
$.getScript('//' + disqusShortname + '.disqus.com/embed.js');
$.ajaxSetup({cache: false});
$(this).remove();
});
Expand Down
2 changes: 1 addition & 1 deletion jekyll-theme-simple-texture.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |spec|
spec.name = "jekyll-theme-simple-texture"
spec.version = "0.2.1"
spec.version = "0.2.2"
spec.authors = ["Yi Zeng"]
spec.email = ["[email protected]"]

Expand Down
8 changes: 4 additions & 4 deletions starter-kit/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ blog:
footer_content: A gem-based responsive simple texture styled <a href="http://jekyllrb.com/">Jekyll</a> theme.

disqus:
shortname:
public_key:
google_analytics:
addthis_public_id: # AddThis sharing plugin. See http://www.addthis.com/
shortname: # e.g. yizeng
public_key: # e.g. ULZ0b9TFefCUJHKQd4JCKv2v3u27YoG7YG8zXPewkWrT333Z0Se9YnxLzoV6VM8W
google_analytics: # e.g. 'UA-42456515-5'
addthis_public_id: # AddThis sharing plugin. See http://www.addthis.com/. E.g. ra-53329e27694534j5

paths:
home: /
Expand Down

0 comments on commit a191234

Please sign in to comment.