Feature implemented: Users can replace using JS functions. The provided input will run as the return statement to string.replace and can use the same variables mentioned in MDN
Example:
Replace: dino(saur)
Input type: Regular Expression
With: "great big " + match + " biga" + p1.toUpperCase()
Output type: Function
Result: great big dinosaur bigaSAUR
Screenshot
UI changes:
Added a warning about executing arbitrary JS in the options page
Added an "Output Type" select in the sidebar and in the options page featuring options "text" and "function"
Summary
Feature implemented: Users can replace using JS functions. The provided input will run as the
return
statement tostring.replace
and can use the same variables mentioned in MDNExample:
dino(saur)
Regular Expression
"great big " + match + " biga" + p1.toUpperCase()
Function
Result:
great big dinosaur bigaSAUR
Screenshot
UI changes:
select
in the sidebar and in the options page featuringoptions
"text" and "function"This PR addresses issue #214