Index: themes/berlin/tpl/user_footer.html
===================================================================
--- themes/berlin/tpl/user_footer.html	(revision 3427)
+++ themes/berlin/tpl/user_footer.html	(revision 3706)
@@ -1,40 +1,41 @@
 <script type="text/javascript">
-	$("html").addClass("js");
-	// Show/Hide main menu
-	$(".header__nav").
-	before('<button id="hamburger" type="button"><span class="visually-hidden">' + dotclear_berlin_navigation + '</span></button>').
-	toggle();
-	$("#hamburger").click(function() {
-		$(this).toggleClass("open");
-		$(".header__nav").toggle('easing');
-	});
-	// Show/Hide sidebar on small screens
-	$("#main").prepend('<button id="offcanvas-on" type="button"><span class="visually-hidden">' + dotclear_berlin_show_menu + '</span></button>');
-	$("#offcanvas-on").click(function() {
-		var btn = $('<button id="offcanvas-off" type="button"><span class="visually-hidden">' + dotclear_berlin_hide_menu + '</span></button>');
-		$("#wrapper").addClass("off-canvas");
-		$("#footer").addClass("off-canvas");
-		$("#sidebar").prepend(btn);
-		btn.click(function(evt) {
-			$("#wrapper").removeClass("off-canvas");
-			$("#footer").removeClass("off-canvas");
-			evt.target.remove();
-		});
-	});
-	$(document).ready(function() {
-		// totop scroll
-		$(window).scroll(function() {
-			if ($(this).scrollTop() != 0) {
-				$('#gotop').fadeIn();
-			} else {
-				$('#gotop').fadeOut();
-			}
-		});
-		$('#gotop').click(function(e) {
-			$('body,html').animate({
-				scrollTop: 0
-			}, 800);
-			e.preventDefault();
-		});
-	});
+  'use strict';
+  $('html').addClass('js');
+  // Show/Hide main menu
+  $('.header__nav').
+  before('<button id="hamburger" type="button"><span class="visually-hidden">' + dotclear_berlin_navigation + '</span></button>').
+  toggle();
+  $('#hamburger').click(function() {
+    $(this).toggleClass('open');
+    $('.header__nav').toggle('easing');
+  });
+  // Show/Hide sidebar on small screens
+  $('#main').prepend('<button id="offcanvas-on" type="button"><span class="visually-hidden">' + dotclear_berlin_show_menu + '</span></button>');
+  $('#offcanvas-on').click(function() {
+    var btn = $('<button id="offcanvas-off" type="button"><span class="visually-hidden">' + dotclear_berlin_hide_menu + '</span></button>');
+    $('#wrapper').addClass('off-canvas');
+    $('#footer').addClass('off-canvas');
+    $('#sidebar').prepend(btn);
+    btn.click(function(evt) {
+      $('#wrapper').removeClass('off-canvas');
+      $('#footer').removeClass('off-canvas');
+      evt.target.remove();
+    });
+  });
+  $(document).ready(function() {
+    // totop scroll
+    $(window).scroll(function() {
+      if ($(this).scrollTop() != 0) {
+        $('#gotop').fadeIn();
+      } else {
+        $('#gotop').fadeOut();
+      }
+    });
+    $('#gotop').click(function(e) {
+      $('body,html').animate({
+        scrollTop: 0
+      }, 800);
+      e.preventDefault();
+    });
+  });
 </script>
