{"action":"created","comment":{"url":"https://api.github.com/repos/kni-labs/knapsack/pulls/comments/44099866","id":44099866,"diff_hunk":"@@ -0,0 +1,163 @@\n+(function ($, global) {\n+\n+  var Sidebar = function (conf) {\n+    this.conf = $.extend({\n+\n+      // Collapsed class\n+      collapsedClass: 'is-collapsed',\n+\n+      // Storage key\n+      storageKey: '_sassdoc_sidebar_index',\n+\n+      // Index attribute\n+      indexAttribute: 'data-slug',\n+\n+      // Toggle button\n+      toggleBtn: '.js-btn-toggle',\n+\n+      // Automatic initialization\n+      init: true\n+    }, conf || {});\n+\n+    if (this.conf.init === true) {\n+      this.initialize();\n+    }\n+  };\n+\n+  /**\n+   * Initialize module\n+   */\n+  Sidebar.prototype.initialize = function () {\n+    this.conf.nodes = $('[' + this.conf.indexAttribute + ']');\n+\n+    this.load();\n+    this.updateDOM();\n+    this.bind();\n+    this.loadToggle();\n+  };\n+\n+\n+  /**\n+   * Load sidebar toggle\n+   */\n+  Sidebar.prototype.loadToggle = function () {\n+    $('<span />', {\n+      'class': 'layout-toggle',\n+      'html': '&times;',\n+      'data-alt': '&#8594;'\n+    }).appendTo( $('.header') );\n+\n+    $('.layout-toggle').on('click', function () {\n+      var $this = $(this);\n+      var alt;\n+\n+      $('body').toggleClass('sidebar-closed');\n+\n+      alt = $this.html();\n+      $this.html($this.data('alt'));\n+      $this.data('alt', alt);\n+    });\n+  };\n+\n+  /**\n+   * Load data from storage or create fresh index\n+   */\n+  Sidebar.prototype.load = function () {\n+    var index = 'localStorage' in global ?\n+      global.localStorage.getItem(this.conf.storageKey) :\n+      null;\n+\n+    this.index = index ? JSON.parse(index) : this.buildIndex();\n+  };\n+\n+  /**\n+   * Build a fresh index\n+   */\n+  Sidebar.prototype.buildIndex = function () {\n+    var index = {};\n+    var $item;\n+\n+    this.conf.nodes.each($.proxy(function (index, item) {\n+      $item = $(item);\n+\n+      index[$item.attr(this.conf.indexAttribute)] = !$item.hasClass(this.conf.collapsedClass);\n+    }, this));\n+\n+    return index;\n+  };\n+\n+  /**\n+   * Update DOM based on index\n+   */\n+  Sidebar.prototype.updateDOM = function () {\n+    var item;\n+\n+    for (item in this.index) {\n+      if (this.index[item] === false) {\n+        $('[' + this.conf.indexAttribute + '=\"' + item + '\"]').addClass(this.conf.collapsedClass);\n+      }\n+    }\n+  };\n+\n+  /**\n+   * Save index in storage\n+   */\n+  Sidebar.prototype.save = function () {\n+    if (!('localStorage' in global)) {\n+      return;\n+    }\n+\n+    global.localStorage.setItem(this.conf.storageKey, JSON.stringify(this.index));\n+  };\n+\n+  /**\n+   * Bind UI events\n+   */\n+  Sidebar.prototype.bind = function () {\n+    var $item, slug, fn, text;\n+    var collapsed = false;\n+\n+    // Save index in localStorage\n+    global.onbeforeunload = $.proxy(function () {\n+      this.save();\n+    }, this);\n+\n+    // Toggle all\n+    $(this.conf.toggleBtn).on('click', $.proxy(function (event) {\n+      $node = $(event.target);","path":".sassdoc/assets/js/sidebar.js","position":127,"original_position":127,"commit_id":"fd603dbbe0e61ef4ad9ccc9a830eaeb3d054fd42","original_commit_id":"fd603dbbe0e61ef4ad9ccc9a830eaeb3d054fd42","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"'$node' is not defined.","created_at":"2015-11-06T03:16:29Z","updated_at":"2015-11-06T03:16:29Z","html_url":"https://github.com/kni-labs/knapsack/pull/3#discussion_r44099866","pull_request_url":"https://api.github.com/repos/kni-labs/knapsack/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/kni-labs/knapsack/pulls/comments/44099866"},"html":{"href":"https://github.com/kni-labs/knapsack/pull/3#discussion_r44099866"},"pull_request":{"href":"https://api.github.com/repos/kni-labs/knapsack/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/kni-labs/knapsack/pulls/3","id":49911785,"html_url":"https://github.com/kni-labs/knapsack/pull/3","diff_url":"https://github.com/kni-labs/knapsack/pull/3.diff","patch_url":"https://github.com/kni-labs/knapsack/pull/3.patch","issue_url":"https://api.github.com/repos/kni-labs/knapsack/issues/3","number":3,"state":"open","locked":false,"title":"Sassdoc","user":{"login":"dbox","id":296130,"avatar_url":"https://avatars.githubusercontent.com/u/296130?v=3","gravatar_id":"","url":"https://api.github.com/users/dbox","html_url":"https://github.com/dbox","followers_url":"https://api.github.com/users/dbox/followers","following_url":"https://api.github.com/users/dbox/following{/other_user}","gists_url":"https://api.github.com/users/dbox/gists{/gist_id}","starred_url":"https://api.github.com/users/dbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbox/subscriptions","organizations_url":"https://api.github.com/users/dbox/orgs","repos_url":"https://api.github.com/users/dbox/repos","events_url":"https://api.github.com/users/dbox/events{/privacy}","received_events_url":"https://api.github.com/users/dbox/received_events","type":"User","site_admin":false},"body":"adds sassdoc :tada: ","created_at":"2015-11-06T03:16:15Z","updated_at":"2015-11-06T03:16:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5da3a2981b3523914117fc49991de4c9e65be63d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kni-labs/knapsack/pulls/3/commits","review_comments_url":"https://api.github.com/repos/kni-labs/knapsack/pulls/3/comments","review_comment_url":"https://api.github.com/repos/kni-labs/knapsack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kni-labs/knapsack/issues/3/comments","statuses_url":"https://api.github.com/repos/kni-labs/knapsack/statuses/fd603dbbe0e61ef4ad9ccc9a830eaeb3d054fd42","head":{"label":"kni-labs:sassdoc","ref":"sassdoc","sha":"fd603dbbe0e61ef4ad9ccc9a830eaeb3d054fd42","user":{"login":"kni-labs","id":6674796,"avatar_url":"https://avatars.githubusercontent.com/u/6674796?v=3","gravatar_id":"","url":"https://api.github.com/users/kni-labs","html_url":"https://github.com/kni-labs","followers_url":"https://api.github.com/users/kni-labs/followers","following_url":"https://api.github.com/users/kni-labs/following{/other_user}","gists_url":"https://api.github.com/users/kni-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/kni-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kni-labs/subscriptions","organizations_url":"https://api.github.com/users/kni-labs/orgs","repos_url":"https://api.github.com/users/kni-labs/repos","events_url":"https://api.github.com/users/kni-labs/events{/privacy}","received_events_url":"https://api.github.com/users/kni-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":43963092,"name":"knapsack","full_name":"kni-labs/knapsack","owner":{"login":"kni-labs","id":6674796,"avatar_url":"https://avatars.githubusercontent.com/u/6674796?v=3","gravatar_id":"","url":"https://api.github.com/users/kni-labs","html_url":"https://github.com/kni-labs","followers_url":"https://api.github.com/users/kni-labs/followers","following_url":"https://api.github.com/users/kni-labs/following{/other_user}","gists_url":"https://api.github.com/users/kni-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/kni-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kni-labs/subscriptions","organizations_url":"https://api.github.com/users/kni-labs/orgs","repos_url":"https://api.github.com/users/kni-labs/repos","events_url":"https://api.github.com/users/kni-labs/events{/privacy}","received_events_url":"https://api.github.com/users/kni-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kni-labs/knapsack","description":"A handy Sass Grab bag - http://kni-labs.github.io/knapsack/","fork":false,"url":"https://api.github.com/repos/kni-labs/knapsack","forks_url":"https://api.github.com/repos/kni-labs/knapsack/forks","keys_url":"https://api.github.com/repos/kni-labs/knapsack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kni-labs/knapsack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kni-labs/knapsack/teams","hooks_url":"https://api.github.com/repos/kni-labs/knapsack/hooks","issue_events_url":"https://api.github.com/repos/kni-labs/knapsack/issues/events{/number}","events_url":"https://api.github.com/repos/kni-labs/knapsack/events","assignees_url":"https://api.github.com/repos/kni-labs/knapsack/assignees{/user}","branches_url":"https://api.github.com/repos/kni-labs/knapsack/branches{/branch}","tags_url":"https://api.github.com/repos/kni-labs/knapsack/tags","blobs_url":"https://api.github.com/repos/kni-labs/knapsack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kni-labs/knapsack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kni-labs/knapsack/git/refs{/sha}","trees_url":"https://api.github.com/repos/kni-labs/knapsack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kni-labs/knapsack/statuses/{sha}","languages_url":"https://api.github.com/repos/kni-labs/knapsack/languages","stargazers_url":"https://api.github.com/repos/kni-labs/knapsack/stargazers","contributors_url":"https://api.github.com/repos/kni-labs/knapsack/contributors","subscribers_url":"https://api.github.com/repos/kni-labs/knapsack/subscribers","subscription_url":"https://api.github.com/repos/kni-labs/knapsack/subscription","commits_url":"https://api.github.com/repos/kni-labs/knapsack/commits{/sha}","git_commits_url":"https://api.github.com/repos/kni-labs/knapsack/git/commits{/sha}","comments_url":"https://api.github.com/repos/kni-labs/knapsack/comments{/number}","issue_comment_url":"https://api.github.com/repos/kni-labs/knapsack/issues/comments{/number}","contents_url":"https://api.github.com/repos/kni-labs/knapsack/contents/{+path}","compare_url":"https://api.github.com/repos/kni-labs/knapsack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kni-labs/knapsack/merges","archive_url":"https://api.github.com/repos/kni-labs/knapsack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kni-labs/knapsack/downloads","issues_url":"https://api.github.com/repos/kni-labs/knapsack/issues{/number}","pulls_url":"https://api.github.com/repos/kni-labs/knapsack/pulls{/number}","milestones_url":"https://api.github.com/repos/kni-labs/knapsack/milestones{/number}","notifications_url":"https://api.github.com/repos/kni-labs/knapsack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kni-labs/knapsack/labels{/name}","releases_url":"https://api.github.com/repos/kni-labs/knapsack/releases{/id}","created_at":"2015-10-09T15:09:27Z","updated_at":"2015-11-06T03:04:15Z","pushed_at":"2015-11-06T03:16:15Z","git_url":"git://github.com/kni-labs/knapsack.git","ssh_url":"git@github.com:kni-labs/knapsack.git","clone_url":"https://github.com/kni-labs/knapsack.git","svn_url":"https://github.com/kni-labs/knapsack","homepage":"","size":176,"stargazers_count":3,"watchers_count":3,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"kni-labs:master","ref":"master","sha":"6cf62efae288bae1b9da9443ff0efb8797f4c49d","user":{"login":"kni-labs","id":6674796,"avatar_url":"https://avatars.githubusercontent.com/u/6674796?v=3","gravatar_id":"","url":"https://api.github.com/users/kni-labs","html_url":"https://github.com/kni-labs","followers_url":"https://api.github.com/users/kni-labs/followers","following_url":"https://api.github.com/users/kni-labs/following{/other_user}","gists_url":"https://api.github.com/users/kni-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/kni-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kni-labs/subscriptions","organizations_url":"https://api.github.com/users/kni-labs/orgs","repos_url":"https://api.github.com/users/kni-labs/repos","events_url":"https://api.github.com/users/kni-labs/events{/privacy}","received_events_url":"https://api.github.com/users/kni-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":43963092,"name":"knapsack","full_name":"kni-labs/knapsack","owner":{"login":"kni-labs","id":6674796,"avatar_url":"https://avatars.githubusercontent.com/u/6674796?v=3","gravatar_id":"","url":"https://api.github.com/users/kni-labs","html_url":"https://github.com/kni-labs","followers_url":"https://api.github.com/users/kni-labs/followers","following_url":"https://api.github.com/users/kni-labs/following{/other_user}","gists_url":"https://api.github.com/users/kni-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/kni-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kni-labs/subscriptions","organizations_url":"https://api.github.com/users/kni-labs/orgs","repos_url":"https://api.github.com/users/kni-labs/repos","events_url":"https://api.github.com/users/kni-labs/events{/privacy}","received_events_url":"https://api.github.com/users/kni-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kni-labs/knapsack","description":"A handy Sass Grab bag - http://kni-labs.github.io/knapsack/","fork":false,"url":"https://api.github.com/repos/kni-labs/knapsack","forks_url":"https://api.github.com/repos/kni-labs/knapsack/forks","keys_url":"https://api.github.com/repos/kni-labs/knapsack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kni-labs/knapsack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kni-labs/knapsack/teams","hooks_url":"https://api.github.com/repos/kni-labs/knapsack/hooks","issue_events_url":"https://api.github.com/repos/kni-labs/knapsack/issues/events{/number}","events_url":"https://api.github.com/repos/kni-labs/knapsack/events","assignees_url":"https://api.github.com/repos/kni-labs/knapsack/assignees{/user}","branches_url":"https://api.github.com/repos/kni-labs/knapsack/branches{/branch}","tags_url":"https://api.github.com/repos/kni-labs/knapsack/tags","blobs_url":"https://api.github.com/repos/kni-labs/knapsack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kni-labs/knapsack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kni-labs/knapsack/git/refs{/sha}","trees_url":"https://api.github.com/repos/kni-labs/knapsack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kni-labs/knapsack/statuses/{sha}","languages_url":"https://api.github.com/repos/kni-labs/knapsack/languages","stargazers_url":"https://api.github.com/repos/kni-labs/knapsack/stargazers","contributors_url":"https://api.github.com/repos/kni-labs/knapsack/contributors","subscribers_url":"https://api.github.com/repos/kni-labs/knapsack/subscribers","subscription_url":"https://api.github.com/repos/kni-labs/knapsack/subscription","commits_url":"https://api.github.com/repos/kni-labs/knapsack/commits{/sha}","git_commits_url":"https://api.github.com/repos/kni-labs/knapsack/git/commits{/sha}","comments_url":"https://api.github.com/repos/kni-labs/knapsack/comments{/number}","issue_comment_url":"https://api.github.com/repos/kni-labs/knapsack/issues/comments{/number}","contents_url":"https://api.github.com/repos/kni-labs/knapsack/contents/{+path}","compare_url":"https://api.github.com/repos/kni-labs/knapsack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kni-labs/knapsack/merges","archive_url":"https://api.github.com/repos/kni-labs/knapsack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kni-labs/knapsack/downloads","issues_url":"https://api.github.com/repos/kni-labs/knapsack/issues{/number}","pulls_url":"https://api.github.com/repos/kni-labs/knapsack/pulls{/number}","milestones_url":"https://api.github.com/repos/kni-labs/knapsack/milestones{/number}","notifications_url":"https://api.github.com/repos/kni-labs/knapsack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kni-labs/knapsack/labels{/name}","releases_url":"https://api.github.com/repos/kni-labs/knapsack/releases{/id}","created_at":"2015-10-09T15:09:27Z","updated_at":"2015-11-06T03:04:15Z","pushed_at":"2015-11-06T03:16:15Z","git_url":"git://github.com/kni-labs/knapsack.git","ssh_url":"git@github.com:kni-labs/knapsack.git","clone_url":"https://github.com/kni-labs/knapsack.git","svn_url":"https://github.com/kni-labs/knapsack","homepage":"","size":176,"stargazers_count":3,"watchers_count":3,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kni-labs/knapsack/pulls/3"},"html":{"href":"https://github.com/kni-labs/knapsack/pull/3"},"issue":{"href":"https://api.github.com/repos/kni-labs/knapsack/issues/3"},"comments":{"href":"https://api.github.com/repos/kni-labs/knapsack/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/kni-labs/knapsack/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/kni-labs/knapsack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kni-labs/knapsack/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/kni-labs/knapsack/statuses/fd603dbbe0e61ef4ad9ccc9a830eaeb3d054fd42"}}}}