diff --git a/icon/icon.svg b/icon/icon.svg new file mode 100644 index 0000000..f5debb6 --- /dev/null +++ b/icon/icon.svg @@ -0,0 +1,69 @@ + + diff --git a/js/main.js b/js/main.js index ddc8af7..6417680 100644 --- a/js/main.js +++ b/js/main.js @@ -49,14 +49,20 @@ function wrapInner(parent, wrapper, attribute, attributevalue) { } } +function wrapInner(parent, wrapper, className) { + if (typeof wrapper === "string") + wrapper = document.createElement(wrapper); + wrapper.classList.add(className); + var div = parent.appendChild(wrapper); + + while(parent.firstChild !== wrapper) + wrapper.appendChild(parent.firstChild); +} -// Wrap the insides of the
tags in tags for highlight.js
function wrapPre() {
for(let el of document.querySelectorAll('pre')) {
- let orig = el.innerHTML;
-
- el.innerHTML = '' + orig + "
";
+ wrapInner(el, 'code', 'lisp');
}
}
diff --git a/manifest.json b/manifest.json
index 7740d9a..12741e3 100644
--- a/manifest.json
+++ b/manifest.json
@@ -6,7 +6,8 @@
"description": "Adds a simple table of contents and syntax highlighting to the web version of Practical Common Lisp by Peter Seibel.",
"icons": {
- "48": "icons/border-48.png"
+ "48": "./icon/icon.svg",
+ "96": "./icon/icon.svg"
},
"background": {