Giter VIP home page Giter VIP logo

weblibbs's People

Contributors

blumed avatar dfarrell-bloom avatar farrellit avatar

Watchers

 avatar  avatar  avatar

Forkers

farrellit

weblibbs's Issues

Doesn't effect youtube comments

Youtube comments aren't affected.

Commit: 009ba24

Steps to reproduce:

  1. turn on extension
  2. navigate to youtube.com
  3. load a video page
  4. try to change one of the words in the comment section

Expected Result

words should have changed in comment section

Actual Result

"main" webpage shows the word replacement, but it isn't replaced in any of the comments.

Revert DOM to original state

As a user I might want to disable word replacement or clear the words list on the fly. In this case I would want the replacements to be undone.

It's not enough to reverse the word and replacement in the walk function; just because I replace pigs with hogs, doesn't mean every hogs on the page was a result of this replacement. In other words, on a page composed of "All pigs are hogs", replacing pigs with hogs would yield "All hogs are hogs", but reverse-replacing would yield "All pigs are pigs" - which is not the original string.

I think this would work:

  1. at every replacement, the node and the character offset of the replacement, as well as the length of the replacment and the original word (words could be referenced by the offset in the words array potentially as long as it is reverted before that is cleared) is saved
  2. when the replacements are reverted, we would go through that list in reverse order (replacements can change the results of other replacements) and in each position of each text node changed, the original string would be added in and the old string removed.

Feature: clear words list

As a user sometimes I just want to clear the words list. Since it's pretty destructive I suggest you have a confirmation before clearing.

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.