Company Popup - Test Page

This page demonstrates the company announcement popup functionality

About the Popup

The CG Company popup displays promotional information with a responsive design that works on all devices.

Key features:

  • Responsive design (mobile, tablet, desktop)
  • Customizable timing and appearance
  • Session-based display controls
  • Simple single-script implementation
  • Lightweight (under 10KB)
  • New: Domain-specific configurations
  • New: Enhanced security with Content Security Policy
  • New: Input validation and sanitization
  • New: Rate limiting and abuse prevention
  • New: Secure session management

Test Different Configurations

Simulate different websites to test domain-specific popup configurations:

Current simulated domain: default

Domain Restrictions

The popup is configured to only appear on specific domains:

  • Default: Only on popup-api.web.app
  • AYYO: On anushshetty.com, www.anushshetty.com
  • WD IO: On webdevio.com, www.webdevio.com
  • WWPS: On wwprosolutions.com, www.wwprosolutions.com
  • Chandler KBS: On chandlerkbs.com, www.chandlerkbs.com

Note: Domain restrictions are ignored in this test environment.

Test Controls

Security Features

Rate Limiting

Tests the rate limiting functionality that prevents popup abuse.

Input Validation

Tests the input sanitization for domain values.

Session Management

Tests the secure session management functionality.

Content Security Policy

Tests CSP violation detection.

Implementation

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.

Enhanced Security Implementation

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