make build# Copy Chrome manifest to dist/
cp manifests/manifest-chrome-v3.json dist/manifest.json- Open Chrome
- Go to
chrome://extensions/ - Enable "Developer mode" (toggle in top-right corner)
- Click "Load unpacked"
- Select the
dist/folder from this project - Extension icon should appear in toolbar
- Visit any website (e.g., https://example.com)
- Add text with meme values:
- Type "69" somewhere → should show ♋︎
- Type "420" → should show 🌿
- Type "666" → should show 😈
- Click extension icon to open popup
- Try toggle enable/disable
- Try "Reset" button
- Right-click extension icon → "Inspect popup" (for popup console)
- F12 on any page → Check content script logs
chrome://extensions/→ Click "background page" (for background logs)
make build# Copy Firefox manifest to dist/
cp manifests/manifest-firefox.json dist/manifest.json- Open Firefox
- Go to
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on"
- Navigate to
dist/folder - Select
manifest.json - Extension loads temporarily (until browser restart)
- Visit websites with meme values
- Check console logs
- Test popup functionality
Create a test HTML file to verify replacements:
cat > test-page.html << 'HTML'
<!DOCTYPE html>
<html>
<head>
<title>Meme Extension Test Page</title>
</head>
<body>
<h1>Test Meme Replacements</h1>
<h2>Should Replace:</h2>
<p>This number 69 should become an emoji.</p>
<p>The number 420 is also a meme.</p>
<p>Error code 666 occurred.</p>
<p>1337 hackers know this.</p>
<h2>Should NOT Replace:</h2>
<p>The year 1969 contains 69 but as part of larger number.</p>
<input type="text" value="69" placeholder="Input with 69">
<textarea>420 in textarea should not change</textarea>
<dialog open>
<p>Dialog with 69 should NOT be replaced</p>
</dialog>
<div class="modal">
<p>Modal with 420 should NOT be replaced</p>
</div>
<h2>Complex HTML:</h2>
<article>
<p>Post with <strong>69</strong> upvotes and <em>420</em> comments.</p>
<p>Code: <code>666</code> - Technical: 1337</p>
</article>
</body>
</html>
HTMLThen open test-page.html in browser with extension loaded.
- Check console for errors:
chrome://extensions/→ "Errors" button - Verify manifest.json is in dist/
- Make sure all files (content.js, background.js, popup.html) are in dist/
- Open DevTools (F12) → Console tab
- Look for "Meme Icon Extension: initializing"
- Check for errors in console
- Try clicking extension icon → "Reset" button
- Check if popup.html exists in dist/
- Right-click icon → "Inspect popup" to see errors
- Verify manifest.json has "action" field
- Check if site is excluded (chrome://, about://, etc)
- Look in DevTools → Sources → Content Scripts
- Refresh the page after loading extension
Open DevTools console on any page and try:
// Check if extension loaded
console.log('Extension active');
// Manually test replacement
const testText = document.createElement('p');
testText.textContent = 'Test 69 and 420 here';
document.body.appendChild(testText);
// After a moment, text should be replacedTest on large DOMs:
// Create many elements
for (let i = 0; i < 100; i++) {
const p = document.createElement('p');
p.textContent = `Item ${i} with 69 and 420`;
document.body.appendChild(p);
}
// Check console for processing time
// Should complete in < 500ms- ✅ GitHub - Test on issue comments
- ✅ Reddit - Test on post content
- ✅ Medium - Test on articles
- ✅ Twitter/X - Test on tweets
- ✅ MDN - Test on documentation
- ✅ Text replaces correctly
- ✅ Input fields NOT affected
- ✅ Dialogs NOT affected
- ✅ Page performance not impacted
- ✅ No console errors
When you modify code:
-
Rebuild:
make build
-
Reload extension:
- Chrome: Go to
chrome://extensions/→ Click reload icon - Firefox: Go to
about:debugging→ Click "Reload"
- Chrome: Go to
-
Refresh test page:
- Press Ctrl+R (or Cmd+R on Mac)
- Extension will re-inject
Once local testing works:
- Test on multiple websites
- Verify browser compatibility
- Check performance on slow connections
- Test with different screen sizes (popup responsive)
- Package for production:
make build-chrome