From b0232d5473ed7cb2f8183171af9af3eefb4e5726 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 2 Dec 2025 20:17:45 -0500 Subject: [PATCH] Make sidenotes unselectable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- kjvstudy_org/templates/chapter.html | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/kjvstudy_org/templates/chapter.html b/kjvstudy_org/templates/chapter.html index caa7926..b413b5a 100644 --- a/kjvstudy_org/templates/chapter.html +++ b/kjvstudy_org/templates/chapter.html @@ -47,6 +47,7 @@ cursor: pointer; transition: all 0.3s ease; position: relative; + user-select: none; } label.sidenote-number { @@ -733,22 +734,11 @@ document.addEventListener('DOMContentLoaded', function() { }); // Clean copied text to exclude sidenotes, verse numbers, and margin elements - // But allow copying if selection is entirely within a sidenote document.addEventListener('copy', function(e) { const selection = window.getSelection(); if (!selection.rangeCount) return; const range = selection.getRangeAt(0); - - // Check if selection is entirely within a sidenote or marginnote - const container = range.commonAncestorContainer; - const parentEl = container.nodeType === Node.TEXT_NODE ? container.parentElement : container; - if (parentEl && parentEl.closest('.sidenote, .marginnote')) { - // Allow normal copy behavior for sidenote content - return; - } - - // Create a document fragment from the selection const fragment = range.cloneContents(); // Create a temporary container