This page demonstrates the company announcement popup functionality
The CG Company popup displays promotional information with a responsive design that works on all devices.
Key features:
Simulate different websites to test domain-specific popup configurations:
Current simulated domain: default
The popup is configured to only appear on specific domains:
Note: Domain restrictions are ignored in this test environment.
Tests the rate limiting functionality that prevents popup abuse.
Tests the input sanitization for domain values.
Tests the secure session management functionality.
Tests CSP violation detection.
Add this popup to your website with a single script tag in your page's <head>
section:
<script src="https://popup-api.web.app/dist/company-popup.min.js"></script>
For multiple websites, the script automatically detects the domain and uses the appropriate configuration.
For enhanced security, include these additional modules:
<!-- Security modules -->
<script src="https://popup-api.web.app/dist/security-utils.js"></script>
<script src="https://popup-api.web.app/dist/rate-limiter.js"></script>
<script src="https://popup-api.web.app/dist/content-security.js"></script>
<script src="https://popup-api.web.app/dist/api-handler.js"></script>
<!-- Initialize security modules -->
<script>
document.addEventListener('DOMContentLoaded', function() {
try {
// Initialize security components
if (window.SecurityUtils) window.SecurityUtils.init();
if (window.RateLimiter) window.RateLimiter.init();
if (window.ContentSecurity) window.ContentSecurity.init();
if (window.ApiHandler) window.ApiHandler.init();
} catch (e) {
console.error('Error initializing security modules:', e);
}
});
</script>
Back to Docs