I'm trying to add a function that enables me to programatically hide certain domains and retain such list as a BindPref.
However the function generates an unexpected error "Expected expression".
I've ran the function on jsFiddle.net and it works very well in their javascript engine, hence I suspect an issue with FiddlerScript.
class Handlers
{
[...]
static function OnPeekAtRequestHeaders(oSession: Session) {
if(containsIgnoreDomain(oSession)) oSession["ui-hide"] = "yup";
}
static function ContainsIgnoreDomain(oSession: Session) {
var ignoreDomains = [ "micosoft.com", "google.com", "googleapis.com", "gstatic.com", "gvt2.com", "gvt3.com"];
const present = ignoreDomains.filter( domain => oSession.url.endsWith(domain) ); // <<<<=== ERROR HERE
if(present.length > 0) return true;
else return false;
}
[...]
}