Giter Site home page Giter Site logo

frostco / advancedprofanityfilter Goto Github PK

View Code? Open in Web Editor NEW
157.0 8.0 26.0 9.47 MB

A browser extension to filter profanity from webpages

License: GNU General Public License v3.0

HTML 11.83% TypeScript 67.37% JavaScript 18.81% CSS 1.99%
text-filter family-friendly browser-extension profanity-filter filter-profanity language-filter hacktoberfest

advancedprofanityfilter's People

Contributors

dependabot[bot] avatar phrostbyte21 avatar richardfrost avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

advancedprofanityfilter's Issues

Whitelist Sites

Investigate the possibility of being able to white-list sites that the filter would not run on.

Facebook comments uncensored.

What steps will reproduce the problem?
1. Sometimes Facebook comments on different sites such as IMDb does not get 
filtered.
2.
3.

What is the expected output? What do you see instead?
I see the full profanity even though the program is ON.

What version of the product are you using? On what operating system?
Simple Profanity Filter source version 1.2.1

Please provide any additional information below.
Maybe if you made an improvment to filter profanities during Facebook comments 
on the websites. 

Original issue reported on code.google.com by [email protected] on 11 Oct 2012 at 2:40

Webpages noticeably slower to load with 100+ profanity list

If the profanity list is increased to 100+, webpages are significantly slower 
to load. On some occasions, Chrome becomes unresponsive and requests that the 
tab is killed. 

Further testing and code analysis is required to optimize performance.

Original issue reported on code.google.com by markyd13 on 8 Jul 2010 at 3:58

Firefox support

I'm using it in Firefox and it works fine (webext), can you upload it to AMO as well?

Special characters in word list

A user mentioned that they wanted to be able to remove a word that included an asterisk. I can think of two ways to fix this:

  • Sanitize/escape input from add word (store it escaped)
  • Sanitize when actually building the regex for the filter

Add Page Action to censored web pages

New functionality: Add Page Action icon to web pages that have censored 
content. Clicking the page action will allow the user to temporarily disable 
filtering.

Original issue reported on code.google.com by markyd13 on 7 Jul 2010 at 10:51

Simple Password on Options

A user has requested simple password protection for the options page to prevent her child from changing the settings.

Replace based on part of speech

I'm attempting to use this to filter text in such a way that you can't tell it's been changed. The problem is, some words need to be replaced differently based on what part of speech it is. For example 'f***ing' can be removed entirely when it is a adjective or adverb, but needs to be replaced when it is a verb. Could we have the ability to do that?

Backup/Restore

With future plans - I really want to be able to export/import settings, preferably as json.

Muting Audio During Videos

It has been mentioned that it would be nice to block audio profanity. This would probably require subtitles and also mute audio for the whole time the phrase was present on the screen. I will see if I can come up with a better method, but this is definitely on the back burner for now.

Feature Request - Word Euphemisms

I got an idea for a ""euphemizer"" Chrome extension and came across your extension. Your extension is pretty close to the original idea I had which is this: Allow for user input for specific words or phrases they want filtered out with a list of alternate euphemisms. The filtered word will be replaced by one of the random euphemisms.

Example: Filtered word 1 = f***; Euphemisms for 1 = freak, fudge, fork, etc

With this example, the phrase ""What the f*** is that?"" becomes ""What the freak is that?"" OR ""What the fudge is that?""

Additional concept: You can assign certain words or phrases priority so that if you have a variable of f***, and a variable of f*** you, you can assign the second variable a higher priority so that you can euphemize an entire phrase instead of a single word (which might sound odd).

Example:
var f*** = ""fudge"" OR ""freak"" OR ""fork""; priority = 2
var f*** you = ""get a life"" OR ""go away""; priority = 1

With this priority setup, the sentence ""You are so dumb, f*** you!!"" becomes:
""You are so dumb, get a life!!""
instead of
""You are so dumb, freak you!!""

I guess the idea behind my feature request would be that when you read something that is censored, you still usually say the word in your head (because you know what is written even if it is censored out). With the ability to choose a bunch of euphemisms to replace words or phrases though, you could read something and have no idea it was censored in the first place.

Migrate/Upgrade wordList CSV

To manually load your old wordList CSV into the new format, you can use the following code in the javascript console on the extension's options page (right-click on the options page and select 'Inspect Element', then you can paste it into the JS console)

NOTE: You should only do this after you look over the code and are comfortable with it. I am working on an automated way to upgrade so you won't need this.

// Testing string for migration
// config.wordList = "first,second,third,fourth";
// chrome.storage.sync.set(config);
// saveOptions(undefined, config);

