(function() {
  hljs.initHighlightingOnLoad();
  var $window = $(window);
  var scrollToTopButton = $(".scroll-to-top");
  $window.on("scroll", function() {
    if ($window.scrollTop() > 300) {
      scrollToTopButton.fadeIn();
    } else {
      scrollToTopButton.fadeOut();
    }
  });
  scrollToTopButton.on("click", function(event) {
    $("html, body").animate({
      scrollTop: 0
    }, "slow");
    return false;
  });
})();

@@ -120,37 +120,28 @@
 ;%0A  
-$window.on(%22scroll%22, function
+function checkScroll
 () %7B
@@ -269,16 +269,68 @@
    %7D%0A  %7D
+%0A  checkScroll();%0A  $window.on(%22scroll%22, checkScroll
 );%0A  scr

Check scroll on load