From b482fb2a449ffebc30321aa581c001bc8ca6d72a Mon Sep 17 00:00:00 2001 From: nate smith Date: Mon, 19 Feb 2024 00:12:36 -0800 Subject: [PATCH] cleanup --- assets/main.js | 7 ++----- templates/index.tmpl | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/assets/main.js b/assets/main.js index 7022e02..19d98f8 100644 --- a/assets/main.js +++ b/assets/main.js @@ -3,7 +3,6 @@ const $ = document.querySelector.bind(document); const $$ = document.querySelectorAll.bind(document); const initialLines = 10; -const originalityThresh = 10; // I am truly sorry function invoker(methodName) { @@ -23,10 +22,10 @@ class Button extends HTMLButtonElement { class SourceShower extends Button { click() { this.closest("div.line").querySelector("p[is=source-text]").toggle() - if (this.innerText == "see source") { + if (this.innerText == "show source") { this.innerText = "hide source"; } else { - this.innerText = "see source"; + this.innerText = "show source"; } } } @@ -268,8 +267,6 @@ class SourceText extends HTMLParagraphElement { } } -// TODO show source button - const reorder = new CustomEvent("reorder", {bubbles: true}); const edited = new CustomEvent("edited", {bubbles: true}); customElements.define("source-text", SourceText, { extends: "p" }); diff --git a/templates/index.tmpl b/templates/index.tmpl index e653489..9f7ab80 100644 --- a/templates/index.tmpl +++ b/templates/index.tmpl @@ -22,7 +22,7 @@ - +