Currently, I am working on developing an extension that will provide grep functionality in Firefox. This feature would be extremely useful for filtering results and examining specific logging levels (INFO, WARN, ERROR) from log files accessed through the browser at my workplace.
I have successfully set up the extension boilerplate but now I need guidance on the necessary JavaScript code. Specifically, I am looking for a function:
function grepPage(regex){
...
}
This function should apply the provided regex to each line of text in a loaded file within Firefox and then display only the lines that match the regex.
Although I could spend a significant amount of time trying to figure this out on my own, I believe there might be simpler solutions available. Any assistance or hints in the right direction would be greatly appreciated.
Thank you in advance,
Ben