Add 'submodules/AsyncDisplayKit/' from commit '02bedc12816e251ad71777f9d2578329b6d2bef6'

git-subtree-dir: submodules/AsyncDisplayKit
git-subtree-mainline: d06f423e0e
git-subtree-split: 02bedc1281
This commit is contained in:
Peter
2019-06-11 18:42:43 +01:00
2160 changed files with 232035 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
[].slice.apply(
document.querySelectorAll(
'article h2, article h3, article h4'
)
).forEach(function(header) {
var slug = header.innerText
.toLowerCase()
.replace(/[^a-z0-9]/g, '-')
.replace(/-+/g, '-')
.replace(/^-|-$/g, '');
var hashref = document.createElement('a');
hashref.id = slug;
hashref.className = 'hashref';
header.appendChild(hashref);
var hash = document.createElement('a');
hash.className = 'hash';
hash.href = '#' + slug;
hash.innerText = '#';
header.appendChild(hash);
});