Skip to content
Richard Frost edited this page Mar 19, 2024 · 87 revisions

Welcome to Advanced Profanity Filter (APF), a profanity filter built for Chrome, Firefox, Safari, Edge, and Opera.

βš™οΈ Settings

🧹 Filter Settings

There are three modes for the filter to operate in, each with different sub-settings to fine-tune your experience.

🫧 Censor Mode

In Censor mode, actions are taken to hide offensive words through masking them in some fashion. Here is a run down of options and an explanation of each.

  • Preserve First Letter - This option will preserve the first letter of a word/phrase, but mask the other letters with a chosen placeholder (Default: *)
  • Preserve Last Letter - Like the previous option, except this will preserve the last letter of a word/phrase
  • Censor Character - Set the character to mask letters with. (Default: *)
  • Fixed Length - Set a fixed length for words masked by the filter. If No fixed length is selected, the word will be the original length. This may help to make it difficult to guess what the word was (Default: No fixed length)

🧼 Substitution Mode

In Substitution mode, offensive words are replaced by a less offensive synonym. In this mode most of the configuration you do will be in the "Words" tab, where you can fine-tune your list of words/phrases and what you would like to replace them with.

  • Preserve case - Preserve the original case of the filtered word. (Default: Enabled).
  • Mark substituted words - Marks substituted words by surrounding them with [ and ].
  • Default Substitution - This will be used as the substitution for words that don't have a set substitution.
    • TIP: If you would like to cycle through multiple substitution words randomly separate them with ;;.

πŸ”₯ Remove Mode

When selected, the offensive word will simply be removed completely from the page, with no indicator that it was ever there. Note that this can sometimes lead to strange sentences.

❌ Off Mode

This mode disables filtering and is useful for detecting words without modifying the page. You can see the list of matching words found in the extension popup. The summary will list each found word once per page. Stats will not be captured, because words aren't being filtered. This essentially results in the filter "being disabled" and applies to every domain. If you want filtering to resume, please choose one of the above mentioned filter modes.

πŸ”§ General Settings

  • Use device theme: Use the system's default theme (light/dark mode).
    • You can also choose your theme by clicking the sun/moon icon in the menu.
  • Show number of filtered words: Show a counter on the extension button with the number of filtered words on the current page. It also serves as a status for the current tab:
    • 🟦 Blue: Normal mode (only visible when there has been at least 1 word filtered on the current tab)
    • πŸŸ₯ Red: Advanced/Deep mode enabled
    • πŸŸͺ Purple: Audio supported on page, actively watching for supported captions/subtitles
    • 🟩 Green: Audio supported on page, supported captions have been found
  • Show summary of filtered words: Show a summary of the words filtered on the current page.
  • Show update notification: Show a notification when the extension gets updated.

πŸ“Œ Default Settings (for new word/phrases)

  • Match repeated characters - This option will match repeated characters in words. They must still appear in the same order. This should be managed per-word to help avoid false-positives.
  • Match separators - Control the default setting used with new words for matching separators ('-', '_' & ' '). When enabled, words/phrases that contain those characters inside them will still be filtered. This should be managed per-word to help avoid false-positives.
  • Match Method - When new words are added they will automatically be assigned this match method. See Word Match Methods for a description of each option.

πŸ—’οΈ Words

The words tab allows you to perform several actions (Some options are unavailable based on other settings):

  • Add new words/phrases.
  • Modify existing words/phrases.
  • Remove existing words/phrases.
  • Set the Match Method for a word/phrase.
  • Configure match repeated characters in words.
  • Set the substitution (replacement) for a word/phrase (Only when filter in Substitution mode).
    • TIP: If you want to cycle through multiple substitution words, separate them with ;;.
    • Case-sensitive: The substitution will respect the provided case (Example: DoG). (Note: This supersedes the preserveCase option for the current word)
  • Words/phrases can also be added by selecting them on a web page and then choosing the Add selection to filter option from the context (right-click) menu. New words will use the settings found in the "Default Settings (for new word/phrases)" section.
  • Match repeated characters - Match words with repeated characters (must still be in same order).
  • Match separators - Words/phrases that contain ('-', '_' & ' ') inside them will be filtered.

Note: The Filter checkbox next to the words dropdown controls whether the dropdown list should be filtered.

πŸ”Ž Match Methods

