Removed shit.

This commit is contained in:
retoor 2025-01-11 00:21:45 +01:00
parent 090f72df98
commit 1ebad9ad57

View File

@ -833,18 +833,10 @@ class Sudoku extends HTMLElement {
customElements.define("my-sudoku", Sudoku); customElements.define("my-sudoku", Sudoku);
function generateIdByPosition(element) { function generateIdByPosition(element) {
// Get the parent element
const parent = element.parentNode; const parent = element.parentNode;
// Get the index of the element within its parent
const index = Array.prototype.indexOf.call(parent.children, element); const index = Array.prototype.indexOf.call(parent.children, element);
// Generate a unique ID using the tag name and index
const generatedId = `${element.tagName.toLowerCase()}-${index}`; const generatedId = `${element.tagName.toLowerCase()}-${index}`;
// Assign the generated ID to the element
element.id = generatedId.replace('div-', 'session-key-'); element.id = generatedId.replace('div-', 'session-key-');
return element.id; return element.id;
} }