chrome.storage.sync.get('wordList', function(storage) {
  var wordListStr = storage.wordList;

  if (wordListStr != undefined && wordListStr != '') {
    var word = '';
    var wordList = wordListStr.split(',');

    try {
      // Migrate to new words object
      for (i = 0; i < wordList.length; i++) {
        word = wordList[i];
        if (word != "") {
          if (!arrayContains(Object.keys(config.words), word)) {
            console.log('Migrating word: ' + word);
            config.words[word] = {"matchMethod": 1, "words": []};
          } else {
            console.log('Word already in list: ' + word);
          }
        }
      }

      // Remove wordList if successful
      console.log(wordListStr, wordList);
      saveOptions(undefined, config);
      chrome.storage.sync.remove('wordList');
    }
    catch(error) {
      console.log('Error: Aborting wordList migration!', error);
    }
  }
});

Gmail craziness

For some reason, this extension interferes with composing emails in Gmail. If you use Ctrl+B or Ctrl+I to format the text, it will switch to bold/italics, and then move the cursor backwards one space so you're typing immediately before the first bolded letter. I've tested this extensively now. I disable the extension, refresh the page, and I can compose fine. I then enable the extension, refresh the page, and the bizarre behavior strikes again. The same occurs on both my home and work machines.

vivaldi_2017-06-09_11-48-39

Retain capitalization

A feature I would like to see is the ability to retain the capitalization of the word being substituted. This would make the substitutions harder to notice especially when someone is using all caps.

There are three possibilities when replacing a word:

  • The original word is all uppercase. The substituted word is all uppercase.
  • The original word starts with a uppercase. The substituted word starts with a uppercase.
  • The original word is all lowercase. The substituted word is all lowercase.

Replace Word with a Specific Word

Description

For some words, I would like to replace the word with another specific word. For example, I would like the flexibility to replace "poodles" with "puddles" and "rabbits" with "rodents". This would allow me to replace offensive words and not trip up reading the sentence because there is a word missing.

Details (Bugs Only)

Firefox Version: 61.0.2
Extension Version: 1.1.1
Operating System: Windows 10
Site(s) Affected: All

Whitelist Sites

I want to be able to whitelist domains (disable on certain domains)

Should we support patterns?
CSV?
Whitelist current site?

Filter only applied after page loaded

Issue submitted by Martin on Chrome Extension Gallery page:
Hi Mark, the problem with this extension is that it loads the page and only 
then replaces the words. There is a "beforeload" event out now which you can 
use to prevent these bad words from loading at all. I STRONGLY suggest that you 
use it. AdBlock is using it too. It's much better if you don't even load the 
bad word rather than load it and then hide it...


Original issue reported on code.google.com by markyd13 on 2 Aug 2010 at 8:08

Whole Match and Per-Word matching methods are not working for Cyrillic words.

Description

Whole Match and Per-Word matching methods are not censoring Cyrillic words and they remain the same. Exact Match and Partial Match are working correctly.

Details (Bugs Only)

Chrome Version: 68.0.3440.84
Firefox Version: 61.0.1
Extension Version: 1.0.15
Operating System: Win 10

Steps to reproduce (Bugs only)

  1. Add new Cyrillic word in the profanity list of the extension.
    example words: котка (cat in English), куче (dog in English), врата (door in English),
    прозорец (window in English), маса (table in English)
  2. Set matching method of this word to Whole Match.
  3. Type censored word in Google or other popular search engine.

Make disabled domains easier to use

It is a little confusing right now how the disabled domains (filter whitelist) operates. Some ideas for improvement:

  • HTML validation?
  • Another example?
  • Add domain through context menu?

Also - Next update should probably remove auto-opening of extension settings.

Latency when using AJAX applications

Issue from gregorrothfuss:
sorry, i am not sure what you are doing wrong, but this extension adds huge 
latency to ajax apps. had to disable.


Original issue reported on code.google.com by markyd13 on 2 Aug 2010 at 7:58

Soundcloud

Doesn't filter soundcloud.com comments.

Remove only whole word that matched listed words

Description

Currently plugin remove any word contains character sequence listed in words. It makes non-profane words get filtered.

Details (Bugs Only)

Firefox Version: 58.0.2 (64-bit)
Extension Version: 1.0.5
Operating System: MacOS 10.13.3
Site(s) Affected: Any site with login and word "Password" affected.

Steps to reproduce (Bugs only)

  1. Activate plugin
  2. Go to login page of any english site, "Password" label will be removed

Refactor/cleanup pass

There are several methods that could probably be consolidated between at least the options and browser action popup.

Word Whitelist

