Pattern Mapping Replacer - Multi-Site

Replaces text based on a mapping with exact matching and site-specific filtering

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
作者
Kreezxil
1日のインストール数
1
累計インストール数
1
評価
0 0 0
バージョン
1.2
作成日
2026/03/21
更新日
2026/03/21
大きさ
2.88KB
ライセンス
MIT; explicity from MIT license, you must link back to this script.
対象サイト
すべてのサイト

Pattern Mapping Replacer - Multi-Site

This Tampermonkey userscript performs automated text replacement across websites based on a customizable mapping dictionary. It is specifically designed to handle site-specific filtering and case-sensitivity toggles.

Core Features

  • Dynamic Text Replacement: Replaces specific words or phrases within the visible text of a webpage.
  • Site-Specific Filtering: Replacements can be restricted to specific domains (e.g., sefaria.org) or applied globally.
  • Case Sensitivity Control: Each entry in the mapping can be set to either an exact match (true) or case-insensitive (false).
  • Whole Word Matching: Uses regex word boundaries (\b) to ensure it only replaces whole words and not fragments within larger words.
  • Live Updates: Utilizes a MutationObserver to watch for changes in the DOM, ensuring that text loaded dynamically is also replaced.
  • Protected Elements: Automatically ignores script tags, style blocks, textareas, and input fields to prevent breaking site functionality.

Configuration Structure

The script uses a mapping object where each entry follows this format:
"Original Word": [ExactMatch (Boolean), AllowedSites (Array), "Replacement Word"]

  • ExactMatch: If true, the script only replaces the exact casing provided.
  • AllowedSites: An array of domain strings. If the array is empty ([]), the replacement applies to all websites.
  • Replacement: The string that will replace the original pattern.

Notes

  • Other array variables can be defined for sites, so that you can easily tailor matches to any sites.
  • You don't have to use the array variables, you can manually define the arrays in each section. I recommend the variables.