octopress-littlefoot 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/assets/javascripts/littlefoot.js +18 -11
- data/lib/octopress-littlefoot/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acc05be38e8286efff1c13bdd6d8dbdf1f41468d
|
4
|
+
data.tar.gz: 8fddf61dc8b2fcda7f124604172165731fcdf1c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 395b70b8c2b57c9dd88e193d32ba93889311b4281a8b428c668a34c456efc6c3510dabcb242f8ef5a7d5e5774a612966d70591b6e53ae52b61b9c22c5701aa1b
|
7
|
+
data.tar.gz: e969c0aae551ee8dd37aef67cc28e94d48f82e8910612ac5e934ca62a55d54de4c551db5f39abba4be1eb4f77396e6ddf16a36778ad8e5d812cf77132f8b71ea
|
data/CHANGELOG.md
CHANGED
@@ -4,24 +4,31 @@
|
|
4
4
|
initialize: function(){
|
5
5
|
self = this
|
6
6
|
|
7
|
-
document.
|
8
|
-
|
7
|
+
if (document.readyState == 'interactive') {
|
8
|
+
self.setup()
|
9
|
+
} else {
|
10
|
+
document.addEventListener("DOMContentLoaded", function(event) {
|
11
|
+
self.setup()
|
12
|
+
})
|
13
|
+
}
|
9
14
|
|
10
|
-
|
15
|
+
},
|
11
16
|
|
12
|
-
|
13
|
-
|
14
|
-
})
|
17
|
+
setup: function (anchor) {
|
18
|
+
var anchors = document.querySelectorAll("sup[id^=fnref] a")
|
15
19
|
|
16
|
-
|
20
|
+
if (anchors.length > 0) {
|
17
21
|
|
18
|
-
|
19
|
-
|
20
|
-
|
22
|
+
Array.prototype.forEach.call(anchors, function(anchor){
|
23
|
+
self.addFootnote(anchor)
|
24
|
+
})
|
21
25
|
|
26
|
+
document.addEventListener("click", self.click.bind(self))
|
27
|
+
document.querySelector('div.footnotes').remove()
|
28
|
+
}
|
22
29
|
},
|
23
30
|
|
24
|
-
|
31
|
+
addFootnote: function(anchor) {
|
25
32
|
// We want to add the footnote adjacent to the footnote <sup> element
|
26
33
|
var sup = getParent(anchor, 'sup')
|
27
34
|
sup.insertAdjacentHTML('afterend', this.template.wrapper(anchor));
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopress-littlefoot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '1.0'
|
83
|
-
description:
|
83
|
+
description:
|
84
84
|
email:
|
85
85
|
- brandon@imathis.com
|
86
86
|
executables: []
|