Finished up with inline and full-body chat-filters.
This commit is contained in:
parent
77bc549653
commit
4c31dbde1e
6 changed files with 198 additions and 40 deletions
|
|
@ -27,6 +27,14 @@ class canopyUtils{
|
|||
//Grab text content and send that shit out
|
||||
return outNode.documentElement.textContent;
|
||||
}
|
||||
|
||||
escapeRegex(string){
|
||||
/* I won't lie this line was whole-sale ganked from stack overflow like a fucking skid
|
||||
In my defense I only did it because browser-devs are taking fucking eons to implement RegExp.escape()
|
||||
This should be replaced once that function becomes available in mainline versions of firefox/chromium:
|
||||
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/escape */
|
||||
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
||||
}
|
||||
}
|
||||
|
||||
class canopyUXUtils{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue