Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

JS linting in documentation base template.

  • Loading branch information...
commit 4dce7d50e43eafd3e77e8a7504e39953f56e4c0c 1 parent d48b796
Baptiste Mispelon authored November 05, 2013

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. 12  docs/templates/docs/doc.html
12  docs/templates/docs/doc.html
@@ -22,24 +22,24 @@
22 22
   This is only needed because we want to show the developement version
23 23
   warning on top.
24 24
   {% endcomment %}
25  
-  $(document).ready(function(){
  25
+  $(document).ready(function () {
26 26
     // First handle the case in which someone clicks on a link
27  
-    $('a[href*=#]').click(function(event) {
  27
+    $('a[href*=#]').click(function () {
28 28
       // check to see if this is an internal link, sigh.
29  
-      if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
  29
+      if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '')
30 30
           && location.hostname == this.hostname) {
31 31
         // get the link target, use the weird id= query since it escapes dots
32 32
         var target = $("[id='" + this.hash.slice(1) + "']");
33 33
         // calculate the offset
34 34
         var targetOffset = target.offset().top - $('#dev-warning').height() - 20;
35 35
         // scroll to the place, there is probably a better way
36  
-        setTimeout(function() {
  36
+        setTimeout(function () {
37 37
           $('html,body').scrollTop(targetOffset);
38 38
         }, 50);
39 39
       }
40 40
     });
41 41
     // this is the janky thing, there is probably a better way
42  
-    setTimeout(function() {
  42
+    setTimeout(function () {
43 43
       // is there a hash in the current window's location?
44 44
       if (window.location.hash) {
45 45
         // again, get the target
@@ -55,7 +55,7 @@
55 55
   
56 56
   // Propagate the fragment identifier to the links in the version switcher
57 57
   if (window.location.hash) {
58  
-    $('#doc-versions a').each(function(){
  58
+    $('#doc-versions a').each(function () {
59 59
       var anchor = $(this);
60 60
       anchor.attr('href', anchor.attr('href') + window.location.hash);
61 61
     });

0 notes on commit 4dce7d5

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