findAndReplaceDOMText
findAndReplaceDOMText copied to clipboard
:mag: Find and replace DOM text
Fixes a bug demonstrated in https://jsfiddle.net/vy3tsq8o/. Code repeated below: ```html 11 22 11 22 ``` ```js var pattern = /\d+/g; var replaceFunction = (useDocumentFragment) => function(portion, match) { var fragment...
I've added function to include a href and target when finding and replacing with an anchor link; The script trips over itself. if I try and find and replace a...
hi i need way to ignore groups in regex for example in modern browser which support Positive lookbehind i can simply do this in regex find pattern with word boundary...
I want to exclude some DOM elements based on some class. For this I used filterElements:- ```javascript findAndReplaceDOMText(container, { filterElements: function(el) { if (el.className) { return el.className.indexOf('test') === -1; }...
When searching for certain terms generally terms having three alphabets, the page becomes unresponsive. This causes the whole page to freeze and other things such as scrolling, button clicks, etc....
Is it possible to instead of replacing of all of the matched nodes to replace only one that matches specific criteria, e.g. is the 1st one to match? i.e. 'The...
Just clearing out noise of lgtm alerts for projects I watch there if you could kindly merge: https://lgtm.com/projects/g/padolsey/findAndReplaceDOMText/?mode=list Thanks!
### Introduction The main idea of this library is to split a match into portions when it crosses element boundaries. > Note: I will refer to only the `input` and...
Hi, Is there a way of adding this to a chrome extension? I want to highlight all same words which involves me adding a span to those found. I have...
How to find a string with accents **if** the find regexp not contains the accents ? In other words, I want to replace the text with accents for text without...