
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
sidepanel-fallback
Advanced tools
A lightweight fallback utility for Chrome Extensions to handle side panel conflicts. Provides browser-specific storage and display mode switching with a clean developer API.
A lightweight fallback utility for Chrome Extensions to handle side panel conflicts. Provides browser-specific storage and display mode switching with a clean developer API.
npm install sidepanel-fallback
import { SidepanelFallback } from 'sidepanel-fallback';
// Initialize
const fallback = new SidepanelFallback();
await fallback.init();
// Open panel (auto-detects best method)
await fallback.openPanel('/panel.html');
// Add settings UI
const container = document.getElementById('settings');
await fallback.withSettingsUI(container);
Chrome Extensions with sidepanel functionality face several challenges:
SidepanelFallback solves these issues with a unified API that automatically handles browser detection, fallback logic, and user preferences.
| Browser | Sidepanel | Popup | Auto Mode |
|---|---|---|---|
| Chrome 114+ | ✅ | ✅ | sidepanel |
| Edge 114+ | ✅ | ✅ | sidepanel |
| Firefox | ❌ | ✅ | window |
| Safari | ❌ | ✅ | window |
// Initialize the library
await fallback.init();
// Open a panel
const result = await fallback.openPanel('/panel.html');
// Add settings UI to container
await fallback.withSettingsUI(document.getElementById('settings'));
// Get current configuration
const settings = fallback.getCurrentSettings();
For Chrome Extensions, we provide simplified methods:
// Setup extension configuration
await fallback.setupExtension({
sidepanelPath: 'sidepanel.html',
popupPath: 'popup.html'
});
// Handle action clicks with automatic mode detection
const result = await fallback.handleActionClick();
// Toggle between sidepanel and popup modes
await fallback.toggleMode();
const fallback = new SidepanelFallback({
defaultMode: 'auto', // 'auto', 'sidepanel', 'window'
userAgent: 'custom-ua' // Override browser detection
});
// background.js
import { SidepanelFallback } from 'sidepanel-fallback';
const fallback = new SidepanelFallback();
chrome.action.onClicked.addListener(async () => {
await fallback.init();
const result = await fallback.openPanel('sidepanel.html');
if (result.success) {
console.log(`Panel opened using ${result.method}`);
}
});
// background.js - Simplified API for easier development
import { SidepanelFallback } from 'sidepanel-fallback';
const fallback = new SidepanelFallback({ defaultMode: 'auto' });
// One-time setup
await fallback.setupExtension({
sidepanelPath: 'sidepanel.html',
popupPath: 'popup.html'
});
// Automatic mode handling
chrome.action.onClicked.addListener(async () => {
await fallback.handleActionClick();
});
// app.js
import { SidepanelFallback } from 'sidepanel-fallback';
const fallback = new SidepanelFallback();
await fallback.init();
document.getElementById('open-btn').onclick = () => {
fallback.openPanel('/dashboard.html');
};
A production-ready Chrome Extension example is available in
examples/chrome-extension/ featuring:
npm run build
# Load examples/chrome-extension/ in chrome://extensions/
Actively tested on Node.js 18.x (LTS), 20.x (LTS), and 22.x (Current).
Note: Some advanced test suites are disabled on Node.js 20/22 due to Jest compatibility issues. Core functionality remains fully supported.
npm test # Run core tests
npm run test:full # Run full test suite (Node.js 18 recommended)
git clone https://github.com/touyou/sidepanel-fallback.git
cd sidepanel-fallback
npm install
npm test # Run tests
npm run test:coverage # Run tests with coverage
npm run dev # Start development server
npm run build # Build for production
npm run quality # Run lint + format check
npm run quality:fix # Fix lint + format issues
Built as focused, testable modules:
src/
├── index.js # Main API
├── browserInfo.js # Browser detection
├── modeStorage.js # Settings persistence
├── panelLauncher.js # Panel opening logic
└── settingsUI.js # Settings UI component
We welcome contributions! Please see our Contributing Guide for details.
MIT License - see LICENSE file for details.
Made with ❤️ by touyou
FAQs
A lightweight fallback utility for Chrome Extensions to handle side panel conflicts. Provides browser-specific storage and display mode switching with a clean developer API.
We found that sidepanel-fallback demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.