Index: themes/default/js/post.js
===================================================================
--- themes/default/js/post.js	(revision 2633)
+++ themes/default/js/post.js	(revision 3706)
@@ -1,77 +1,85 @@
+/*global $, post_remember_str */
+'use strict';
+
 $(function() {
-	$('#comment-form p:has(input[type=submit][name=preview],button[type=submit][name=preview])').
-		before(
-			'<p class="remember"><input type="checkbox" id="c_remember" name="c_remember" /> ' +
-			'<label for="c_remember">' + post_remember_str + '</label>' +
-			'</p>'
-		);
+  $('#comment-form p:has(input[type=submit][name=preview],button[type=submit][name=preview])').
+  before(
+    '<p class="remember"><input type="checkbox" id="c_remember" name="c_remember" /> ' +
+    '<label for="c_remember">' + post_remember_str + '</label>' +
+    '</p>'
+  );
 
-	var cookie = readCookie($.cookie('comment_info'));
+  var cookie = readCookie($.cookie('comment_info'));
 
+  if (cookie != false) {
+    $('#c_name').val(cookie[0]);
+    $('#c_mail').val(cookie[1]);
+    $('#c_site').val(cookie[2]);
+    $('#c_remember').attr('checked', 'checked');
+  }
 
-	if (cookie != false) {
-		$('#c_name').val(cookie[0]);
-		$('#c_mail').val(cookie[1]);
-		$('#c_site').val(cookie[2]);
-		$('#c_remember').attr('checked','checked');
-	}
+  $('#c_remember').click(function() {
+    if (this.checked) {
+      setCookie();
+    } else {
+      dropCookie();
+    }
+  });
 
-	$('#c_remember').click(function() {
-		if (this.checked) {
-			setCookie();
-		} else {
-			dropCookie();
-		}
-	});
+  $('#c_name').change(function() {
+    if ($('#c_remember').get(0).checked) {
+      setCookie();
+    }
+  });
 
-	$('#c_name').change(function() {
-		if ($('#c_remember').get(0).checked) {
-			setCookie();
-		}
-	});
+  $('#c_mail').change(function() {
+    if ($('#c_remember').get(0).checked) {
+      setCookie();
+    }
+  });
 
-	$('#c_mail').change(function() {
-		if ($('#c_remember').get(0).checked) {
-			setCookie();
-		}
-	});
+  $('#c_site').change(function() {
+    if ($('#c_remember').get(0).checked) {
+      setCookie();
+    }
+  });
 
-	$('#c_site').change(function() {
-		if ($('#c_remember').get(0).checked) {
-			setCookie();
-		}
-	});
+  function setCookie() {
+    var name = $('#c_name').val();
+    var mail = $('#c_mail').val();
+    var site = $('#c_site').val();
+    var cpath = $('link[rel=top]').attr('href');
+    if (!cpath) {
+      cpath = '/';
+    } else {
+      cpath = cpath.replace(/.*:\/\/[^\/]*([^?]*).*/g, '$1');
+    }
 
-	function setCookie() {
-		var name = $('#c_name').val();
-		var mail = $('#c_mail').val();
-		var site = $('#c_site').val();
-		var cpath = $('link[rel=top]').attr('href');
-		if (!cpath) {
-			cpath = "/";
-		} else {
-			cpath = cpath.replace(/.*:\/\/[^\/]*([^?]*).*/g,"$1");
-		}
+    $.cookie('comment_info', name + '\n' + mail + '\n' + site, {
+      expires: 60,
+      path: cpath
+    });
+  }
 
-		$.cookie('comment_info', name + '\n' + mail + '\n' + site, {expires: 60, path: cpath});
-	}
+  function dropCookie() {
+    $.cookie('comment_info', '', {
+      expires: -30,
+      path: '/'
+    });
+  }
 
-	function dropCookie() {
-		$.cookie('comment_info','',{expires: -30, path: '/'});
-	}
+  function readCookie(c) {
+    if (!c) {
+      return false;
+    }
 
-	function readCookie(c) {
-		if (!c) {
-			return false;
-		}
+    var s = c.split('\n');
 
-		var s = c.split('\n');
+    if (s.length != 3) {
+      dropCookie();
+      return false;
+    }
 
-		if (s.length != 3) {
-			dropCookie();
-			return false;
-		}
-
-		return s;
-	}
+    return s;
+  }
 });
