ai newsDo., 15. Okt.
EilmeldungMeta and Apple team up to make Muse AI models run better on Macs

Firefox-Erweiterung bringt KI-Schreibhilfe ins Kontextmenü

Eine neue Firefox-Erweiterung macht den Umweg über ChatGPT-Tabs überflüssig. Per Rechtsklick auf ein beliebiges Textfeld lässt sich markierter Text direkt durch eine KI umschreiben oder verbessern.

dev.toMittwoch 13:34 · 14.10.DE2 Min. Lesezeit
Bild: dev.to

I built an AI Writing Assistant for Firefox because I kept switching between browser tabs, copying text into ChatGPT, waiting for it to load, and then switching back. There had to be a better way.

AI Writing Assistant adds a right-click context menu to any text field on any website. Select text, right-click, and choose:

The result replaces your selected text inline — no switching tabs, no copy-paste.

This is for everyday writing, not developers. The use cases that come up most in user feedback:

Remote workers drafting Slack messages and emails. "I need to push back on this timeline" can become "I'd like to discuss adjusting the timeline" with one click.

Students revising essays. Select a paragraph, hit Expand, and get a longer version to work from.

Non-native English speakers cleaning up grammar without stopping their workflow.

Anyone writing who just wants a second opinion on a sentence without leaving what they're doing.

The extension uses the browser's native context menu API:

// manifest.json " permissions ": [ " contextMenus ", " activeTab ", " storage " ] // background.js browser. contextMenus. create ({ id: ' rewrite ', title: ' Rewrite with AI ', contexts: [ ' editable ', ' selection ' ] }); browser. contextMenus. onClicked. addListener ( async ( info, tab ) => { if ( info. menuItemId === ' rewrite ' && info. selectionText ) { const result = await callAI ( info. selectionText, ' rewrite ' ); await browser. tabs. sendMessage ( tab. id, { action: ' replaceText ', text: result }); } }); Enter fullscreen mode Exit fullscreen mode The content script handles text replacement:

// content.js browser. runtime. onMessage. addListener (( msg ) => { if ( msg. action === ' replaceText ' ) { const active = document. activeElement; if ( active. isContentEditable ) { document. execCommand ( ' selectAll ', false, null ); document. execCommand ( ' insertText ', false, msg. text ); } else if ( active. tagName === ' TEXTAREA ' || active. tagName === ' INPUT ' ) { const start = active. selectionStart; const end = active. selectionEnd; active. value = active. value. substring ( 0, start ) + msg. text + active. value. substring ( end ); active. setSelectionRange ( start, start + msg. text. length ); } } }); Enter fullscreen mode Exit fullscreen mode Privacy Considerations The AI calls go through a minimal proxy that strips identifiers before forwarding to the model. No text is stored. The extension doesn't have access to your history or other tabs — only the text you explicitly select and the activeTab permission.

The extension works on standard text fields and contenteditable elements. It does not work on:

No account, no subscription. Just install and it works:

Other extensions in the same productivity set: full list here.

Originaltitel: Building an AI Writing Assistant Firefox Extension (Context Menu + Text Replacement)Quelle: dev.to (dev.to). Original öffnen