From 4a0d03f445a5679aa80b52090d1ad2c145fc3663 Mon Sep 17 00:00:00 2001 From: adrien Date: Mon, 23 Oct 2023 09:16:46 +0200 Subject: [PATCH] add color picker --- js/sudoku.js | 9 +++++++++ sudoku.php | 1 + 2 files changed, 10 insertions(+) diff --git a/js/sudoku.js b/js/sudoku.js index bf7fab5..73a994a 100755 --- a/js/sudoku.js +++ b/js/sudoku.js @@ -172,6 +172,9 @@ function oninput() { this.previousPlaceholder = this.placeholder refreshBox(this) } + if (penColor) { + this.style.setProperty("color", penColor) + } } function refreshBox(box) { @@ -321,6 +324,12 @@ function insert(radio) { } } +let penColor + +function changeColor() { + penColor = colorPicker.value +} + function undo() { if (history.length) { const previousState = history.pop() diff --git a/sudoku.php b/sudoku.php index 2b5423b..dd685c2 100755 --- a/sudoku.php +++ b/sudoku.php @@ -24,6 +24,7 @@ +