Controls how the filter finds a word/phrase. All matching methods are case-insensitive.

  • Exact - Requires a full match, which means it only matches words as defined in the word list.
  • Partial - Will match part of a word, so if a word defined in the list is part of a word, it will be filtered.
  • Whole - Similar to the partial match method, except this mode will apply to the entire word, not just the part of the word that matches.
  • Regex (Regular Expression) - This is an advanced method that offers more flexibility. It is a blank slate for creating a regular expression and will not be auto-escaped like the other methods. All entries will have the global and insensitive modifiers applied. Here are examples of how to re-create the exact and partial match methods for the word word:
    • Exact: \bword\b
    • Partial: word

πŸ‹οΈ Bulk Editor

The bulk editor lets you see all your words and their options in a table format, and make multiple changes at once. This is also the easiest way to assign words to wordlists. In this view you can remove words, add words, or adjust the options for words. If you have several words you would like to add to the Filter, there is a box in the bottom-left corner that you can put one word/phrase per line to import. Once you have made your desired modifications, click the save button. A prompt will appear asking to confirm the action. When you click OK, all of words will be replaced with what is in the bulk editor. Because this is a big operation, the prompt also includes a "Backup" button, which will create a backup of your settings before any changes are made. Its recommended to have a backup, just in case. Once you have confirmed that everything looks right, and you're happy with the changes feel free to delete the backup file.

πŸ—’οΈ Lists

βœ… Allowlist

The Word Allowlist provides a mechanism to list words/phrases that should NOT be filtered. Allowlist entries can be case sensitive (case matters). For example, if you added the word "dog" to the filter, but don't want "Dog" (capitalized) to be filtered, you could add "Dog" to the case-sensitive allowlist and it will no longer be filtered.

πŸ“ƒ Wordlists

Wordlists allow you to create collections of words for specific purposes. For instance, you could have a "Parent" list, where some words are not filtered, or you could create a "Muting" list which is used for audio muting. Another example could be a wordlist that excludes (or includes) religious references. Wordlists could even be used for different languages (English, Spanish, etc) if you don't want to mix them.

On this page, you can rename wordlists and set which wordlist should be used for text and audio muting by default. You can set which wordlists are used per-domain by using the Popup window while visiting the desired page, or by going to the Domain tab in the options page.

The fastest way to adjust which words are included in a wordlist is by using the Bulk Editor found in the Words tab.

Currently only 6 wordlists are supported.

🌎 Domains

This tab allows you to adjust the filter's settings on specific domains.

🎯 Domain Mode

  • Normal: (default) Filter all domains unless specifically disabled
  • Minimal: Only filter pages that are specifically enabled

πŸͺŸ Frame Mode

  • Filter all frames (default): Filter all frames, unless disabled for a specific domain
  • Don't filter all frames: Only filter frames when enabled for a specific domain

🌐 Domains

Adjust the domain list for the currently selected mode. To match google.com and all its sub-domains, simply add google.com. If you want to just match Gmail, you can add mail.google.com.

When browsing a web page, you can also toggle the filter for the current domain from the context (right-click) menu, or using the extension's Popup menu.

