Added "source" button for template debugging
This commit is contained in:
@@ -46,7 +46,7 @@ body:active #button-bar {
|
||||
}
|
||||
|
||||
.cm-editor {
|
||||
padding-left: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#button-bar button {
|
||||
@@ -56,7 +56,8 @@ body:active #button-bar {
|
||||
color: var(--root-color);
|
||||
}
|
||||
|
||||
#edit-button {
|
||||
#edit-button,
|
||||
#source-button {
|
||||
margin-left: -10px;
|
||||
}
|
||||
|
||||
@@ -68,4 +69,4 @@ li code {
|
||||
iframe {
|
||||
border: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,9 @@ async function init() {
|
||||
document.getElementById("reload-button").addEventListener("click", () => {
|
||||
api({ type: "reload" });
|
||||
});
|
||||
document.getElementById("source-button").addEventListener("click", () => {
|
||||
document.getElementById("body-content").innerText = originalMarkdown;
|
||||
});
|
||||
|
||||
document.querySelectorAll("a[data-ref]").forEach((el) => {
|
||||
el.addEventListener("click", (e) => {
|
||||
|
||||
Reference in New Issue
Block a user