A browser extension and bookmarklet implementation that provides contextual access to KERI/SSI terminology definitions by parsing web page content and displaying interactive glossary lookups from the KERISSE unified dictionary.
Related Concepts
No related concepts available
Comprehensive Explanation
kerific
Implementation Overview
kerific is a JavaScript-based browser tool implemented in two distribution forms: a bookmarklet and a Chrome Web Store extension. The implementation serves as an educational accessibility layer for the KERI Suite and broader Self-Sovereign Identity (SSI) ecosystem by providing real-time, contextual terminology lookups while users browse web content.
The tool is specifically designed to bridge the gap between technical documentation and reader comprehension by automatically identifying KERI/SSI terms in web page text and offering immediate access to authoritative definitions from multiple glossary sources. This implementation is part of the broader WebOfTrust documentation ecosystem, working in conjunction with KERISSE (KERI Suite Search Engine) and the unified SSI dictionary.
Programming Language and Technology Stack
kerific is implemented in vanilla JavaScript with accompanying CSS for styling. The implementation uses:
Client-side JavaScript for DOM manipulation and term matching
CSS for button styling and definition display
GitHub Pages hosting for the core script and stylesheet files
Chrome Extension API for the browser extension variant
The architecture is intentionally lightweight to minimize performance impact on host web pages and ensure broad compatibility across different website contexts.
Purpose and Scope
The primary purpose of kerific is to for developers, implementers, and researchers working with KERI-related technologies. Rather than requiring users to maintain separate glossary tabs or interrupt their reading flow to look up unfamiliar terms, kerific embeds this functionality directly into the browsing experience.
Implementation Notes
Critical Implementation Details
Dual Distribution Strategy
The bookmarklet and extension dual approach addresses a fundamental tension in browser-based tools:
Bookmarklet advantages: Instant updates, zero installation friction, cross-browser compatibility
Bookmarklet limitations: Blocked by Content Security Policy on many modern websites
Term identification: Parsing web page text to identify KERI/SSI terminology
Definition retrieval: Accessing the unified glossary JSON data structure
UI presentation: Displaying interactive buttons and definition popups
Multi-source aggregation: Presenting definitions from multiple authoritative glossaries
Relationship to Protocol Specifications
kerific is not a protocol implementation but rather a documentation accessibility tool. It does not implement KERI protocol operations, CESR encoding, or ACDC credential processing. Instead, it serves as a companion tool that helps users understand the terminology used in protocol specifications, implementation documentation, and technical discussions.
The tool's relationship to specifications is indirect but valuable: by making terminology more accessible, it lowers barriers to understanding formal specifications and implementation guides for the KERI Suite.
Key Features & Capabilities
Dual Distribution Model
kerific's most distinctive architectural feature is its dual distribution strategy, which addresses different user needs and technical constraints:
Bookmarklet Implementation
The bookmarklet variant provides:
Zero-installation access: Users drag a JavaScript link to their bookmarks bar
On-demand activation: Click the bookmark to inject kerific into the current page
Rapid updates: Changes to the hosted JavaScript are immediately available to all users
Cross-browser compatibility: Works in any browser supporting JavaScript bookmarklets
The bookmarklet operates by injecting two elements into the host page:
A <script> tag loading index.js from weboftrust.github.io/kerific/
A <link> tag loading index.css for styling
The implementation includes duplicate prevention logic that checks for existing kerific instances (identified by the unique ID kerific-83450285767488) and removes them before injection, ensuring clean re-activation.
Limitation: The bookmarklet approach is blocked on websites with strict Content Security Policy (CSP) headers that prohibit inline script execution or external script loading.
Chrome Extension Implementation
The Chrome Web Store extension addresses the CSP limitation:
CSP bypass: Extension permissions allow script injection even on CSP-protected sites
Persistent availability: No need to click a bookmark for each page
Browser integration: Appears in the browser's extension toolbar
Chromium compatibility: Works in Chrome, Brave, Edge, and other Chromium-based browsers
Trade-off: Extension updates require Chrome Web Store approval, introducing approximately 24-hour delays for new versions. This makes the extension less agile than the bookmarklet for rapid iteration.
Term Matching and Identification
The core functionality revolves around intelligent term matching against the unified SSI dictionary. The implementation:
Parses web page text: Scans paragraph content for potential terminology matches
Matches against dictionary: Compares identified words/phrases against the JSON glossary database
Handles aliases: Recognizes multiple variations of the same canonical term
Respects context: Avoids false positives through contextual analysis
The matching algorithm must balance precision (avoiding false positives) with recall (catching all relevant terms). The implementation leverages the extensive alias system in the KERI/GLEIF glossary, which includes 459 canonical terms with numerous variations.
Interactive UI Components
When kerific identifies matching terms, it injects interactive button elements below the containing paragraph. These buttons:
Display term names: Show which glossary terms were identified
Trigger definition popups: Click to view full definitions
Support multiple sources: Present definitions from various glossaries
Maintain page layout: Minimize disruption to the original page design
The UI implementation uses CSS to ensure visual consistency while adapting to different website styles and layouts.
Integration with KERISSE Unified Dictionary
kerific's definition data comes from the KERISSE unified glossary, which aggregates terminology from multiple authoritative sources:
KERI/GLEIF canonical glossary: 459 core terms with extensive aliases
ToIP (Trust over IP) glossaries: Community-maintained definitions
Implementation-specific glossaries: Terms from KERIpy, KERIA, and other projects
No data collection: Does not transmit user data or browsing history
Read-only operation: Does not modify page content beyond UI injection
The implementation follows privacy-by-design principles, operating entirely client-side without server-side tracking or analytics.
Governance and Intellectual Property
kerific's implementation respects the intellectual property of glossary sources:
Apache-2 licensed content: Freely used from GitHub repositories
Explicit permissions: Obtained for specific blogs and websites (e.g., keri.one)
Attribution: Contributors acknowledged on the KERISSE site
Dispute resolution: GitHub issues tracker for IP concerns
This governance model balances open educational resource principles with respect for content creators' rights.
Future Development Directions
While not explicitly documented, potential enhancements could include:
Firefox extension: Expand browser support beyond Chromium
Mobile support: Adapt for mobile browser environments
Offline mode: Enhanced caching for fully offline operation
Custom glossaries: Allow users to add personal or organization-specific terms
API exposure: Programmatic access for other tools and integrations
These directions would extend kerific's utility while maintaining its core mission of making KERI/SSI terminology more accessible to technical practitioners.
Loading strategy: Must balance initial load time with lookup performance
Caching: Browser caching reduces repeated loads but may serve stale data
Parsing: JSON parsing on large files can block the main thread
Implementers should consider:
Lazy loading: Load glossary data only when first term is matched
Compression: Serve gzipped JSON to reduce transfer size
Incremental parsing: Use streaming JSON parsers for large datasets
Term Matching Algorithm
The implementation must handle:
Alias resolution: Map multiple term variations to canonical forms
Case sensitivity: Handle different capitalizations of the same term
Partial matches: Decide whether to match substrings or whole words only
False positives: Avoid matching common words that happen to be glossary terms
The documented sources do not specify the exact matching algorithm, suggesting this is an implementation detail that may vary.
UI Injection Strategy
kerific injects UI elements into host pages, requiring careful consideration of:
CSS isolation: Prevent host page styles from breaking kerific UI
Layout preservation: Minimize disruption to original page layout
Accessibility: Ensure injected elements are keyboard-navigable and screen-reader friendly
Performance: Avoid excessive DOM manipulation that could slow page rendering
Content Security Policy Handling
The CSP limitation of the bookmarklet is a fundamental constraint:
Many modern websites use strict CSP headers that block inline scripts
The extension variant bypasses this through browser extension permissions
No pure JavaScript solution exists for CSP-protected sites without extension privileges
Implementers should:
Detect CSP failures: Provide user feedback when bookmarklet is blocked
Recommend extension: Guide users to the extension variant for CSP-protected sites
Document limitations: Clearly communicate which approach works in which contexts
Update Propagation
The update model differs between variants:
Bookmarklet: Updates to index.js and index.css on GitHub Pages immediately affect all users on next activation
Extension: Updates require Chrome Web Store submission, review, and user acceptance of updates
This creates a version skew problem where bookmarklet users may have newer features than extension users for 24+ hours after release.