Skip to content

Commit

Permalink
Add changelog integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Sep 3, 2016
1 parent 4333a5e commit 258ed79
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
22 changes: 19 additions & 3 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,25 @@ function ready (fn) {
}
}

ready(function () {
var links = document.querySelectorAll('.markdown-body a')
links.forEach(function (link) {
function addChangelog (el) {
window.HW_config = {
selector: '.link-index',
account: 'xGn9Ay'
}

var script = document.createElement('script')
script.async = true
script.src = 'https://cdn.headwayapp.co/widget.js'
el.appendChild(script)
}

function addExternalLinks (elements) {
elements.forEach(function (link) {
link.setAttribute('target', '_blank')
})
}

ready(function () {
addChangelog(document.querySelector('head'))
addExternalLinks(document.querySelectorAll('.markdown-body a'))
})
4 changes: 4 additions & 0 deletions assets/scss/_changelog.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
html #HW_badge {
top: 2px;
left: 8px;
}
1 change: 1 addition & 0 deletions assets/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
@import "mixins";
@import "markdown";
@import "comments";
@import "changelog";
@import "mobile";

0 comments on commit 258ed79

Please sign in to comment.