A tiny, CSS-safe widget that lets visitors send your articles to ChatGPT, Claude, Gemini, or Perplexity in one click.
Other languages: TΓΌrkΓ§e Β· Deutsch Β· FranΓ§ais Β· δΈζ Β· Ψ§ΩΨΉΨ±Ψ¨ΩΨ©
Paste this just before the closing </body> tag:
<script src="https://unpkg.com/ai-summarize-widget/dist/ai-summarize-widget.min.js"></script>Using NPM / React / Next.js?
npm install ai-summarize-widgetimport AISummarizeWidget from 'ai-summarize-widget';
<script>
new AISummarizeWidget({
type: 'fixed' // β¨ floating button appears in the bottom-right corner
});
</script>Open your page β a β¨ button appears. Click it β pick an AI β article is copied to clipboard β redirected automatically.
A sticky FAB in the corner. Clicking opens a centered dialog. Best for blogs and article pages.
<script>
new AISummarizeWidget({
type: 'fixed',
theme: 'auto', // 'auto' | 'dark' | 'light'
buttonColor: '#4f46e5',
lang: 'en'
});
</script>Injects the button into any existing element (e.g. your share bar).
<div class="share-area">
<button>Share on X</button>
<!-- β¨ injected here -->
</div>
<script>
new AISummarizeWidget({
type: 'inline',
target: '.share-area',
theme: 'dark',
buttonColor: '#10b981'
});
</script>Restrict parsing to a specific element β useful when a page has multiple articles (e.g. news feeds).
// News feed: 40 article cards on the page
// inline β closest('.article') is used automatically
new AISummarizeWidget({
type: 'inline',
target: '.article .share-bar',
contentScope: '.article',
buttonColor: '#4f46e5'
});
// Fixed FAB: picks the article most visible in the viewport
new AISummarizeWidget({
type: 'fixed',
contentScope: '.article',
});| Situation | Behavior |
|---|---|
contentScope not set |
Default heuristic detection (unchanged) |
| 1 match | That element is parsed |
inline + multiple matches |
inlineBtn.closest(sel) β the card containing the button |
fixed + multiple matches |
Element with the largest visible area in the viewport |
| 0 matches | Falls back to default heuristic |
| Value | Behavior |
|---|---|
'auto' (default) |
Follows OS dark/light mode, updates in real-time |
'dark' |
Always dark |
'light' |
Always light |
| Option | Type | Default | Description |
|---|---|---|---|
type |
String |
'fixed' |
'fixed' (floating FAB + modal) or 'inline' (inject into a container) |
theme |
String |
'auto' |
Color theme: 'auto', 'dark', 'light' |
target |
String |
null |
Required for 'inline'. CSS selector of the element to inject the button into |
contentScope |
String |
null |
Restrict parsing to a CSS selector. Smart multi-element detection included |
buttonColor |
String |
'#4f46e5' |
Button color (any HEX or RGB) |
lang |
String |
Auto | Language code: 'en', 'tr', 'de'β¦ Reads browser language if omitted |
redirectDelay |
Number |
1200 |
ms before redirecting to the AI (shows "Copied!" toast first) |
- π―
contentScopeβ Pinpoint which element to parse. Perfect for news sites with many article cards - π Dark / Light / Auto Theme β Switches instantly when OS theme changes; applies to both the modal and the inline popover
- π‘οΈ Zero CSS Conflict β All styles scoped under
#aisw-rootwithall: unset. Safe with Tailwind, Bootstrap, and any CSS reset - π AIO (AI SEO) β Auto-extracts JSON-LD, OpenGraph, and Twitter Card metadata as prompt context
- π§Ή Smart Content Extraction β Strips ads, navbars, sidebars, and comments. Pure article body only
- π± Mobile Deep Linking β Bypasses popup blockers on iOS/Android. Opens native apps directly
- π Multi-Language + RTL β
en,tr,de,fr,es,zh,ruand more; full RTL forar,fa,he,ur
# Build
npm run build
# Publish (requires npm login)
npm publishAfter publishing, the CDN URL is live immediately:
https://unpkg.com/ai-summarize-widget@latest/dist/ai-summarize-widget.min.js
https://cdn.jsdelivr.net/npm/ai-summarize-widget@latest/dist/ai-summarize-widget.min.js
MIT Β© 2026 Mustafa Savul