Note: Do not include the protocol (ex. http://), or anything after the domain name.

πŸ§ͺ Advanced Mode

WARNING: This mode will result in lower performance.

Handle matching text that is split between multiple elements on the page. This is not usually necessary.

Example:

<span>some text to fil</span><span>ter</span>

On the page, this would look like: "some text to filter", but the extension (without advanced mode) would see some text to fil, and ter. If you were trying to filter the word text, it would work as expected (because "text" isn't split across elements). If you were trying to filter the word filter, it would fail without Advanced mode being turned on, because it doesn't match on some text to fil, or ter. This is not a common practice, and is only needed in a very small number of websites.

πŸ”¬ Deep Mode

WARNING: This mode will result in lower performance.

Filter additional elements on the page that are usually not processed. If you notice that words are not being filtered and Advanced mode doesn't work, try this mode. Deep mode can be especially helpful on pages that heavily utilize the Web Components/Shadow DOM.

πŸ—’οΈ Wordlists

Adjust which wordlist should be used for text and audio muting on the selected domain.

Tip: You can choose Default, which will set it to the default set in the Lists page.

πŸ”‡ Audio

Mute audio during video playback when a filtered word is detected in the subtitles/captions (which must be enabled) on a supported site. The effectiveness of this feature is completely dependent on the quality and timing of the subtitles accompanying the video. For more information, please see the Audio wiki.

Note: If the "Show number of filtered words" option is enabled, the badge will be green when audio muting is enabled on a supported site.

  • Mute audio on supported video sites - Enables the feature. Without this no audio filtering will occur.
  • Mute Method - Controls which method to use for muting audio
    • Browser Tab - Disables all audio from the current browser tab
    • Video Volume - Changes the video volume to 0 when necessary (Required for Filler Audio)
  • Subtitles - Controls which subtitles will be visible.
    • Show all subtitles (default)
    • Show only filtered subtitles - Least distracting
    • Show only unfiltered subtitles
    • Hide all subtitles - This may make it difficult to know what is happening when the audio is muted
  • Filler Audio - Replace the silence while muting with a filler sound. (Must use "Video volume" mute method)
  • Only mute audio - This will disable the text filter, and only perform filtering/muting on supported video sites. This mode will disable the text filter everywhere, and only mute audio (and filter subtitles) on supported sites.
  • Require subtitles to be showing - This setting is only for sites using the "cue" mode, and will only filter when subtitles are set to "showing" for the current video. If enabled, this typically means there is a manual step involved in turning on the subtitles (varies by site) to enable audio muting through the filter.
  • Unmute delay - Global/default (applies to all sites) unmute delay value (in seconds). This delays when the audio is unmuted after a filtered word. Useful when the captions are not lining up quite right and you want to mute the audio longer to increase the success of muting during a filtered word.
  • Mute pre-censored captions on YouTube - YouTube sometimes pre-censors profanity in auto-generated captions and replaces them with [ _ ]. When enabled, this option will attempt to mute those words. (The default on)
  • YouTube Minimum Muting - Set a minimum amount of time (in seconds) that the filter will mute matched words in a YouTube video using auto-generated subtitles. (The default is 0)
  • YouTube Maximum Muting - Similar to Minimum muting, but this will only allow a single mute to last this long in seconds. Most commonly used when YouTube auto-generated subtitles have a break between words, like the end of a conversation, and the last word is a filtered word. When that happens the last word may stay there for several seconds (or longer) until the next word is spoken.
  • Custom Sites - Add support for Custom Audio Muting Sites.

πŸ”– Bookmarklet

When you can't install the extension but would still like to filter a webpage, your best option is to use the Advanced Profanity Filter (APF) Bookmarklet.

Pros:

  • Runs on most browsers, including mobile Google Chrome and iOS Safari
  • Only runs when you want it (must manually activate the bookmarklet)
  • Compatible with the same configuration as the extension

Cons:

  • Not run automatically; you have to run the bookmarklet on each page and every reload
  • No UI to modify settings
  • No auto-updating

πŸ”¨ Creating a Bookmarklet

  1. Navigate to the Advanced Profanity Filter Option page and open the "Bookmarklet" tab
  2. Choose whether you'd like to use your configuration, or APF defaults
  3. Save the APF Bookmarklet to your browser (Found at the bottom of the Bookmarklet's option tab, named APF). This can be done by dragging it to your browser's Bookmark bar or by right-clicking and copying the link destination and saving that to a bookmark.
    • If you have browser bookmark syncing enabled this may copy to your desired device/browser automatically.
    • Alternatively, you can copy the bookmarklet link and add it to your desired device/browser as a bookmark. If you don't know how to do that check the documentation for your browser.

πŸ› οΈ Updating your Bookmarklet

Your bookmarklet will not automatically update or stay in sync with your settings. So, if you add a new word to filter or some other change, you may want to revisit the previous steps and replace your bookmarklet. Your bookmarklet will also not get code updates, so you may want to periodically update it, or just update it if you run into trouble.

ℹ️ Usage

  • Android Google Chrome Mobile: To activate the APF Bookmarklet filter you will need to browse to the desired page and then from the Omnibox (address bar) start typing your bookmark's name (example: APF) and then select it. Using the bookmark manager on Chrome Mobile doesn't allow bookmarklets to run.
  • iOS Safari (iPod/iPhone/iPad): To activate the APF Bookmarklet filter, browse to the desired page, open your Bookmarks and then tap on the bookmarklet.
  • Other: This varies between browsers and devices, but typically you can just select/activate it by tapping/clicking on it. Search for "Bookmarklets on device/browser name" for more information on your particular case.

πŸ—ƒοΈ Config

This tab allows you to control your configuration for the filter.

  • Export - Export your current settings. Useful if you want to backup your settings or share them with others.
  • Import - Import settings. This will replace of your config, so I strongly recommend taking a backup (Export) before doing this.
  • Restore Defaults - This restores all settings back to their defaults.

NOTE: Importing or Restoring defaults will export your current config, just in case you forgot to. You will need to copy and save it elsewhere if you want it.

πŸ“ Inline editor

The inline editor allows you to view your config in its plain-text JSON format. This includes all your settings, including the list of the words you are filtering. When selected/open, this config does not update to reflect any changes made in other areas of the extension's Options pages. To get the current config if you opened it and then made changes, simply un-check the "Inline editor" and then select it again. As the name implies, you can also edit your config directly here, or paste a previously saved config. Just remember it needs to be valid JSON to be saved. Editing configuration directly is a more advanced feature and most people won't need to do it. To import (overwrite) your config with the inline editor, simply click the "Import" button. Before the import, you'll be reminded to take a backup of your current config just in case.

πŸ—„οΈ Storage

By default, the filter will try to sync your settings between devices using the browser's syncing functionality. There are limits on how much can be synced though. If you run into those limits you can turn off the syncing of large settings (such as words, and domain options). When this option is disabled, these settings will only be available to the current device. You can still export and import your settings if you'd like to as a manual way to "share" settings between devices.

πŸ“’ Logging Level

This setting allows you to adjust the level of logging to the console. Under normal use this shouldn't need to be adjusted at all and can be ignored. When set to "Error", only errors will be logged, and when set to "Warn", both warnings and errors will be logged. To get all the logs, set it to "Debug", but that should only be used temporarily, usually when directed by the developer. The "Info" and "Debug" logging levels can be helpful when troubleshooting an issue, but for regular use should be set to either "Warn" or "Error".

πŸ”’ Password

At the bottom of the page there is a prompt for you to set a password to protect the Options and Pop-up pages. This may be useful to keep others from modifying your settings for the extension. This does not prevent a user from disabling or removing the extension. This is not a secure mechanism. Your password is stored in plain-text, so do not reuse an established password.

  • To set a password: Enter the desired password in the box and click Set. You will now be prompted for the password when opening the Options page.
  • To remove a password: Leave the password box blank and click Remove.
  • If you forget your password, please contact me for information on how to recover it.

βš—οΈ Test

Here you can write/paste text into the test area and see the filtered output in real time. This provides a way to test new changes without having to leave settings.

πŸ”’ Stats

View filtering statistics such as how many words have been filtered, and how many times audio has been muted while watching a video. You can also disable gathering statistics on this page, or choose to reset them. Statistics are only stored locally (they never leave your device), and are not included in a configuration backup.

The "Remove words" feature, found under the stats table, allows the user to specify a threshold for removing words that don't get filtered often. To use the feature, provide a number and all words that have been filtered less than that number can be removed. This can be helpful to help clear words from your wordlist that may not be necessary.

TIP: Before making batch changes it's recommended to save a backup, which you can do from the prompt before confirming the action.

🎈 Popup

The popup provides access to some quick details and settings:

  • Audio Status - Shows either "Watching for captions" or "Muting active" depending on the current tab's status. (Only available on supported audio pages)
  • Domain Toggle - Switch to turn the filter on/off for the current domain.
  • Audio Muting Status - Status line for pages which support audio muting.
  • Advanced Mode - Switch Advanced Mode on/off for the current domain.
  • Filter - Change the filter mode. This is a global setting and affects all pages.
  • Text Wordlist - Change the active wordlist for text for the current domain (Only when wordlists are enabled)
  • Audio Wordlist - Change the active wordlist for audio for the current domain (Only when both wordlists and audio muting are enabled, and this is an audio page).
  • Summary - A summary will appear when words have been filtered on the current page detailing what was filtered. The words are censored, but the original word can be seen by hovering over a word.
  • If the Popup is disabled, look at the bottom of the Popup to see why.
    • Popup disabled by browser: Your browser doesn't allow extensions to run on the current page
    • Popup disabled by password: A password has been set which locks all settings (Options page > Config tab)
    • Popup disabled by only mute audio: "Only mute audio" is selected (Options page > Audio tab)
    • Popup disabled for tab: The current tab was disabled using the context menu, click the switch to enable it
    • Popup disabled by domain mode: Your domain mode is set to minimal (Options page > Domain tab)
    • Popup disabled for domain: The filter has been disabled for this domain, click the switch to enable it

In addition to the above, there are links to the Options page and support pages.

πŸ“ƒ Context Menu

The context-menu (right-click) menu also provides access to some quick settings:

  • Add selection to filter - Adds the current selection to the filter and refreshes the page (useful when you come across a word you would like to add to the filter) (Only available when text is selected)
  • Disable once - Turn the filter off for the current tab once (until reload or page navigation)
  • Toggle for tab - Turn the filter on/off for the current tab (any domain)
  • Toggle for domain - Turn the filter on/off for the current domain
  • Toggle advanced for domain - Switch the Advanced Mode on/off for the current domain
  • Toggle frames for domain - Switch filtering frames on/off for the current domain
  • Options - Open the options page