Ryan Malloy 7d97fc3e3b test: add react-devtools-demo extension artifacts from testing session
Generated during browser_install_popular_extension testing to verify
Chrome extension functionality works correctly.

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-22 00:03:28 -06:00

51 lines
1.5 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// React DevTools Hook (Demo Version)
console.log('⚛️ React DevTools Demo Hook loaded');
// Simulate React DevTools hook detection
(function() {
// Add React detection indicator
if (typeof window !== 'undefined') {
// Check if React is present
const hasReact = !!(
window.React ||
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ ||
document.querySelector('[data-reactroot]') ||
document.querySelector('script[src*="react"]')
);
if (hasReact) {
console.log('⚛️ React detected! DevTools would be active');
// Add visual indicator
const indicator = document.createElement('div');
indicator.style.cssText = `
position: fixed;
top: 50px;
right: 10px;
background: #61dafb;
color: #20232a;
padding: 8px 12px;
border-radius: 8px;
font-family: monospace;
font-size: 12px;
font-weight: bold;
z-index: 9999;
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
border: 2px solid #20232a;
`;
indicator.textContent = '⚛️ React DevTools Active';
indicator.id = 'react-devtools-indicator';
// Add when DOM is ready
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', () => {
document.body.appendChild(indicator);
});
} else {
document.body.appendChild(indicator);
}
} else {
console.log(' No React detected on this page');
}
}
})();