From 29653747cf03554570b3ad8a68a0e458c4a76cef Mon Sep 17 00:00:00 2001 From: bhsd <2545473905@qq.com> Date: Thu, 14 Dec 2023 03:39:29 +0800 Subject: [PATCH] fix(gh-page.ts): fix input id --- extensions/dist/gh-page.js | 4 ++-- extensions/gh-page.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/dist/gh-page.js b/extensions/dist/gh-page.js index e2b8ff5e2..5fbe29e92 100644 --- a/extensions/dist/gh-page.js +++ b/extensions/dist/gh-page.js @@ -9,8 +9,8 @@ import { CodeMirror6 } from 'https://testingcf.jsdelivr.net/npm/@bhsd/codemirror }); const textbox2 = document.querySelector('#wpTextbox2'), input2 = document.querySelector('#wpInclude2'), instance = new CodeMirror6(textbox2), Linter = new wikiparse.Linter(input2.checked); instance.lint((view) => Linter.codemirror(view.state.doc.toString())); - input.addEventListener('change', () => { - Linter.include = input.checked; + input2.addEventListener('change', () => { + Linter.include = input2.checked; instance.update(); }); })(); diff --git a/extensions/gh-page.ts b/extensions/gh-page.ts index d13316aa7..68d0d446d 100644 --- a/extensions/gh-page.ts +++ b/extensions/gh-page.ts @@ -21,8 +21,8 @@ import type {wikiparse, EditorView} from './typings'; instance = new CodeMirror6(textbox2), Linter = new wikiparse.Linter!(input2.checked); instance.lint((view: EditorView) => Linter.codemirror(view.state.doc.toString())); - input.addEventListener('change', () => { - Linter.include = input.checked; + input2.addEventListener('change', () => { + Linter.include = input2.checked; instance.update(); }); })();