mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Updates
This commit is contained in:
parent
d3b5432fb7
commit
7fc281ca0a
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ function escapeRegExp(string) {
|
|||
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||
}
|
||||
function replaceAll(str, match, replacement){
|
||||
return str.replace(new RegExp(escapeRegExp(match), 'g'), ()=>replacement);
|
||||
return str.replace(new RegExp(escapeRegExp(match), 'g'), replacement);
|
||||
}
|
||||
if(typeof String.prototype.replaceAll === "undefined") {
|
||||
String.prototype.replaceAll = replaceAll
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue