Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

JS linting in documentation base template.

  • Loading branch information...
commit 4dce7d50e43eafd3e77e8a7504e39953f56e4c0c 1 parent d48b796
@bmispelon bmispelon authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 docs/templates/docs/doc.html
View
12 docs/templates/docs/doc.html
@@ -22,24 +22,24 @@
This is only needed because we want to show the developement version
warning on top.
{% endcomment %}
- $(document).ready(function(){
+ $(document).ready(function () {
// First handle the case in which someone clicks on a link
- $('a[href*=#]').click(function(event) {
+ $('a[href*=#]').click(function () {
// check to see if this is an internal link, sigh.
- if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
+ if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '')
&& location.hostname == this.hostname) {
// get the link target, use the weird id= query since it escapes dots
var target = $("[id='" + this.hash.slice(1) + "']");
// calculate the offset
var targetOffset = target.offset().top - $('#dev-warning').height() - 20;
// scroll to the place, there is probably a better way
- setTimeout(function() {
+ setTimeout(function () {
$('html,body').scrollTop(targetOffset);
}, 50);
}
});
// this is the janky thing, there is probably a better way
- setTimeout(function() {
+ setTimeout(function () {
// is there a hash in the current window's location?
if (window.location.hash) {
// again, get the target
@@ -55,7 +55,7 @@
// Propagate the fragment identifier to the links in the version switcher
if (window.location.hash) {
- $('#doc-versions a').each(function(){
+ $('#doc-versions a').each(function () {
var anchor = $(this);
anchor.attr('href', anchor.attr('href') + window.location.hash);
});

0 comments on commit 4dce7d5

Please sign in to comment.
Something went wrong with that request. Please try again.