Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Browser AI Comments

No security coverage Drupal 11 · not 10
View on drupal.org

This module enhances the Drupal comment system by offering AI-powered features directly in the browser. It allows users to translate comments as they write or read them, and warns commenters about potentially toxic language before they submit their posts, improving community interaction and moderation.

Browser AI Comments adds AI-powered helpers directly to Drupal’s comment system, using capabilities available in modern Chrome browsers. It lets site visitors translate comments (while writing or while reading) and helps moderators and communities by warning commenters about potentially toxic language before they post.

Features

  • In-comment translation
    • Translate the current comment while writing.
    • Translate a published comment while viewing.
    • Uses Chrome’s experimental Web AI APIs: LanguageDetector and Translator.
  • Toxicity / harmful language warnings while typing
    • Detects potentially toxic or hateful language as users type.
    • Runs client-side using Transformers.js in a Web Worker (keeps the UI responsive).
    • Uses the Xenova/toxic-bert model for classification.
  • Optional submit protection
    • Can disable the comment submit button when toxic content is detected (configurable).

Post-Installation

After enabling the module, configure it from the admin UI and then use it in any place Drupal comments are available.

  1. Go to Admin > Configuration > Content authoring > Browser AI Comments.
  2. Select which toxicity labels should be flagged and set a threshold value.
  3. Customize the warning message shown to commenters.
  4. Optionally enable the setting to disable the submit button while toxic content is detected.

What you’ll see after setup:

  • On comment forms: toxicity warnings can appear live while typing.
  • On comment display pages: a Translate action is available for published comments (browser support required).

Additional Requirements

  • Drupal 11
  • Google Chrome Dev/Canary with experimental Web AI features enabled
  • Secure context: HTTPS or localhost
  • Network access (first run): required to download the toxicity model the first time it runs

Notes: Translation relies on Chrome Web AI APIs (Translator, LanguageDetector). Toxicity detection does not require window.ai.

  • Transformers.js (used for toxicity detection in a Web Worker)
  • Xenova/toxic-bert model (used for toxicity classification)

If your site uses advanced moderation workflows, pairing with Drupal’s moderation tools (core/workflow setups) can complement the warnings, but this module primarily focuses on front-end assistance at comment time.

Similar projects

This module is different from typical server-side translation or moderation modules because it runs AI features in the browser (client-side) using Chrome’s experimental Web AI APIs and an in-browser toxicity model. That means:

  • No server-side translation service is required for the translation feature (but browser support is required).
  • Toxicity detection runs locally in the user’s browser via a Worker, instead of needing a remote API.

How it works

  • Translation uses the LanguageDetector and Translator APIs as shown in the Chrome Web AI playground.
  • Toxicity detection runs Transformers.js inside a Web Worker using the Xenova/toxic-bert model (inspired by toxic review demos).

Chrome setup

  1. Enable AI-related flags in chrome://flags (flag names change frequently).
  2. Restart Chrome and allow any required model downloads.
  3. Confirm the APIs exist in DevTools: Translator and LanguageDetector.

Usage

  1. Enable the module.
  2. Open a comment form or view a published comment.
  3. Use the Translate button or review toxicity warnings while typing.

Depends on

Dependencies of the latest stable release

  • comment Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Jan 2026
Latest release
7 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core Release date
1.0.0 Stable 11 Jan 15, 2026
1.0.x-dev Dev 11 Jan 15, 2026