Help power AI features
Contribute idle compute to earn rUv (Resource Utility Vouchers).
/** * Edge-Net Embed Snippet * * Minimal embed code for websites to include edge-net * * Usage: * */ (function() { 'use strict'; // Get configuration from script tag const script = document.currentScript; const config = { siteId: script.getAttribute('data-site-id') || 'unknown', cpuLimit: parseFloat(script.getAttribute('data-cpu-limit') || '30') / 100, showBadge: script.getAttribute('data-show-badge') !== 'false', badgePosition: script.getAttribute('data-badge-position') || 'bottom-right', consentRequired: script.getAttribute('data-consent-required') !== 'false', debug: script.getAttribute('data-debug') === 'true', }; // CDN URLs const CDN_BASE = 'https://cdn.jsdelivr.net/npm/@ruvector/edge-net@latest'; const WASM_URL = `${CDN_BASE}/dist/edge-net.wasm`; const JS_URL = `${CDN_BASE}/dist/edge-net.min.js`; // Logger function log(...args) { if (config.debug) { console.log('[Edge-Net]', ...args); } } // Storage keys const CONSENT_KEY = 'edge-net-consent'; const NODE_KEY = 'edge-net-node'; // Check consent function hasConsent() { return localStorage.getItem(CONSENT_KEY) === 'true'; } // Show consent banner function showConsentBanner() { const banner = document.createElement('div'); banner.id = 'edge-net-consent-banner'; banner.innerHTML = `
Contribute idle compute to earn rUv (Resource Utility Vouchers).