Index: themes/ductile/ductile.js
===================================================================
--- themes/ductile/ductile.js	(revision 2566)
+++ themes/ductile/ductile.js	(revision 3706)
@@ -1,77 +1,80 @@
+/*global $ */
+'use strict';
+
 $(function() {
-	var create_name = function(text) {
+  var create_name = function(text) {
 
-		// Convert text to lower case.
-		var name = text.toLowerCase();
+    // Convert text to lower case.
+    var name = text.toLowerCase();
 
-		// Remove leading and trailing spaces, and any non-alphanumeric
-		// characters except for ampersands, spaces and dashes.
-		name = name.replace(/^\s+|\s+$|[^a-z0-9&\s-]/g, '');
+    // Remove leading and trailing spaces, and any non-alphanumeric
+    // characters except for ampersands, spaces and dashes.
+    name = name.replace(/^\s+|\s+$|[^a-z0-9&\s-]/g, '');
 
-		// Replace '&' with 'and'.
-		name = name.replace(/&/g, 'and');
+    // Replace '&' with 'and'.
+    name = name.replace(/&/g, 'and');
 
-		// Replaces spaces with dashes.
-		name = name.replace(/\s/g, '-');
+    // Replaces spaces with dashes.
+    name = name.replace(/\s/g, '-');
 
-		// Squash any duplicate dashes.
-		name = name.replace(/(-)+\1/g, "$1");
+    // Squash any duplicate dashes.
+    name = name.replace(/(-)+\1/g, '$1');
 
-		return name;
-	};
+    return name;
+  };
 
-	var add_link = function() {
+  var add_link = function() {
 
-		// Convert the h2 element text into a value that
-		// is safe to use in a name attribute.
-		var name = create_name($(this).text());
+    // Convert the h2 element text into a value that
+    // is safe to use in a name attribute.
+    var name = create_name($(this).text());
 
-		// Create a name attribute in the following sibling
-		// to act as a fragment anchor.
-		$(this).next().attr('name', name);
+    // Create a name attribute in the following sibling
+    // to act as a fragment anchor.
+    $(this).next().attr('name', name);
 
-		// Replace the h2.toggle element with a link to the
-		// fragment anchor.  Use the h2 text to create the
-		// link title attribute.
-		$(this).html(
-			'<a href="#' + name + '" title="Reveal ' +
-			$(this).text() + ' content">' +
-			$(this).html() + '</a>');
-	};
+    // Replace the h2.toggle element with a link to the
+    // fragment anchor.  Use the h2 text to create the
+    // link title attribute.
+    $(this).html(
+      '<a href="#' + name + '" title="Reveal ' +
+      $(this).text() + ' content">' +
+      $(this).html() + '</a>');
+  };
 
-	var toggle = function(event) {
-		event.preventDefault();
+  var toggle = function(event) {
+    event.preventDefault();
 
-		// Toggle the 'expanded' class of the h2.toggle
-		// element, then apply the slideToggle effect
-		// to all siblings.
-		$(this).toggleClass('expanded').
-			nextAll().slideToggle('fast');
-	};
+    // Toggle the 'expanded' class of the h2.toggle
+    // element, then apply the slideToggle effect
+    // to all siblings.
+    $(this).toggleClass('expanded').
+    nextAll().slideToggle('fast');
+  };
 
-	var remove_focus = function() {
-	  // Use the blur() method to remove focus.
-	  $(this).blur();
-	};
+  var remove_focus = function() {
+    // Use the blur() method to remove focus.
+    $(this).blur();
+  };
 
-	$(document).ready (function () {
-		if ($(window).width() < 1024) {
+  $(document).ready(function() {
+    if ($(window).width() < 1024) {
 
-			// Set toggle class to each #sidebar h2
-			$("#sidebar div div h2").addClass('toggle');
+      // Set toggle class to each #sidebar h2
+      $('#sidebar div div h2').addClass('toggle');
 
-			// Hide all h2.toggle siblings
-			$('#sidebar div div h2').nextAll().hide();
+      // Hide all h2.toggle siblings
+      $('#sidebar div div h2').nextAll().hide();
 
-			// Add a link to each h2.toggle element.
-			$('h2.toggle').each(add_link);
+      // Add a link to each h2.toggle element.
+      $('h2.toggle').each(add_link);
 
-			// Add a click event handler to all h2.toggle elements.
-			$('h2.toggle').click(toggle);
+      // Add a click event handler to all h2.toggle elements.
+      $('h2.toggle').click(toggle);
 
-			// Remove the focus from the link tag when accessed with a mouse.
-			$('h2.toggle a').mouseup(remove_focus);
-		}
-	})
+      // Remove the focus from the link tag when accessed with a mouse.
+      $('h2.toggle a').mouseup(remove_focus);
+    }
+  });
 
 });
