UNPKG

client-side-ocr

Version:

High-performance client-side OCR with ONNX Runtime, RapidOCR and PPU PaddleOCR integration. 100+ language support. Process text from images entirely in the browser with state-of-the-art accuracy and complete privacy.

13 lines (11 loc) 430 B
// Service worker registration redirect for GitHub Pages // This file ensures the service worker is available at the correct scope self.addEventListener('install', () => { // Redirect to the actual service worker in the client-ocr subdirectory self.skipWaiting(); }); self.addEventListener('activate', event => { event.waitUntil(clients.claim()); }); // Import the actual service worker importScripts('/client-ocr/sw.js');