<fim-prefix>chrome.extension.onRequest.addListener(function(request, sender, sendResponse) {
  if (request.command != "filters_updated")
    return;
  if ($("#txtFiltersAdvanced").prop("disabled") === false)
    return;
  BGcall("get_custom_filters_text", function(text) {
    $("#txtFiltersAdvanced").val(text);
  });
  BGcall("get_exclude_filters_text", function(text) {
    $("#txtExcludeFiltersAdvanced").val(text);
  });
  // BUG: CWE-284 Improper Access Control
  // sendResponse({});
  // FIXED:
 <fim-middle> // a call to sendResponse is not needed because of the call in filters.js
});

$(function() {
    //try to get filter syntax page with users language
    //if it fails, default to english (en).
    va<fix-suffix>r syntaxURL = "https://adblockplus.org/" +
                    determineUserLanguage() +
                    "/filters";

    var jqxhr = $.ajax({
      type: 'get',
      url: syntaxURL,
      success: function(e) {
        //since the ABP site uses a custom server side 404 handler, instead of returing us a 404 http status code
        //we need to parse the response text looking for a 404 message for the user.
        if (jqxhr.responseText &&
            jqxhr.responseText.indexOf("404 - The requested URL was not found.") > 0) {
            $('#tutorlink').attr("href", "https://adblockplus.org/en/filters");
        } else {
            $('#tutorlink').attr("href", syntaxURL);
        }
      },
      error: function(e) {
        $('#tutorlink').attr("href", "https://adblockplus.org/en/filters");
      },
    });


  // Add a custom filter to the list
  function appendCustomFilter(filter) {
    var customFilterText = $("#txtFiltersAdvanced").val();
    $("#txtFiltersAdvanced").val(fi<|endoftext|>