Hello.
Just installed your extension, Firefox 54 x64, Win 7x64.
Trying any options at any words at any language, but nothing.
Just plain NOTHING.
What can be wrong?

Newline Separated Wordlist and Support Euphemisms

From a user:

Hi I came from procon latte content filter extension. Is it possible for your extension to have the profanity list be values separated by lines instead of comma separated values with no spaces? Sometimes the phrases I want to block have commas in them. Also, I would like to customize how the filtered words are displayed, ie. instead of ***, I would like to use a mundane word like dang. It makes the site more readable and does not allow my mind to automatically correct the *** into swear words. Also, you need to have an option to toggle on and off the filter when I want to disable it.

Load Options page upon installation

New functionality: It would be convenient to immediately load the Options page 
after installation.

Original issue reported on code.google.com by markyd13 on 7 Jul 2010 at 10:52

Temporarily Disable on Page

Add support for a one-time disable on page.

Should it be on extension click?

Maybe Add a menu that offers Disable on Page and Settings

Customizable euphemisms

New Functionality: In the Filter List in the Options page, the user should be 
able to specify the string that replaces a particular profanity.

Original issue reported on code.google.com by markyd13 on 8 Jul 2010 at 5:19

Phrases are sometimes not censored

It is possible for a phrase (two or more words separated by spaces such as "dog 
house") to not be censored. 

Currently, the webpage is parsed using XPath. The profanity filter is applied 
on each of the returned text nodes. If a phrase is split up into separate text 
nodes, then the phrase will not be censored.

This is very rare and difficult to reproduce.

Original issue reported on code.google.com by markyd13 on 8 Jul 2010 at 4:09

Chrome/Facebook/Comment - keyboard inputs not accepted

Issues are used primarily to track bugs in the project. Feature requests can be submitted either as an issue or here.

Description

Right after I installed I tried to post a Comment to Facebook and the response to my keyboard inputs was to open other tabs, and other actions, but no text in the Comment block.

Details (Bugs Only)

Chrome Version: Version 64.0.3282.186 (Official Build) (32-bit)
Extension Version: 1.0.8
Operating System: Windows 7
Site(s) Affected: Facebook

Steps to reproduce (Bugs only)

  1. Installed Extension
  2. Open Facebook
  3. Click Comment

Other details

Screenshots

Can't remove default words

After changing words to an object I need to refactor the default code because it keeps restoring the keys on the object.

Have a whitelist of good words

Description

Words such as "class", "grass", and "assassin" get unnecessary censors in them. It would be useful if there was a long, hidden whitelist of okay words.

Feature request- Filtered words are blanked out (not shown at all) instead of asterisks being shown in their place

Can there be a feature (an option) where we can have the filtered words totally blocked or blanked out(not shown at all) instead of being replaced by asterisks.
Currently there are options like preserve first letter, filter parts of words etc. This can be added as another option to have.

Example case:
Lets presume the word dog is filtered, so currently a statement before and after filtering will be something like:
The doghouse is there > The ***house is there

Instead we could have:
The doghouse is there > The house is there

Asterisks Between Words

I never had this problem before, but when I accidentally pushed the button to restore to default, there's an asterisk between each word. Is there a way to fix this?

Preserve Last Letter of Censored Word

It has been requested to have an option to preserve the last letter of the filtered word (in addition to the first letter) when using censor mode.

Problems with new Faster Initial Filtering

Thanks for the great project.

I would suggest making the "Faster Initial Filtering" feature, as an option.
Since the site I am using, worked fine with last version but by moving to this new Version, all the words are plainly visible and number of filtered words are always zero.

I presume it is a matter of texts loading with javascript waaay after your extension's run.

Not working with search bar on Play Music.

Just notice when searching on Play Music it does not filter the search terms (used minor swear word) as pictured below.
2018-07-13_153136

However the script is working when viewing the results.
2018-07-13_153153

It won't filter new words added

Issues are used primarily to track bugs in the project. Feature requests can be submitted either as an issue or here.

Description

Details (Bugs Only)

Chrome Version:
Extension Version:
Operating System:
Site(s) Affected:

Steps to reproduce (Bugs only)

Other details

Screenshots

Firefox portable

Description

Running latest beta firefox 57 and I have to run portable at work but when I load addon it says it can't save any settings. Is there a way to fix this? Where are the settings saved so I could try and manually save?

Microsoft Edge Support

I have done the work to get the extension to work on Microsoft Edge, but to publish it requires a one-time payment. I don't really use Edge, and I haven't gotten any requests for it yet, so I think I'm going to put its support on hold for now. If there is interest in it, please feel free to comment here so I can gauge demand.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.