Let gutenberg generate the table of contents

Remove the javascript toc code.
This commit is contained in:
Philipp Oppermann
2017-10-05 11:37:23 +02:00
parent bba3c52ff3
commit dae2edfbf5
3 changed files with 19 additions and 25 deletions

View File

@@ -2,22 +2,6 @@ window.onload = function() {
var container = document.querySelector('#toc');
if (container != null) {
var toc = initTOC({
selector: 'h2, h3',
scope: 'main',
overwrite: false,
prefix: 'toc'
});
toc.innerHTML = toc.innerHTML.split("🔗\n").join("");
var heading = document.createElement("H2");
var heading_text = document.createTextNode("Table of Contents");
heading.appendChild(heading_text);
container.appendChild(heading);
container.appendChild(toc);
resize_toc(container);
}
}