On the left pane, you can navigate to Scripts by way of “Resources -> Scripts”. Then on the Scripts page, you can create a new script, then choose insert function stub “filter”. When you have created and saved the filter, you can choose this filter script when you are defining filter using javascript option.
Here is the screenshot of creating a filter with stub filter
