Skip to content

Commit 9f57411

Browse files
committed
remove debugging stuff
1 parent ee1baca commit 9f57411

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

src/components/CopyMarkdown.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ function CopyMarkdown() {
1919
const buttonRef = useRef(null);
2020
const dropdownRef = useRef(null);
2121

22-
console.log('CopyMarkdown component mounted');
23-
2422
// Toggle dropdown
2523
const toggleDropdown = useCallback(() => {
2624
setIsOpen(prev => !prev);
@@ -140,30 +138,13 @@ function CopyMarkdown() {
140138

141139
// Initialize on client side
142140
useEffect(() => {
143-
// More detailed debugging
144-
const h1Elements = document.querySelectorAll('h1');
145-
console.log('Found h1 elements:', h1Elements);
146-
h1Elements.forEach(el => {
147-
console.log('H1 element:', el);
148-
console.log('H1 text content:', el.textContent);
149-
console.log('H1 parent element:', el.parentElement);
150-
console.log('Full element tree:', el.closest('article'));
151-
});
152-
153-
// Check for content in multiple ways
141+
// Check for content
154142
const hasH1 = document.querySelector('h1');
155143
const hasArticle = document.querySelector('article');
156144
const hasMainContent = document.querySelector('main');
157145

158-
console.log('Detection results:', {
159-
hasH1: !!hasH1,
160-
hasArticle: !!hasArticle,
161-
hasMainContent: !!hasMainContent
162-
});
163-
164146
// Set content flag if we have both an h1 and either an article or main element
165147
const hasMarkdownContent = !!hasH1 && (!!hasArticle || !!hasMainContent);
166-
console.log('Setting hasContent to:', hasMarkdownContent);
167148
setHasContent(hasMarkdownContent);
168149

169150
// Set up click outside handler

0 commit comments

Comments
 (0)